summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-10-20 11:15:33 -0400
committerChris Lumens <clumens@redhat.com>2009-10-20 17:00:53 -0400
commit516c91aecc21278f22565d55cb43feae2dd404cd (patch)
treef5e9e75c42a5f23346208f6a1bcc73c794e73d41 /packages.py
parent735b20c7a8d7588806f36f2290dddd2811e9a6eb (diff)
downloadanaconda-516c91aecc21278f22565d55cb43feae2dd404cd.tar.gz
anaconda-516c91aecc21278f22565d55cb43feae2dd404cd.tar.xz
anaconda-516c91aecc21278f22565d55cb43feae2dd404cd.zip
Use rpm to determine how to set bootloader args and default runlevel (#527520).
We were previously using tests that have diverged from what's going on in yuminstall.py, so this brings the two backend tests into using the same concept.
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/packages.py b/packages.py
index 3d32a6866..02c3c9284 100644
--- a/packages.py
+++ b/packages.py
@@ -302,6 +302,22 @@ def rpmKernelVersionList(rootPath = "/"):
return versions
+def rpmSetupGraphicalSystem(anaconda):
+ import rpm
+
+ iutil.resetRpmDb(anaconda.rootPath)
+ ts = rpm.TransactionSet(anaconda.rootPath)
+
+ # Only add "rhgb quiet" on non-s390, non-serial installs
+ if iutil.isConsoleOnVirtualTerminal() and \
+ ts.dbMatch('provides', 'rhgb').count() or \
+ ts.dbMatch('provides', 'plymouth').count():
+ anaconda.id.bootloader.args.append("rhgb quiet")
+
+ if ts.dbMatch('provides', 'service(graphical-login)').count() and \
+ anaconda.id.displayMode == 'g' and not flags.usevnc:
+ anaconda.id.desktop.setDefaultRunLevel(5)
+
#Recreate initrd for use when driver disks add modules
def recreateInitrd (kernelTag, instRoot):
log.info("recreating initrd for %s" % (kernelTag,))