diff options
author | Jeremy Katz <katzj@redhat.com> | 2008-03-26 10:35:48 -0400 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2008-03-26 16:42:33 -0400 |
commit | f36f680bcdd5209765106322c4c87881e60991e4 (patch) | |
tree | 1b350c3e980036675b43314d761824e42d6b1b5a /livecd.py | |
parent | ff43517869813269ff802aa031e75895bebc4375 (diff) | |
download | anaconda-f36f680bcdd5209765106322c4c87881e60991e4.tar.gz anaconda-f36f680bcdd5209765106322c4c87881e60991e4.tar.xz anaconda-f36f680bcdd5209765106322c4c87881e60991e4.zip |
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
Diffstat (limited to 'livecd.py')
-rw-r--r-- | livecd.py | 21 |
1 files changed, 1 insertions, 20 deletions
@@ -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 |