[yum-git] debuginfo-install.py
Seth Vidal
skvidal at linux.duke.edu
Thu Feb 21 03:50:10 UTC 2008
debuginfo-install.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 298e155930b151e5ad895ec4705c6d1e2d39a1f3
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Wed Feb 20 22:45:59 2008 -0500
make sure debuginfo-install obeys/sets yum locks
diff --git a/debuginfo-install.py b/debuginfo-install.py
index bbdac35..72962c4 100755
--- a/debuginfo-install.py
+++ b/debuginfo-install.py
@@ -53,7 +53,13 @@ class DebugInfoInstall(YumUtilBase):
if os.geteuid() != 0:
print >> sys.stderr, "You must be root to run this command."
sys.exit(1)
-
+ try:
+ self.doLock()
+ except yum.Errors.LockError, e:
+ self.logger.critical("Another application is holding the yum lock, cannot continue")
+ sys.exit(1)
+
+
# Setup yum (Ts, RPM db, Repo & Sack)
self.doUtilYumSetup()
@@ -70,10 +76,11 @@ class DebugInfoInstall(YumUtilBase):
self.buildTransaction()
if len(self.tsInfo) < 1:
print 'No debuginfo packages available to install'
+ self.doUnlock()
sys.exit()
self.doTransaction()
-
+ self.doUnlock()
def di_try_install(self, po):
di_name = '%s-debuginfo' % po.name
if self.pkgSack.searchNevra(name=di_name):
More information about the Yum-cvs-commits
mailing list