From f36f680bcdd5209765106322c4c87881e60991e4 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Wed, 26 Mar 2008 10:35:48 -0400 Subject: Handle kernel variants a little better at install time too Make our handling of kernel variants a little bit more flexible, allowing for the fact that uname -r might not match version-release exactly. This also makes it so we don't have a hard-coded list of kernel variants --- livecd.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'livecd.py') diff --git a/livecd.py b/livecd.py index f209558c5..922af8d28 100644 --- a/livecd.py +++ b/livecd.py @@ -339,26 +339,7 @@ class LiveCDCopyBackend(backend.AnacondaBackend): pass def kernelVersionList(self, rootPath = "/"): - versions = [] - - # FIXME: we should understand more types of kernel versions and not - # be tied to rpm... - import rpm - ts = rpm.TransactionSet(rootPath) - - # FIXME: and make sure that the rpmdb doesn't have stale locks :/ - for rpmfile in ["__db.000", "__db.001", "__db.002", "__db.003"]: - try: - os.unlink("%s/var/lib/rpm/%s" %(rootPath, rpmfile)) - except: - log.debug("failed to unlink /var/lib/rpm/%s" %(rpmfile,)) - - mi = ts.dbMatch('name', 'kernel') - for h in mi: - v = "%s-%s" %(h['version'], h['release']) - versions.append( (v, h['arch'], "base") ) - - return versions + return packages.rpmKernelVersionList(rootPath) def doInitialSetup(self, anaconda): pass -- cgit