diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-08-02 07:25:46 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-08-02 07:25:46 +0000 |
commit | 2d4676c0a51cbf710a125825f91d12f96ed111c6 (patch) | |
tree | b24e56636c9c672c0e4d7e56807d1c50d7bafad4 /packages.py | |
parent | 41ace68d2c5b798d344d3f094578d9f73973a7d2 (diff) | |
download | anaconda-2d4676c0a51cbf710a125825f91d12f96ed111c6.tar.gz anaconda-2d4676c0a51cbf710a125825f91d12f96ed111c6.tar.xz anaconda-2d4676c0a51cbf710a125825f91d12f96ed111c6.zip |
better fix for 69783. check if /var/tmp is a symlink. if not, remove it and create one (this is the ramdisk, so we don't need to worry about race conditions really... really :). if it's already there as a link, just log what it points to for sanity's sake
Diffstat (limited to 'packages.py')
-rw-r--r-- | packages.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/packages.py b/packages.py index 15d47a302..35c406367 100644 --- a/packages.py +++ b/packages.py @@ -543,12 +543,14 @@ def doPreInstall(method, id, intf, instPath, dir): try: - os.symlink("/mnt/sysimage/var/tmp", "/var/tmp") + if not os.path.islink("/var/tmp"): + iutil.rmrf("/var/tmp") + os.symlink("/mnt/sysimage/var/tmp", "/var/tmp") + else: + log("/var/tmp already exists as a symlink to %s" %(os.readlink("/var/tmp"),)) except: - # could be a problem later, but the most likely cause is that - # they've had to go deselect packages and then try again - # FIXME: maybe we should verify it's the symlink we want and - # iutil.rmrf it if not? + # how this could happen isn't entirely clear; log it in case + # it does and causes problems later log("unable to create symlink for /var/tmp. assuming already created") # try to copy the comps package. if it doesn't work, don't worry about it @@ -680,10 +682,6 @@ def doInstall(method, id, intf, instPath): if upgrade: id.fsset.restoreMigratedFstab(instPath) - # remove the symlink we made so we can do it again on next round - # of preinstall - os.unlink("/mnt/sysimage/var/tmp") - spaceneeded = {} nodeneeded = {} size = 12 |