summaryrefslogtreecommitdiffstats
path: root/upgrade.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-10-25 19:03:07 +0000
committerJeremy Katz <katzj@redhat.com>2002-10-25 19:03:07 +0000
commitc74909dd111ff97e9dbb85ae76280ab87ae942fd (patch)
treef5e4534980cf9e763bcf473c66808c204ba2abb9 /upgrade.py
parent78124a32b7babafff116a922b4c978fc2847aef5 (diff)
downloadanaconda-c74909dd111ff97e9dbb85ae76280ab87ae942fd.tar.gz
anaconda-c74909dd111ff97e9dbb85ae76280ab87ae942fd.tar.xz
anaconda-c74909dd111ff97e9dbb85ae76280ab87ae942fd.zip
fix a typo, remove stale rpm locks
Diffstat (limited to 'upgrade.py')
-rw-r--r--upgrade.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/upgrade.py b/upgrade.py
index 8a66e084f..b5a8ec4d4 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -326,6 +326,14 @@ def upgradeFindPackages(intf, method, id, instPath, dir):
try:
import findpackageset
+
+ # FIXME: make sure that the rpmdb doesn't have stale locks :/
+ for file in ["__db.001", "__db.002", "__db.003"]:
+ try:
+ os.unlink("%s/var/lib/rpm/%s" %(instPath, file))
+ except:
+ log("failed to unlink /var/lib/rpm/%s" %(file,))
+
packages = findpackageset.findpackageset(id.hdList.hdlist, instPath)
except rpm.error:
if rebuildpath is not None:
@@ -351,7 +359,7 @@ def upgradeFindPackages(intf, method, id, instPath, dir):
# open up the database to check dependencies and currently
# installed packages
ts = rpm.TransactionSet(instPath)
- ts.seVSFlags(rpm.RPMVSF_NORSA|rpm.RPMVSF_NODSA)
+ ts.setVSFlags(rpm.RPMVSF_NORSA|rpm.RPMVSF_NODSA)
ts.setFlags(rpm.RPMTRANS_FLAG_NOMD5)
mi = ts.dbMatch()
@@ -378,13 +386,12 @@ def upgradeFindPackages(intf, method, id, instPath, dir):
found = 1
if h[rpm.RPMTAG_NAME] == "XFree86":
hasX = 1
- if h[rpm.RPMTAG_NAME] == "gmc":
+ if h[rpm.RPMTAG_NAME] == "nautilus":
hasFileManager = 1
if h[rpm.RPMTAG_NAME] == "kdebase":
hasFileManager = 1
- if h[rpm.RPMTAG_NAME] == "nautilus":
+ if h[rpm.RPMTAG_NAME] == "gmc":
hasFileManager = 1
- h = i.next()
if found:
rc = intf.messageWindow(_("Warning"),