summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-01-08 22:24:19 +0000
committerJeremy Katz <katzj@redhat.com>2003-01-08 22:24:19 +0000
commit72365186d678d2f2b6948827d5c54bf419ab5793 (patch)
tree0954dd659737a95fcedb9aa93b07298c66a33b74 /packages.py
parent5c622843104ab1292ce86d6ea96296b4be5b9534 (diff)
downloadanaconda-72365186d678d2f2b6948827d5c54bf419ab5793.tar.gz
anaconda-72365186d678d2f2b6948827d5c54bf419ab5793.tar.xz
anaconda-72365186d678d2f2b6948827d5c54bf419ab5793.zip
1) if we found a comps.rpm, the number of packages being installed should be
bumped by one 2) if installing the comps.rpm fails for some reason, include the exception message in the log 3) don't run vgscan as part of the post-install unless there are some volume groups created (#81168)
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/packages.py b/packages.py
index 9f83b5e66..0c7232928 100644
--- a/packages.py
+++ b/packages.py
@@ -730,10 +730,15 @@ def doInstall(method, id, intf, instPath):
pass
syslog.start (instPath, syslogname)
+ if id.compspkg is not None:
+ num = i + 1
+ else:
+ num = i
+
if upgrade:
- instLog.write(_("Upgrading %s packages\n\n") % (i))
+ instLog.write(_("Upgrading %s packages\n\n") % (num,))
else:
- instLog.write(_("Installing %s packages\n\n") % (i))
+ instLog.write(_("Installing %s packages\n\n") % (num,))
ts.scriptFd = instLog.fileno ()
# the transaction set dup()s the file descriptor and will close the
@@ -1040,8 +1045,8 @@ def doPostInstall(method, id, intf, instPath):
os.unlink(id.compspkg)
del ts
- except:
- log("failed to install comps.rpm. oh well")
+ except Exception, e:
+ log("comps.rpm failed to install: %s" %(e,))
try:
os.unlink(id.compspkg)
except:
@@ -1055,8 +1060,10 @@ def doPostInstall(method, id, intf, instPath):
finally:
pass
- # XXX hack - we should really write a proper /etc/lvmtab
- if os.access(instPath + "/sbin/vgscan", os.X_OK):
+ # XXX hack - we should really write a proper /etc/lvmtab. but for now
+ # just create the lvmtab if they have /sbin/vgscan and some VGs
+ if (os.access(instPath + "/sbin/vgscan", os.X_OK) and
+ len(os.listdir("/proc/lvm/VGs")) > 0):
rc = iutil.execWithRedirect("/sbin/vgscan",
["vgscan", "-v"],
stdout = "/dev/tty5",