[yum-cvs] yum/yum __init__.py,1.96,1.97
Seth Vidal
skvidal at login.linux.duke.edu
Mon Mar 14 06:26:14 UTC 2005
Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv29160/yum
Modified Files:
__init__.py
Log Message:
make yum lock file aware of the installroot - no need for a global lock
Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- __init__.py 12 Mar 2005 07:24:04 -0000 1.96
+++ __init__.py 14 Mar 2005 06:26:12 -0000 1.97
@@ -358,6 +358,9 @@
# if we're not root then we don't lock - just return nicely
if self.conf.getConfigOption('uid') != 0:
return
+
+ root = self.conf.installroot
+ lockfile = root + '/' + lockfile # lock in the chroot
mypid=str(os.getpid())
while not self._lock(lockfile, mypid, 0644):
@@ -387,6 +390,10 @@
# if we're not root then we don't lock - just return nicely
if self.conf.getConfigOption('uid') != 0:
return
+
+ root = self.conf.installroot
+ lockfile = root + '/' + lockfile
+
self._unlock(lockfile)
def _lock(self, filename, contents='', mode=0777):
More information about the Yum-cvs-commits
mailing list