packages: yum/yum-chroot.patch - reverted to 1.8, another broken update by ...

hawk hawk at pld-linux.org
Thu Aug 6 00:42:15 CEST 2009


Author: hawk                         Date: Wed Aug  5 22:42:15 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- reverted to 1.8, another broken update by amateja

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

---- Diffs:

================================================================
Index: packages/yum/yum-chroot.patch
diff -u packages/yum/yum-chroot.patch:1.10 packages/yum/yum-chroot.patch:1.11
--- packages/yum/yum-chroot.patch:1.10	Thu May 28 10:36:10 2009
+++ packages/yum/yum-chroot.patch	Thu Aug  6 00:42:10 2009
@@ -1,15 +1,15 @@
 --- yum-3.2.4/yum/__init__.py.chroot
 +++ yum-3.2.4/yum/__init__.py
 @@ -214,8 +214,7 @@ class YumBase(depsolve.Depsolve):
-             # this check makes sure that our dirs exist properly.
-             # if they aren't in the installroot then don't prepent the installroot path
-             # if we don't do this then anaconda likes to not  work.
+         repo_config_age = self.conf.config_file_age
+         
+         for reposdir in self.conf.reposdir:
 -            if os.path.exists(self.conf.installroot+'/'+reposdir):
 -                reposdir = self.conf.installroot + '/' + reposdir
 +            reposdir  = self.conf.getRootedPath(reposdir)
  
              if os.path.isdir(reposdir):
-                 for repofn in sorted(glob.glob('%s/*.repo' % reposdir)):
+                 for repofn in glob.glob('%s/*.repo' % reposdir):
 @@ -664,8 +663,7 @@ class YumBase(depsolve.Depsolve):
          if self.conf.uid != 0:
              return
@@ -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
-@@ -588,6 +588,26 @@
-     syslog_ident = Option()
-     syslog_facility = Option('LOG_DAEMON')
+@@ -469,6 +469,26 @@ class StartupConf(BaseConfig):
+     pluginpath = ListOption(['/usr/share/yum-plugins', '/usr/lib/yum-plugins'])
+     pluginconfpath = ListOption(['/etc/yum/pluginconf.d'])
  
 +    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.
-@@ -601,6 +621,7 @@ class YumConf(StartupConf):
+@@ -482,6 +502,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'])
-
-     commands = ListOption()
-@@ -798,9 +819,9 @@ def readMainConfig(startupconf):
+     syslog_ident = Option()
+     syslog_facility = Option('LOG_DAEMON')
+@@ -615,9 +636,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)
--        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)
+-        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
 --- 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,3 +155,12 @@
              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.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list