X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?p=util-vserver.git;a=blobdiff_plain;f=contrib%2Fyum-3.2.19-chroot.patch;fp=contrib%2Fyum-3.2.19-chroot.patch;h=b07a670b4e36adaf3b45b423b66b4286926df117;hp=0e638d3d5f1fd56c1b5c43ec015c874e29b47d0c;hb=bd2cb0a372e7c3f7496654a3c946ddff90209816;hpb=91365cf6f8d78ceddb70c8663c3982b3fcbca1c7 diff --git a/contrib/yum-3.2.19-chroot.patch b/contrib/yum-3.2.19-chroot.patch index 0e638d3..b07a670 100644 --- a/contrib/yum-3.2.19-chroot.patch +++ b/contrib/yum-3.2.19-chroot.patch @@ -72,13 +72,12 @@ diff -Nurp yum-3.2.19.orig/docs/yum.conf.5 yum-3.2.19/docs/yum.conf.5 Either `1' or `0'. This tells yum whether or not it should perform a GPG diff -Nurp yum-3.2.19.orig/yum/config.py yum-3.2.19/yum/config.py --- yum-3.2.19.orig/yum/config.py 2008-08-19 21:31:11.000000000 +0200 -+++ yum-3.2.19/yum/config.py 2008-09-29 02:50:49.000000000 +0200 -@@ -588,6 +588,27 @@ class StartupConf(BaseConfig): ++++ yum-3.2.19/yum/config.py 2008-09-29 03:14:07.000000000 +0200 +@@ -588,6 +588,26 @@ class StartupConf(BaseConfig): syslog_ident = Option() syslog_facility = Option('LOG_DAEMON') -+ def getRootedPath(self, option, enforce_default=False, defaults_to_host=False): -+ path = getattr(self, option) ++ def getRootedPath(self, path, enforce_default=False, defaults_to_host=False): + instroot = getattr(self, 'installroot', None) + if instroot==None: + return path @@ -101,7 +100,7 @@ diff -Nurp yum-3.2.19.orig/yum/config.py yum-3.2.19/yum/config.py class YumConf(StartupConf): ''' Configuration option definitions for yum.conf\'s [main] section. -@@ -601,6 +622,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') @@ -109,15 +108,15 @@ diff -Nurp yum-3.2.19.orig/yum/config.py yum-3.2.19/yum/config.py reposdir = ListOption(['/etc/yum/repos.d', '/etc/yum.repos.d']) commands = ListOption() -@@ -757,9 +779,8 @@ def readMainConfig(startupconf): +@@ -757,9 +778,9 @@ def readMainConfig(startupconf): yumconf.populate(startupconf._parser, 'main') # Apply the installroot to directory options - for option in ('cachedir', 'logfile', 'persistdir'): -- path = getattr(yumconf, option) -- setattr(yumconf, option, yumconf.installroot + path) + for option in ('cachedir', 'logfile', 'lockfile'): -+ setattr(yumconf, option, yumconf.getRootedPath(option)) + 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 @@ -151,13 +150,14 @@ diff -Nurp yum-3.2.19.orig/yum/__init__.py yum-3.2.19/yum/__init__.py fd = open(lockfile, 'r') diff -Nurp yum-3.2.19.orig/yum/rpmtrans.py yum-3.2.19/yum/rpmtrans.py --- yum-3.2.19.orig/yum/rpmtrans.py 2008-08-26 21:40:17.000000000 +0200 -+++ yum-3.2.19/yum/rpmtrans.py 2008-09-29 02:50:21.000000000 +0200 -@@ -227,7 +227,7 @@ class RPMTransaction: ++++ yum-3.2.19/yum/rpmtrans.py 2008-09-29 03:14:14.000000000 +0200 +@@ -227,7 +227,8 @@ class RPMTransaction: if not hasattr(self, '_ts_done'): # need config variable to put this in a better path/name - te_fn = '%s/transaction-done.%s' % (self.base.conf.persistdir, self._ts_time) -+ te_fn = '%s/transaction-done.%s' % (self.base.conf.getRootedPath('persistdir'), self._ts_time) ++ te_fn = '%s/transaction-done.%s' % ( ++ self.base.conf.getRootedPath(self.base.conf.persistdir), self._ts_time) self.ts_done_fn = te_fn try: self._ts_done = open(te_fn, 'w')