diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-01-20 23:11:47 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-01-20 23:11:47 +0000 |
commit | 33ae0812b0ffc490cad2d7fd8eb7b412de7b739c (patch) | |
tree | 3d74f4c10b96039b82c975aeb7706a4eddcb40a8 | |
parent | ce2af608954e07d79c6d257fbcc5c45e9ced8806 (diff) | |
download | anaconda-33ae0812b0ffc490cad2d7fd8eb7b412de7b739c.tar.gz anaconda-33ae0812b0ffc490cad2d7fd8eb7b412de7b739c.tar.xz anaconda-33ae0812b0ffc490cad2d7fd8eb7b412de7b739c.zip |
use globbing to figure out the python path for rhpl updates
import encodings.utf_8 for traceonly so that it's in http/ftp installs
(hopefully fixes #113053)
-rwxr-xr-x | anaconda | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -268,6 +268,13 @@ def doShutdownX11Actions(): def setupRhplUpdates(): + import glob + + # get the python version. first of /usr/lib/python*, strip off the + # first 15 chars + pyvers = glob.glob("/usr/lib/python*") + pyver = pyvers[0][15:] + try: os.mkdir("/tmp/updates") except: @@ -281,19 +288,19 @@ def setupRhplUpdates(): os.symlink("/mnt/source/RHupdates/rhpl/%s" %(f,), "/tmp/updates/rhpl/%s" %(f,)) - if os.access("/usr/lib64/python2.2/site-packages/rhpl", os.X_OK): + if os.access("/usr/lib64/python%s/site-packages/rhpl" %(pyver,), os.X_OK): libdir = "lib64" else: libdir = "lib" - for f in os.listdir("/usr/%s/python2.2/site-packages/rhpl" %(libdir,)): + for f in os.listdir("/usr/%s/python%s/site-packages/rhpl" %(libdir,pyver)): if os.access("/tmp/updates/rhpl/%s" %(f,), os.R_OK): continue elif f.endswith(".pyc") and os.access("/tmp/updates/rhpl/%s" %(f[:-1],), os.R_OK): # dont copy .pyc files we are replacing with updates continue - os.symlink("/usr/%s/python2.2/site-packages/rhpl/%s" %(libdir, f), + os.symlink("/usr/%s/python%s/site-packages/rhpl/%s" %(libdir, pyver,f), "/tmp/updates/rhpl/%s" %(f,)) # For anaconda in test mode @@ -688,6 +695,7 @@ if traceOnly: import findpackageset import libxml2 import cmdline + import encodings.utf_8 installclass.availableClasses() |