summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-12-03 09:27:29 -0500
committerChris Lumens <clumens@redhat.com>2009-12-03 15:04:35 -0500
commitfb19b46f3a8c23b58241bebf1579b3613cf7b51b (patch)
tree3561cfb31cf14d3a6f68771d588d03e21d0a969b /yuminstall.py
parenta6eb83c0b728a3ab38c8cae35a6096789cec5e8c (diff)
downloadanaconda-fb19b46f3a8c23b58241bebf1579b3613cf7b51b.tar.gz
anaconda-fb19b46f3a8c23b58241bebf1579b3613cf7b51b.tar.xz
anaconda-fb19b46f3a8c23b58241bebf1579b3613cf7b51b.zip
Nothing sets flags.setupFilesystems anymore, so it can go too.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py61
1 files changed, 30 insertions, 31 deletions
diff --git a/yuminstall.py b/yuminstall.py
index a0c7203d3..4511c063a 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1518,42 +1518,41 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
self.initLog(anaconda.id, anaconda.rootPath)
- if flags.setupFilesystems:
- # setup /etc/rpm/ for the post-install environment
- iutil.writeRpmPlatform(anaconda.rootPath)
+ # setup /etc/rpm/ for the post-install environment
+ iutil.writeRpmPlatform(anaconda.rootPath)
+ try:
+ # FIXME: making the /var/lib/rpm symlink here is a hack to
+ # workaround db->close() errors from rpm
+ iutil.mkdirChain("/var/lib")
+ for path in ("/var/tmp", "/var/lib/rpm"):
+ if os.path.exists(path) and not os.path.islink(path):
+ shutil.rmtree(path)
+ if not os.path.islink(path):
+ os.symlink("%s/%s" %(anaconda.rootPath, path), "%s" %(path,))
+ else:
+ log.warning("%s already exists as a symlink to %s" %(path, os.readlink(path),))
+ except Exception, e:
+ # how this could happen isn't entirely clear; log it in case
+ # it does and causes problems later
+ log.error("error creating symlink, continuing anyway: %s" %(e,))
+
+ # SELinux hackery (#121369)
+ if flags.selinux:
try:
- # FIXME: making the /var/lib/rpm symlink here is a hack to
- # workaround db->close() errors from rpm
- iutil.mkdirChain("/var/lib")
- for path in ("/var/tmp", "/var/lib/rpm"):
- if os.path.exists(path) and not os.path.islink(path):
- shutil.rmtree(path)
- if not os.path.islink(path):
- os.symlink("%s/%s" %(anaconda.rootPath, path), "%s" %(path,))
- else:
- log.warning("%s already exists as a symlink to %s" %(path, os.readlink(path),))
+ os.mkdir(anaconda.rootPath + "/selinux")
except Exception, e:
- # how this could happen isn't entirely clear; log it in case
- # it does and causes problems later
- log.error("error creating symlink, continuing anyway: %s" %(e,))
-
- # SELinux hackery (#121369)
- if flags.selinux:
- try:
- os.mkdir(anaconda.rootPath + "/selinux")
- except Exception, e:
- pass
- try:
- isys.mount("/selinux", anaconda.rootPath + "/selinux", "selinuxfs")
- except Exception, e:
- log.error("error mounting selinuxfs: %s" %(e,))
-
- # For usbfs
+ pass
try:
- isys.mount("/proc/bus/usb", anaconda.rootPath + "/proc/bus/usb", "usbfs")
+ isys.mount("/selinux", anaconda.rootPath + "/selinux", "selinuxfs")
except Exception, e:
- log.error("error mounting usbfs: %s" %(e,))
+ log.error("error mounting selinuxfs: %s" %(e,))
+
+ # For usbfs
+ try:
+ isys.mount("/proc/bus/usb", anaconda.rootPath + "/proc/bus/usb", "usbfs")
+ except Exception, e:
+ log.error("error mounting usbfs: %s" %(e,))
# write out the fstab
if not upgrade: