summaryrefslogtreecommitdiffstats
path: root/yuminstall.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-04-30 17:19:27 -0400
committerChris Lumens <clumens@redhat.com>2009-04-30 17:22:36 -0400
commit9831be217d043fa21cf63b3415c8170c73a8f1fc (patch)
tree1de4ada509dc5d2bcca7dd0bcc82b0d4cf768c9d /yuminstall.py
parent57352b956a84d723c423e732efad8f9311c0d830 (diff)
downloadanaconda-9831be217d043fa21cf63b3415c8170c73a8f1fc.tar.gz
anaconda-9831be217d043fa21cf63b3415c8170c73a8f1fc.tar.xz
anaconda-9831be217d043fa21cf63b3415c8170c73a8f1fc.zip
Move _resetRpmDb into iutil so we can access it everywhere.
Diffstat (limited to 'yuminstall.py')
-rw-r--r--yuminstall.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/yuminstall.py b/yuminstall.py
index b16d7c616..ff6136088 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1004,7 +1004,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
# clean up rpmdb locks so that kickstart %post scripts aren't
# unhappy (#496961)
- self._resetRpmDb(anaconda.rootPath)
+ iutil.resetRpmDb(anaconda.rootPath)
def doBackendSetup(self, anaconda):
if anaconda.dir == DISPATCH_BACK:
@@ -1012,7 +1012,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
if anaconda.id.getUpgrade():
# FIXME: make sure that the rpmdb doesn't have stale locks :/
- self._resetRpmDb(anaconda.rootPath)
+ iutil.resetRpmDb(anaconda.rootPath)
iutil.writeRpmPlatform()
self.ayum = AnacondaYum(anaconda)
@@ -1480,13 +1480,6 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
self._checkUpgradeVersion(anaconda)
self._checkUpgradeArch(anaconda)
- def _resetRpmDb(self, rootPath):
- for rpmfile in glob.glob("%s/var/lib/rpm/__db.*" % rootPath):
- try:
- os.unlink(rpmfile)
- except Exception, e:
- log.debug("error %s removing file: %s" %(e,rpmfile))
-
def _checkUpgradeVersion(self, anaconda):
# Figure out current version for upgrade nag and for determining weird
# upgrade cases
@@ -1514,7 +1507,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
"process?") %(productName,),
type = "yesno")
if rc == 0:
- self._resetRpmDb(anaconda.rootPath)
+ iutil.resetRpmDb(anaconda.rootPath)
sys.exit(0)
def _checkUpgradeArch(self, anaconda):
@@ -1545,7 +1538,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
%(productName, myarch, po.arch),
type="yesno")
if rc == 0:
- self._resetRpmDb(anaconda.rootPath)
+ iutil.resetRpmDb(anaconda.rootPath)
sys.exit(0)
else:
log.warning("upgrade between possibly incompatible "