diff options
author | Matt Wilson <msw@redhat.com> | 2001-06-27 06:07:34 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-06-27 06:07:34 +0000 |
commit | 08a3c481379fbf7d89894ab44a8805f155e0d0e9 (patch) | |
tree | f7f5c2f95b132c24b5932d1f47839c472b33fda8 /upgrade.py | |
parent | 6913ccf627cd099559bf20926b63deb3a5a1f3cc (diff) | |
download | anaconda-08a3c481379fbf7d89894ab44a8805f155e0d0e9.tar.gz anaconda-08a3c481379fbf7d89894ab44a8805f155e0d0e9.tar.xz anaconda-08a3c481379fbf7d89894ab44a8805f155e0d0e9.zip |
select grub if it isn't on the system
Diffstat (limited to 'upgrade.py')
-rw-r--r-- | upgrade.py | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/upgrade.py b/upgrade.py index b8f8be75c..a1aff93ae 100644 --- a/upgrade.py +++ b/upgrade.py @@ -292,30 +292,40 @@ def upgradeFindPackages (intf, method, id, instPath): if hasX and not hasFileManager: for name in ("gmc", "kdebase"): try: - db.findbyname (name) - hasFileManager = 1 - break + recs = db.findbyname (name) + if recs: + hasFileManager = 1 + break except rpm.error: continue # if we have X but not gmc, we need to turn on GNOME. We only # want to turn on packages we don't have installed already, though. if hasX and not hasFileManager: - log ("Has X but no desktop -- Installing GNOME") + log ("Upgrade: System has X but no desktop -- Installing GNOME") + pkgs = "" for package in id.comps['GNOME'].pkgs: try: rec = db.findbyname (package.name) except rpm.error: rec = None if not rec: - log ("GNOME: Adding %s", package) + pkgs = "%s %s" % (pkgs, package) package.select() + log ("Upgrade: GNOME: Adding packages: %s", pkgs) if iutil.getArch() == "i386" and id.bootloader.useGrub(): + log ("Upgrade: User selected to use GRUB for bootloader") if id.hdList.has_key("grub") and not id.hdList["grub"].isSelected(): + log ("Upgrade: grub is not currently selected to be upgraded") + recs = None try: - db.findbyname ("grub") + recs = db.findbyname ("grub") except rpm.error: + pass + if not recs: + log("Upgrade: GRUB is not already installed on the system, " + "selecting GRUB") id.hdList["grub"].select() del db |