summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2005-08-30 15:42:51 +0000
committerPaul Nasrat <pnasrat@redhat.com>2005-08-30 15:42:51 +0000
commit8a4884aedd6fdb5c6444bd3841031d7862cd129b (patch)
tree09b70b3f7d6a513281bfd96e9dd26e342ec48956 /packages.py
parent29249ce1b83c9b5374d5de1829b75c43f4376c13 (diff)
downloadanaconda-8a4884aedd6fdb5c6444bd3841031d7862cd129b.tar.gz
anaconda-8a4884aedd6fdb5c6444bd3841031d7862cd129b.tar.xz
anaconda-8a4884aedd6fdb5c6444bd3841031d7862cd129b.zip
dispatch and yum backend integration
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py106
1 files changed, 0 insertions, 106 deletions
diff --git a/packages.py b/packages.py
index 63149a27e..6cb9e0d42 100644
--- a/packages.py
+++ b/packages.py
@@ -380,112 +380,6 @@ def handleMiscPackages(intf, id, dir):
if select(id.grpset.hdrlist, pkg):
log.info("Needed %s for %s" %(pkg, entry.getMountPoint()))
-def doPreInstall(method, id, intf, instPath, dir):
- if dir == DISPATCH_BACK:
- for d in ("/selinux", "/dev"):
- try:
- isys.umount(instPath + d, removeDir = 0)
- except Exception, e:
- log.error("unable to unmount %s: %s" %(d, e))
- return
-
- if flags.test:
- return
-
- # shorthand
- upgrade = id.getUpgrade()
-
- if upgrade:
- # An old mtab can cause confusion (esp if loop devices are
- # in it)
- f = open(instPath + "/etc/mtab", "w+")
- f.close()
-
- # we really started writing modprobe.conf out before things were
- # all completely ready. so now we need to nuke old modprobe.conf's
- # if you're upgrading from a 2.4 dist so that we can get the
- # transition right
- if (os.path.exists(instPath + "/etc/modules.conf") and
- os.path.exists(instPath + "/etc/modprobe.conf") and
- not os.path.exists(instPath + "/etc/modprobe.conf.anacbak")):
- log.info("renaming old modprobe.conf -> modprobe.conf.anacbak")
- os.rename(instPath + "/etc/modprobe.conf",
- instPath + "/etc/modprobe.conf.anacbak")
-
-
- if method.systemMounted (id.fsset, instPath):
- id.fsset.umountFilesystems(instPath)
- return DISPATCH_BACK
-
- for i in ( '/var', '/var/lib', '/var/lib/rpm', '/tmp', '/dev', '/etc',
- '/etc/sysconfig', '/etc/sysconfig/network-scripts',
- '/etc/X11', '/root', '/var/tmp', '/etc/rpm' ):
- try:
- os.mkdir(instPath + i)
- except os.error, (errno, msg):
- pass
-# log.error("Error making directory %s: %s" % (i, msg))
-
-
- if flags.setupFilesystems:
- # setup /etc/rpm/platform for the post-install environment
- iutil.writeRpmPlatform(instPath)
-
- 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):
- iutil.rmrf(path)
- if not os.path.islink(path):
- os.symlink("/mnt/sysimage/%s" %(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:
- os.mkdir(instPath + "/selinux")
- except Exception, e:
- pass
- try:
- isys.mount("/selinux", instPath + "/selinux", "selinuxfs")
- except Exception, e:
- log.error("error mounting selinuxfs: %s" %(e,))
-
- # we need to have a /dev during install and now that udev is
- # handling /dev, it gets to be more fun. so just bind mount the
- # installer /dev
- if 1:
- log.warning("no dev package, going to bind mount /dev")
- isys.mount("/dev", "/mnt/sysimage/dev", bindMount = 1)
-
- # write out the fstab
- if not upgrade:
- id.fsset.write(instPath)
- # rootpath mode doesn't have this file around
- if os.access("/tmp/modprobe.conf", os.R_OK):
- iutil.copyFile("/tmp/modprobe.conf",
- instPath + "/etc/modprobe.conf")
- if os.access("/tmp/zfcp.conf", os.R_OK):
- iutil.copyFile("/tmp/zfcp.conf",
- instPath + "/etc/zfcp.conf")
-
- # make a /etc/mtab so mkinitrd can handle certain hw (usb) correctly
- f = open(instPath + "/etc/mtab", "w+")
- f.write(id.fsset.mtab())
- f.close()
-
-# delay writing migrate adjusted fstab till later, in case
-# rpm transaction set determines they don't have enough space to upgrade
-# else:
-# id.fsset.migratewrite(instPath)
-
def doPostInstall(method, id, intf, instPath):
if flags.test:
return