packages: yum/yum-chroot.patch - adjusted for 3.2.23

amateja amateja at pld-linux.org
Thu May 28 10:36:15 CEST 2009


Author: amateja                      Date: Thu May 28 08:36:15 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- adjusted for 3.2.23

---- Files affected:
packages/yum:
   yum-chroot.patch (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: packages/yum/yum-chroot.patch
diff -u packages/yum/yum-chroot.patch:1.9 packages/yum/yum-chroot.patch:1.10
--- packages/yum/yum-chroot.patch:1.9	Fri May  8 11:27:57 2009
+++ packages/yum/yum-chroot.patch	Thu May 28 10:36:10 2009
@@ -47,9 +47,9 @@
      def _lock(self, filename, contents='', mode=0777):
 --- yum-3.2.4/yum/config.py.chroot
 +++ yum-3.2.4/yum/config.py
-@@ -469,6 +469,26 @@ class StartupConf(BaseConfig):
-     pluginpath = ListOption(['/usr/share/yum-plugins', '/usr/lib/yum-plugins'])
-     pluginconfpath = ListOption(['/etc/yum/pluginconf.d'])
+@@ -588,6 +588,26 @@
+     syslog_ident = Option()
+     syslog_facility = Option('LOG_DAEMON')
  
 +    def getRootedPath(self, path, enforce_default=False, defaults_to_host=False):
 +        instroot = getattr(self, 'installroot', None)
@@ -74,26 +74,26 @@
  class YumConf(StartupConf):
      '''
      Configuration option definitions for yum.conf\'s [main] section.
-@@ -482,6 +502,7 @@ class YumConf(StartupConf):
+@@ -601,6 +621,7 @@ class YumConf(StartupConf):
      persistdir = Option('/var/lib/yum')
      keepcache = BoolOption(True)
      logfile = Option('/var/log/yum.log')
 +    lockfile = Option('/var/run/yum.pid')
      reposdir = ListOption(['/etc/yum/repos.d', '/etc/yum.repos.d'])
-     syslog_ident = Option()
-     syslog_facility = Option('LOG_DAEMON')
-@@ -615,9 +636,9 @@ def readMainConfig(startupconf):
+
+     commands = ListOption()
+@@ -798,9 +819,9 @@ def readMainConfig(startupconf):
      yumconf.populate(startupconf._parser, 'main')
- 
+
      # Apply the installroot to directory options
 -    for option in ('cachedir', 'logfile', 'persistdir'):
 +    for option in ('cachedir', 'logfile', 'persistdir', 'lockfile'):
          path = getattr(yumconf, option)
--        setattr(yumconf, option, yumconf.installroot + path)
-+        setattr(yumconf, option, yumconf.getRootedPath(path))
-     
-     # Add in some extra attributes which aren't actually configuration values 
-     yumconf.yumvar = yumvars
+-        ir_path = yumconf.installroot + path
++       ir_path = yumconf.getRootedPath(path)
+         ir_path = ir_path.replace('//', '/') # os.path.normpath won't fix this and
+                                              # it annoys me
+         setattr(yumconf, option, ir_path)
 --- yum-3.2.4/docs/yum.conf.5.chroot
 +++ yum-3.2.4/docs/yum.conf.5
 @@ -23,8 +23,10 @@ The [main] section must exist for yum to
@@ -155,12 +155,3 @@
              root=opts.installroot
          else:
              root = '/'
-@@ -1081,7 +1081,7 @@
-                 help=_("be tolerant of errors"))
-         self.add_option("-C", dest="cacheonly", action="store_true",
-                 help=_("run entirely from cache, don't update cache"))
--        self.add_option("-c", dest="conffile", default='/etc/yum/yum.conf',
-+        self.add_option("-c", dest="conffile", default=None,
-                 help=_("config file location"), metavar=' [config file]')
-         self.add_option("-R", dest="sleeptime", type='int', default=None,
-                 help=_("maximum command wait time"), metavar=' [minutes]')
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/yum/yum-chroot.patch?r1=1.9&r2=1.10&f=u



More information about the pld-cvs-commit mailing list