packages: yum/yum-chroot.patch - Update patch for 3.2.28

caleb caleb at pld-linux.org
Fri Oct 22 22:43:00 CEST 2010


Author: caleb                        Date: Fri Oct 22 20:43:00 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- Update patch for 3.2.28

---- Files affected:
packages/yum:
   yum-chroot.patch (1.14 -> 1.15) 

---- Diffs:

================================================================
Index: packages/yum/yum-chroot.patch
diff -u packages/yum/yum-chroot.patch:1.14 packages/yum/yum-chroot.patch:1.15
--- packages/yum/yum-chroot.patch:1.14	Wed Feb  3 01:29:56 2010
+++ packages/yum/yum-chroot.patch	Fri Oct 22 22:42:55 2010
@@ -68,59 +68,62 @@
  
  .IP
  \fBgpgcheck\fR
---- yum-3.2.25/yum/config.py~	2009-11-18 13:34:24.000000000 +0200
-+++ yum-3.2.25/yum/config.py	2009-11-18 13:34:59.641984903 +0200
-@@ -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)
-+        if instroot==None:
-+            return path
+--- yum-3.2.28/yum/config.py.orig	2010-10-22 23:32:03.308652799 +0300
++++ yum-3.2.28/yum/config.py	2010-10-22 23:39:08.235319466 +0300
+@@ -623,6 +623,27 @@
+     syslog_facility = Option('LOG_USER')
+     syslog_device = Option('/dev/log')
+     persistdir = Option('/var/lib/yum')
 +
-+        if   path.startswith('hostfs://'):   res = path[9:]
-+        elif path.startswith('chrootfs://'): res = instroot + '/' + path[11:]
-+        else:
-+            tmp = instroot + '/' + path
++def getRootedPath(self, path, enforce_default=False, defaults_to_host=False):
++	instroot = getattr(self, 'installroot', None)
++	if instroot==None:
++		return path
 +
-+            if enforce_default:
-+                if defaults_to_host:    res = path
-+                else:                   res = tmp
-+            else:
-+                if os.path.exists(tmp): res = tmp
-+                elif defaults_to_host:  res = path
-+                else:                   res = tmp
++	if   path.startswith('hostfs://'):   res = path[9:]
++	elif path.startswith('chrootfs://'): res = instroot + '/' + path[11:]
++	else:
++		tmp = instroot + '/' + path
 +
-+        return res
++		if enforce_default:
++			if defaults_to_host:    res = path
++			else:                   res = tmp
++		else:
++			if os.path.exists(tmp): res = tmp
++			elif defaults_to_host:  res = path
++			else:                   res = tmp
 +
++	return res
++
+     
  class YumConf(StartupConf):
      '''
-     Configuration option definitions for yum.conf\'s [main] section.
-@@ -601,6 +621,7 @@
-     persistdir = Option('/var/lib/yum')
+@@ -637,6 +658,7 @@
+ 
      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()
-@@ -850,13 +850,13 @@
-     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
+@@ -892,7 +914,7 @@
          ir_path = ir_path.replace('//', '/') # os.path.normpath won't fix this and
                                               # it annoys me
          ir_path = varReplace(ir_path, yumvars)
 -        setattr(yumconf, option, ir_path)
-+        setattr(yumconf, option, yumconf.getRootedPath(path))
++        setattr(yumconf, yumconf.getRootedPath(path))
      
+     # Read the FS yumvars
+     try:
+@@ -912,7 +934,7 @@
+         yumvars[fsvar] = val
+ 
+     # These can use the above FS yumvars
+-    for option in ('cachedir', 'logfile', 'persistdir'):
++    for option in ('cachedir', 'logfile', 'persistdir', 'lockfile'):
+         _apply_installroot(yumconf, option)
+ 
      # Add in some extra attributes which aren't actually configuration values 
-     yumconf.yumvar = yumvars
 --- yum-3.2.23.orig/yum/__init__.py	2009-05-19 21:53:48.000000000 +0200
 +++ yum-3.2.23/yum/__init__.py	2009-08-06 00:36:19.980910237 +0200
 @@ -341,8 +341,7 @@
================================================================

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



More information about the pld-cvs-commit mailing list