root/trunk/contrib/yum-2.6.0-chroot.patch
| Revision 2425, 7.0 kB (checked in by ensc, 2 years ago) | |
|---|---|
| |
-
yum-2.6.0/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-2.6.0/yum/config.py
old new 450 450 else: 451 451 raise Errors.ConfigError, 'No such option %s' % option 452 452 453 def getRootedPath(self, path, enforce_default=False, defaults_to_host=False): 454 instroot = getattr(self, 'installroot', None) 455 if instroot==None: 456 return path 457 458 if path.startswith('hostfs://'): res = path[9:] 459 elif path.startswith('chrootfs://'): res = instroot + '/' + path[11:] 460 else: 461 tmp = instroot + '/' +path 462 463 if enforce_default: 464 if defaults_to_host: res = path 465 else: res = tmp 466 else: 467 if os.path.exists(tmp): res = tmp 468 elif defaults_to_host: res = path 469 else: res = tmp 470 471 return res 472 473 453 474 class EarlyConf(BaseConfig): 454 475 ''' 455 476 Configuration option definitions for yum.conf's [main] section that are … … 474 495 cachedir = Option('/var/cache/yum') 475 496 keepcache = BoolOption(True) 476 497 logfile = Option('/var/log/yum.log') 498 lockfile = Option('/var/run/yum.pid') 477 499 reposdir = ListOption(['/etc/yum/repos.d', '/etc/yum.repos.d']) 478 500 syslog_ident = Option() 479 501 syslog_facility = Option('LOG_DAEMON') … … 580 602 yumconf.populate(confparser, 'main') 581 603 582 604 # Apply the installroot to directory options 583 for option in ('cachedir', 'logfile' ):605 for option in ('cachedir', 'logfile', 'lockfile'): 584 606 path = getattr(yumconf, option) 585 setattr(yumconf, option, yumconf. installroot + path)607 setattr(yumconf, option, yumconf.getRootedPath(path)) 586 608 587 609 # Check that plugin paths are all absolute 588 610 for path in yumconf.pluginpath: -
yum-2.6.0/yummain.py
old new 60 60 def unlock(): 61 61 try: 62 62 base.closeRpmDB() 63 base.doUnlock( YUM_PID_FILE)63 base.doUnlock() 64 64 except Errors.LockError, e: 65 65 sys.exit(200) 66 66 … … 83 83 except Errors.YumBaseError, e: 84 84 exFatal(e) 85 85 try: 86 base.doLock( YUM_PID_FILE)86 base.doLock() 87 87 except Errors.LockError, e: 88 88 base.errorlog(0,'%s' % e.msg) 89 89 sys.exit(200)
Note: See TracBrowser for help on using the browser.
