X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=contrib%2Fyum-2.6.0-chroot.patch;h=1122668cf6b1060dda0cd126fe1978afb60d931e;hb=b0a62d195efca12c5cb9e7c0b3bea3be2cd57fc9;hp=3f0e75053316878b59fe1d03961523b951e24e8b;hpb=fc28db1eb4146796ec27c2fb15780d6303120261;p=util-vserver.git diff --git a/contrib/yum-2.6.0-chroot.patch b/contrib/yum-2.6.0-chroot.patch index 3f0e750..1122668 100644 --- a/contrib/yum-2.6.0-chroot.patch +++ b/contrib/yum-2.6.0-chroot.patch @@ -48,17 +48,11 @@ if os.path.isdir(reposdir): #XXX: why can't we just pass the list of files? -@@ -482,16 +481,20 @@ +@@ -482,16 +481,14 @@ self.log(2, 'Finished') - def doLock(self, lockfile): -+ def __getLockfileName(self): -+ lockfile = self.conf.lockfile -+ return self.conf.getRootedPath(lockfile, -+ enforce_default = True, -+ defaults_to_host = False) -+ + def doLock(self): """perform the yum locking, raise yum-based exceptions, not OSErrors""" @@ -69,7 +63,7 @@ - root = self.conf.installroot - lockfile = root + '/' + lockfile # lock in the chroot - lockfile = os.path.normpath(lockfile) # get rid of silly preceding extra / -+ lockfile = self.__getLockfileName() ++ lockfile = self.conf.lockfile mypid=str(os.getpid()) while not self._lock(lockfile, mypid, 0644): @@ -87,7 +81,7 @@ - root = self.conf.installroot - lockfile = root + '/' + lockfile # lock in the chroot -+ lockfile=self.__getLockfileName() ++ lockfile=self.conf.lockfile self._unlock(lockfile)