diff --git a/yum-HEAD.patch b/yum-HEAD.patch index 6b3b7f7..bfb879f 100644 --- a/yum-HEAD.patch +++ b/yum-HEAD.patch @@ -2573,7 +2573,7 @@ index be6bda2..de777a6 100644 class DepError(YumBaseError): pass diff --git a/yum/__init__.py b/yum/__init__.py -index 65b2d65..d2ea312 100644 +index 65b2d65..a5e6cb3 100644 --- a/yum/__init__.py +++ b/yum/__init__.py @@ -54,7 +54,7 @@ import transactioninfo @@ -2629,7 +2629,7 @@ index 65b2d65..d2ea312 100644 self.conf.cache = cache def doConfigSetup(self, fn='/etc/yum/yum.conf', root='/', init_plugins=True, -@@ -134,38 +153,44 @@ class YumBase(depsolve.Depsolve): +@@ -134,38 +153,54 @@ class YumBase(depsolve.Depsolve): errorlevel=None): warnings.warn(_('doConfigSetup() will go away in a future version of Yum.\n'), Errors.YumFutureDeprecationWarning, stacklevel=2) @@ -2652,7 +2652,7 @@ index 65b2d65..d2ea312 100644 - def _getConfig(self, fn='/etc/yum/yum.conf', root='/', init_plugins=True, - plugin_types=(plugins.TYPE_CORE,), optparser=None, debuglevel=None, - errorlevel=None,disabled_plugins=None,enabled_plugins=None): -+ def _getConfig(self): ++ def _getConfig(self, **kwargs): ''' Parse and load Yum's configuration files and call hooks initialise - plugins and logging. @@ -2676,10 +2676,20 @@ index 65b2d65..d2ea312 100644 # ' xemacs syntax hack ++ if kwargs: ++ warnings.warn('Use .preconf instead of passing args to _getConfig') ++ if self._conf: return self._conf conf_st = time.time() + ++ if kwargs: ++ for arg in ('fn', 'root', 'init_plugins', 'plugin_types', ++ 'optparser', 'debuglevel', 'errorlevel', ++ 'disabled_plugins', 'enabled_plugins'): ++ if arg in kwargs: ++ setattr(self.preconf, arg, kwargs[arg]) ++ + fn = self.preconf.fn + root = self.preconf.root + init_plugins = self.preconf.init_plugins @@ -2697,7 +2707,7 @@ index 65b2d65..d2ea312 100644 # TODO: Remove this block when we no longer support configs outside # of /etc/yum/ if fn == '/etc/yum/yum.conf' and not os.path.exists(fn): -@@ -293,7 +318,7 @@ class YumBase(depsolve.Depsolve): +@@ -293,7 +328,7 @@ class YumBase(depsolve.Depsolve): reposdir = self.conf.installroot + '/' + reposdir if os.path.isdir(reposdir): @@ -2706,7 +2716,7 @@ index 65b2d65..d2ea312 100644 thisrepo_age = os.stat(repofn)[8] if thisrepo_age < repo_config_age: thisrepo_age = repo_config_age -@@ -392,7 +417,7 @@ class YumBase(depsolve.Depsolve): +@@ -392,7 +427,7 @@ class YumBase(depsolve.Depsolve): def _getRepos(self, thisrepo=None, doSetup = False): """ For each enabled repository set up the basics of the repository. """ @@ -2715,7 +2725,7 @@ index 65b2d65..d2ea312 100644 if doSetup: repo_st = time.time() -@@ -493,7 +518,7 @@ class YumBase(depsolve.Depsolve): +@@ -493,7 +528,7 @@ class YumBase(depsolve.Depsolve): if self.conf.obsoletes: obs_init = time.time() @@ -2724,7 +2734,7 @@ index 65b2d65..d2ea312 100644 self.verbose_logger.debug('up:Obs Init time: %0.3f' % (time.time() - obs_init)) self._up.exactarch = self.conf.exactarch -@@ -917,11 +942,10 @@ class YumBase(depsolve.Depsolve): +@@ -917,11 +952,10 @@ class YumBase(depsolve.Depsolve): for i in ('ts_all_fn', 'ts_done_fn'): if hasattr(cb, i): fn = getattr(cb, i) @@ -2740,7 +2750,7 @@ index 65b2d65..d2ea312 100644 self.plugins.run('posttrans') return resultobject -@@ -1068,11 +1092,11 @@ class YumBase(depsolve.Depsolve): +@@ -1068,11 +1102,11 @@ class YumBase(depsolve.Depsolve): else: # Whoa. What the heck happened? msg = _('Unable to check if PID %s is active') % oldpid @@ -2754,7 +2764,7 @@ index 65b2d65..d2ea312 100644 # We've got the lock, store it so we can auto-unlock on __del__... self._lockfile = lockfile -@@ -1109,11 +1133,7 @@ class YumBase(depsolve.Depsolve): +@@ -1109,11 +1143,7 @@ class YumBase(depsolve.Depsolve): return 1 def _unlock(self, filename): @@ -2767,7 +2777,7 @@ index 65b2d65..d2ea312 100644 def verifyPkg(self, fo, po, raiseError): """verifies the package is what we expect it to be -@@ -1232,10 +1252,10 @@ class YumBase(depsolve.Depsolve): +@@ -1232,10 +1262,10 @@ class YumBase(depsolve.Depsolve): # Recheck if the file is there, works around a couple of weird # edge cases. local = po.localPkg() @@ -2779,7 +2789,7 @@ index 65b2d65..d2ea312 100644 remote_size -= po.size if hasattr(urlgrabber.progress, 'text_meter_total_size'): urlgrabber.progress.text_meter_total_size(remote_size, -@@ -1244,7 +1264,6 @@ class YumBase(depsolve.Depsolve): +@@ -1244,7 +1274,6 @@ class YumBase(depsolve.Depsolve): if os.path.getsize(local) >= po.size: os.unlink(local) @@ -2787,7 +2797,16 @@ index 65b2d65..d2ea312 100644 checkfunc = (self.verifyPkg, (po, 1), {}) dirstat = os.statvfs(po.repo.pkgdir) if (dirstat.f_bavail * dirstat.f_bsize) <= long(po.size): -@@ -1325,10 +1344,7 @@ class YumBase(depsolve.Depsolve): +@@ -1278,7 +1307,7 @@ class YumBase(depsolve.Depsolve): + if errors.has_key(po): + del errors[po] + +- if callback_total is not None: ++ if callback_total is not None and not errors: + callback_total(remote_pkgs, remote_size, beg_download) + + self.plugins.run('postdownload', pkglist=pkglist, errors=errors) +@@ -1325,10 +1354,7 @@ class YumBase(depsolve.Depsolve): except URLGrabError, e: # might add a check for length of file - if it is < # required doing a reget @@ -2799,7 +2818,7 @@ index 65b2d65..d2ea312 100644 else: po.hdrpath = local return -@@ -1349,11 +1365,11 @@ class YumBase(depsolve.Depsolve): +@@ -1349,11 +1375,11 @@ class YumBase(depsolve.Depsolve): except Errors.RepoError, e: saved_repo_error = e try: @@ -2813,7 +2832,7 @@ index 65b2d65..d2ea312 100644 else: po.hdrpath = hdrpath return -@@ -1442,7 +1458,7 @@ class YumBase(depsolve.Depsolve): +@@ -1442,7 +1468,7 @@ class YumBase(depsolve.Depsolve): if not os.path.exists(fn): continue try: @@ -2822,7 +2841,7 @@ index 65b2d65..d2ea312 100644 except OSError, e: self.logger.warning(_('Cannot remove %s'), fn) continue -@@ -1483,7 +1499,7 @@ class YumBase(depsolve.Depsolve): +@@ -1483,7 +1509,7 @@ class YumBase(depsolve.Depsolve): for item in filelist: try: @@ -2831,7 +2850,7 @@ index 65b2d65..d2ea312 100644 except OSError, e: self.logger.critical(_('Cannot remove %s file %s'), filetype, item) continue -@@ -2260,36 +2276,8 @@ class YumBase(depsolve.Depsolve): +@@ -2260,36 +2286,8 @@ class YumBase(depsolve.Depsolve): if len(pkglist) == 1: return pkglist[0] @@ -2870,7 +2889,7 @@ index 65b2d65..d2ea312 100644 def bestPackagesFromList(self, pkglist, arch=None, single_name=False): """Takes a list of packages, returns the best packages. -@@ -2813,10 +2801,11 @@ class YumBase(depsolve.Depsolve): +@@ -2813,10 +2811,11 @@ class YumBase(depsolve.Depsolve): # it to of what is installed. in the meantime name.arch is # most likely correct pot_updated = self.rpmdb.searchNevra(name=available_pkg.name, arch=available_pkg.arch) @@ -2886,6 +2905,25 @@ index 65b2d65..d2ea312 100644 if self.tsInfo.isObsoleted(ipkg.pkgtup): self.verbose_logger.log(logginglevels.DEBUG_2, _('Not Updating Package that is already obsoleted: %s.%s %s:%s-%s'), ipkg.pkgtup) +diff --git a/yum/config.py b/yum/config.py +index 2219605..ae7b2f9 100644 +--- a/yum/config.py ++++ b/yum/config.py +@@ -650,11 +650,9 @@ class YumConf(StartupConf): + throttle = ThrottleOption(0) + + http_caching = SelectionOption('all', ('none', 'packages', 'all')) +- # Time in seconds (1.5h), yum-updatesd runs once per. hour by default +- # this time means we don't do interactive network checks/updates if +- # yum-updatesd is running. +- metadata_expire = SecondsOption(60 * 90) +- mirrorlist_expire = SecondsOption(86400) # time in seconds (1 day) ++ metadata_expire = SecondsOption(60 * 60 * 6) # Time in seconds (6h). ++ # Time in seconds (1 day). NOTE: This isn't used when using metalinks ++ mirrorlist_expire = SecondsOption(60 * 60 * 24) + rpm_check_debug = BoolOption(True) + disable_excludes = ListOption() + skip_broken = BoolOption(False) diff --git a/yum/constants.py b/yum/constants.py index c6de596..e4dd184 100644 --- a/yum/constants.py diff --git a/yum.spec b/yum.spec index 071e6b5..217e88d 100644 --- a/yum.spec +++ b/yum.spec @@ -3,7 +3,7 @@ Summary: RPM installer/updater Name: yum Version: 3.2.21 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.2/%{name}-%{version}.tar.gz