From a116a6b3e77a2918d2cc87e93a74a2df9a1b60d3 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Fri, 31 Mar 2006 16:36:00 +0000 Subject: Allow updates to contain entire directories we forgot in an image. --- anaconda | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'anaconda') diff --git a/anaconda b/anaconda index 24f40904f..189ef2465 100755 --- a/anaconda +++ b/anaconda @@ -290,13 +290,6 @@ def setupPythonUpdates(): for pypkg in ("rhpl", "yum", "rpmUtils", "urlgrabber", "repomd", "pykickstart", "rhpxl"): - # get the libdir. *sigh* - if os.access("/usr/lib64/python%s/site-packages/%s" %(pyver, pypkg), - os.X_OK): - libdir = "lib64" - else: - libdir = "lib" - if os.access("/mnt/source/RHupdates/%s" %(pypkg,), os.X_OK): try: os.mkdir("/tmp/updates/%s" %(pypkg,)) @@ -308,6 +301,19 @@ def setupPythonUpdates(): os.symlink("/mnt/source/RHupdates/%s/%s" %(pypkg, f), "/tmp/updates/%s/%s" %(pypkg, f)) + # get the libdir. *sigh* + if os.access("/usr/lib64/python%s/site-packages/%s" %(pyver, pypkg), + os.X_OK): + libdir = "lib64" + elif os.access("/usr/lib/python%s/site-packages/%s" %(pyver, pypkg), + os.X_OK): + libdir = "lib" + else: + # If the directory doesn't exist, there's nothing to link over. + # This happens if we forgot to include one of the above packages + # in the image, for instance. + return + if os.access("/tmp/updates/%s" %(pypkg,), os.X_OK): for f in os.listdir("/usr/%s/python%s/site-packages/%s" %(libdir, pyver, -- cgit