root/trunk/contrib/yum-3.0.3-chroot.patch
| Revision 2457, 6.6 kB (checked in by ensc, 2 years ago) |
|---|
-
yum-3.0.3/docs/yum.conf.5
old new 23 23 following options: 24 24 25 25 .IP \fBcachedir\fR 26 Directory where yum should store its cache and db files. The default is 27 `/var/cache/yum'. 26 Directory where yum should store its cache and db files. The default 27 is `/var/cache/yum'. Unless the prefixes `hostfs://' or `chrootfs://' 28 are used, some magic will be applied to determine the real path in 29 combination with `--installroot'. 28 30 29 31 .IP \fBkeepcache\fR 30 32 Either `1' or `0'. Determines whether or not yum keeps the cache … … 40 42 repositories defined in /etc/yum.conf to form the complete set of repositories 41 43 that yum will use. 42 44 45 Unless the prefixes `hostfs://' or `chrootfs://' are used, some magic 46 will be applied to determine the real path in combination with 47 `--installroot'. 48 43 49 .IP \fBdebuglevel\fR 44 50 Debug message output level. Practical range is 0\-10. Default is `2'. 45 51 … … 47 53 Error message output level. Practical range is 0\-10. Default is `2'. 48 54 49 55 .IP \fBlogfile\fR 50 Full directory and file name for where yum should write its log file. 56 Full directory and file name for where yum should write its log 57 file. Unless the prefixes `hostfs://' or `chrootfs://' are used, 58 some magic will be applied to determine the real path in combination 59 with `--installroot'. 51 60 52 61 .IP \fBgpgcheck\fR 53 62 Either `1' or `0'. This tells yum whether or not it should perform a GPG -
yum-3.0.3/yum/__init__.py
old new 169 169 # (typically /etc/yum.repos.d and /etc/yum/repos.d) 170 170 parser = ConfigParser() 171 171 for reposdir in self.conf.reposdir: 172 if os.path.exists(self.conf.installroot+'/'+reposdir): 173 reposdir = self.conf.installroot + '/' + reposdir 172 reposdir = self.conf.getRootedPath(reposdir) 174 173 175 174 if os.path.isdir(reposdir): 176 175 for repofn in glob.glob('%s/*.repo' % reposdir): … … 523 522 524 523 self.verbose_logger.log(logginglevels.INFO_2, 'Finished') 525 524 526 def doLock(self , lockfile = YUM_PID_FILE):525 def doLock(self): 527 526 """perform the yum locking, raise yum-based exceptions, not OSErrors""" 528 527 529 528 # if we're not root then we don't lock - just return nicely 530 529 if self.conf.uid != 0: 531 530 return 532 533 root = self.conf.installroot 534 lockfile = root + '/' + lockfile # lock in the chroot 535 lockfile = os.path.normpath(lockfile) # get rid of silly preceding extra / 536 531 532 lockfile = self.conf.lockfile 533 537 534 mypid=str(os.getpid()) 538 535 while not self._lock(lockfile, mypid, 0644): 539 536 fd = open(lockfile, 'r') … … 558 555 msg = 'Existing lock %s: another copy is running. Aborting.' % lockfile 559 556 raise Errors.LockError(0, msg) 560 557 561 def doUnlock(self , lockfile = YUM_PID_FILE):558 def doUnlock(self): 562 559 """do the unlock for yum""" 563 560 564 561 # if we're not root then we don't lock - just return nicely 565 562 if self.conf.uid != 0: 566 563 return 567 564 568 root = self.conf.installroot 569 lockfile = root + '/' + lockfile # lock in the chroot 570 565 lockfile=self.conf.lockfile 566 571 567 self._unlock(lockfile) 572 568 573 569 def _lock(self, filename, contents='', mode=0777):
Note: See TracBrowser for help on using the browser.
