From b0bd2f3c58e9769869ff69be57739fcea9d27aed Mon Sep 17 00:00:00 2001 From: James Antill Date: Oct 31 2013 19:37:19 +0000 Subject: Update to latest HEAD. - Mostly backwards compat. change to how distroverpkg config. works. BZ 1002977. --- diff --git a/yum-HEAD.patch b/yum-HEAD.patch index 41e0d41..214cc62 100644 --- a/yum-HEAD.patch +++ b/yum-HEAD.patch @@ -3466,7 +3466,7 @@ index 1a8202a..4720ccd 100644 http://yum.baseurl.org/wiki/Faq yum search yum diff --git a/docs/yum.conf.5 b/docs/yum.conf.5 -index 515aa73..5c73a39 100644 +index 515aa73..5d8578d 100644 --- a/docs/yum.conf.5 +++ b/docs/yum.conf.5 @@ -64,7 +64,7 @@ options are: 'critical', 'emergency', 'error', 'warn' and 'debug'. @@ -3610,7 +3610,23 @@ index 515aa73..5c73a39 100644 \fBinstallroot \fR Specifies an alternative installroot, relative to which all packages will be installed. -@@ -230,7 +291,8 @@ provides this manually by using: "yum whatprovides redhat-release". +@@ -223,14 +284,21 @@ Command-line option: \fB\-\-installroot\fP + + .IP + \fBdistroverpkg\fR +-The package used by yum to determine the "version" of the distribution. This +-can be any installed package. Default is `redhat-release'. You can see what +-provides this manually by using: "yum whatprovides redhat-release". ++The package used by yum to determine the "version" of the distribution, this ++sets $releasever for use in config. files. This ++can be any installed package. Default is `system-release(releasever)', ++`redhat-release'. Yum will now look at the version provided by the provide, ++and if that is non-empty then will use the full V(-R), otherwise it uses the ++version of the package. ++ You can see what provides this manually by using: ++"yum whatprovides 'system-release(releasever)' redhat-release" and you can see ++what $releasever is most easily by using: "yum version". + .IP \fBdiskspacecheck\fR Either `0' or `1'. Set this to `0' to disable the checking for sufficient @@ -3620,7 +3636,7 @@ index 515aa73..5c73a39 100644 .IP \fBtsflags\fR -@@ -291,6 +353,16 @@ the maximum available bandwidth. +@@ -291,6 +359,16 @@ the maximum available bandwidth. Set to `0' to disable bandwidth throttling. This is the default. @@ -3637,7 +3653,7 @@ index 515aa73..5c73a39 100644 .IP \fBbandwidth \fR Use to specify the maximum available network bandwidth in bytes/second. Used -@@ -300,6 +372,41 @@ with the \fBthrottle\fR option (above). If \fBthrottle\fR is a percentage and +@@ -300,6 +378,41 @@ with the \fBthrottle\fR option (above). If \fBthrottle\fR is a percentage and ignored. Default is `0' (no bandwidth throttling). .IP @@ -3679,7 +3695,7 @@ index 515aa73..5c73a39 100644 \fBsslcacert \fR Path to the directory containing the databases of the certificate authorities yum should use to verify SSL certificates. Defaults to none - uses system -@@ -331,6 +438,15 @@ Path to the SSL client key yum should use to connect to repos/remote sites +@@ -331,6 +444,15 @@ Path to the SSL client key yum should use to connect to repos/remote sites Defaults to none. .IP @@ -3695,7 +3711,7 @@ index 515aa73..5c73a39 100644 \fBhistory_record \fR Boolean - should yum record history entries for transactions. This takes some disk space, and some extra time in the transactions. But it allows how to know a -@@ -391,7 +507,9 @@ syslog logging is disabled. Default is `/dev/log'. +@@ -391,7 +513,9 @@ syslog logging is disabled. Default is `/dev/log'. .IP \fBproxy \fR @@ -3706,7 +3722,7 @@ index 515aa73..5c73a39 100644 .IP \fBproxy_username \fR -@@ -438,6 +556,31 @@ It's also possible to use the word "never", meaning that the metadata will +@@ -438,6 +562,31 @@ It's also possible to use the word "never", meaning that the metadata will never expire. Note that when using a metalink file the metalink must always be newer than the metadata for the repository, due to the validation, so this timeout also applies to the metalink file. @@ -3738,7 +3754,7 @@ index 515aa73..5c73a39 100644 .IP \fBmirrorlist_expire \fR -@@ -462,12 +605,12 @@ always did, however it now does some checking on the index and reverts if +@@ -462,12 +611,12 @@ always did, however it now does some checking on the index and reverts if it classifies it as bad. `group:primary' - Download the primary metadata with the index. This contains @@ -3756,7 +3772,7 @@ index 515aa73..5c73a39 100644 `group:main' - With the primary and updateinfo download the filelists metadata and the group metadata. The filelists data is required for operations like -@@ -480,6 +623,19 @@ not listed above is the other metadata, which contains the changelog information +@@ -480,6 +629,19 @@ not listed above is the other metadata, which contains the changelog information which is used by yum-changelog. This is what "yum makecache" uses. .IP @@ -3776,7 +3792,7 @@ index 515aa73..5c73a39 100644 \fBmultilib_policy \fR Can be set to 'all' or 'best'. All means install all possible arches for any package you want to install. Therefore yum install foo will install foo.i386 and foo.x86_64 on x86_64, -@@ -523,6 +679,13 @@ Default is `normal'. +@@ -523,6 +685,13 @@ Default is `normal'. See color_list_installed_older for possible values. .IP @@ -3790,7 +3806,7 @@ index 515aa73..5c73a39 100644 \fBcolor_list_installed_extra \fR The colorization/highlighting for packages in list/info installed which has no available package with the same name and arch. -@@ -558,6 +721,13 @@ Default is `bold,underline,green. +@@ -558,6 +727,13 @@ Default is `bold,underline,green. See color_list_installed_older for possible values. .IP @@ -3804,7 +3820,7 @@ index 515aa73..5c73a39 100644 \fBcolor_search_match \fR The colorization/highlighting for text matches in search. Default is `bold'. -@@ -587,14 +757,98 @@ be downloaded. The updates list is what is printed when you run "yum update", +@@ -587,14 +763,98 @@ be downloaded. The updates list is what is printed when you run "yum update", Default is `normal'. See color_list_installed_older for possible values. @@ -3903,7 +3919,7 @@ index 515aa73..5c73a39 100644 .SH "[repository] OPTIONS" -@@ -668,6 +922,10 @@ value of mirrorlist is copied to metalink (if metalink is not set). +@@ -668,6 +928,10 @@ value of mirrorlist is copied to metalink (if metalink is not set). Either `1' or `0'. This tells yum whether or not use this repository. .IP @@ -3914,7 +3930,7 @@ index 515aa73..5c73a39 100644 \fBgpgcheck\fR Either `1' or `0'. This tells yum whether or not it should perform a GPG signature check on the packages gotten from this repository. -@@ -702,12 +960,18 @@ key will be automatically imported without user confirmation. +@@ -702,12 +966,18 @@ key will be automatically imported without user confirmation. Same as the [main] \fBexclude\fR option but only for this repository. Substitution variables, described below, are honored here. @@ -3937,7 +3953,7 @@ index 515aa73..5c73a39 100644 .IP \fBenablegroups\fR -@@ -755,6 +1019,15 @@ repository. +@@ -755,6 +1025,15 @@ repository. Overrides the \fBbandwidth\fR option from the [main] section for this repository. @@ -3953,7 +3969,7 @@ index 515aa73..5c73a39 100644 .IP \fBsslcacert \fR -@@ -776,6 +1049,10 @@ repository. +@@ -776,6 +1055,10 @@ repository. Overrides the \fBsslclientkey\fR option from the [main] section for this repository. @@ -3964,7 +3980,7 @@ index 515aa73..5c73a39 100644 .IP \fBmetadata_expire \fR -@@ -783,6 +1060,11 @@ Overrides the \fBmetadata_expire\fR option from the [main] section for this +@@ -783,6 +1066,11 @@ Overrides the \fBmetadata_expire\fR option from the [main] section for this repository. .IP @@ -3976,7 +3992,7 @@ index 515aa73..5c73a39 100644 \fBmirrorlist_expire \fR Overrides the \fBmirrorlist_expire\fR option from the [main] section for this repository. -@@ -824,7 +1106,16 @@ as greater/less than any other. defaults to 1000 +@@ -824,7 +1112,16 @@ as greater/less than any other. defaults to 1000 If set to True yum will continue running if this repository cannot be contacted for any reason. This should be set carefully as all repos are consulted for any given command. Defaults to False. @@ -3993,7 +4009,7 @@ index 515aa73..5c73a39 100644 .SH "URL INCLUDE SYNTAX" .LP -@@ -861,8 +1152,8 @@ package. +@@ -861,8 +1158,8 @@ package. .IP \fB$arch\fR @@ -191767,10 +191783,18 @@ index 65f6d5e..706e2a4 100755 print >> sys.stderr, "newcomps.py: No such file:\'%s\'" % sys.argv[1] sys.exit(1) diff --git a/yum/config.py b/yum/config.py -index d09511f..17aa0ca 100644 +index d09511f..1cb4fc5 100644 --- a/yum/config.py +++ b/yum/config.py -@@ -45,15 +45,18 @@ from misc import get_uuid, read_in_items_from_dot_dir +@@ -38,6 +38,7 @@ if not _use_iniparse: + from ConfigParser import NoSectionError, NoOptionError, ParsingError + from ConfigParser import ConfigParser + import rpmUtils.transaction ++import rpmUtils.miscutils + import Errors + import types + from misc import get_uuid, read_in_items_from_dot_dir +@@ -45,15 +46,18 @@ from misc import get_uuid, read_in_items_from_dot_dir # Alter/patch these to change the default checking... __pkgs_gpgcheck_default__ = False __repo_gpgcheck_default__ = False @@ -191793,7 +191817,7 @@ index d09511f..17aa0ca 100644 def __init__(self, default=None, parse_default=False): self._setattrname() -@@ -63,19 +66,19 @@ class Option(object): +@@ -63,19 +67,19 @@ class Option(object): self.default = default def _setattrname(self): @@ -191821,7 +191845,7 @@ index d09511f..17aa0ca 100644 # xemacs highlighting hack: ' if obj is None: return self -@@ -83,12 +86,11 @@ class Option(object): +@@ -83,12 +87,11 @@ class Option(object): return getattr(obj, self._attrname, None) def __set__(self, obj, value): @@ -191838,7 +191862,7 @@ index d09511f..17aa0ca 100644 # Only try to parse if it's a string if isinstance(value, basestring): try: -@@ -100,62 +102,59 @@ class Option(object): +@@ -100,62 +103,59 @@ class Option(object): setattr(obj, self._attrname, value) def setup(self, obj, name): @@ -191927,7 +191951,7 @@ index d09511f..17aa0ca 100644 def __init__(self, default=None, parse_default=False): if default is None: -@@ -163,10 +162,12 @@ class ListOption(Option): +@@ -163,10 +163,12 @@ class ListOption(Option): super(ListOption, self).__init__(default, parse_default) def parse(self, s): @@ -191943,7 +191967,7 @@ index d09511f..17aa0ca 100644 """ # we need to allow for the '\n[whitespace]' continuation - easier # to sub the \n with a space and then read the lines -@@ -183,12 +184,18 @@ class ListOption(Option): +@@ -183,12 +185,18 @@ class ListOption(Option): return results def tostring(self, value): @@ -191965,7 +191989,7 @@ index d09511f..17aa0ca 100644 def __init__(self, default=None, schemes=('http', 'ftp', 'file', 'https'), allow_none=False): -@@ -197,6 +204,13 @@ class UrlOption(Option): +@@ -197,6 +205,13 @@ class UrlOption(Option): self.allow_none = allow_none def parse(self, url): @@ -191979,7 +192003,7 @@ index d09511f..17aa0ca 100644 url = url.strip() # Handle the "_none_" special case -@@ -223,11 +237,18 @@ class UrlOption(Option): +@@ -223,11 +238,18 @@ class UrlOption(Option): else: return '%s or %s' % (', '.join(self.schemes[:-1]), self.schemes[-1]) @@ -192002,7 +192026,7 @@ index d09511f..17aa0ca 100644 def __init__(self, default=None, schemes=('http', 'ftp', 'file', 'https'), parse_default=False): super(UrlListOption, self).__init__(default, parse_default) -@@ -236,6 +257,13 @@ class UrlListOption(ListOption): +@@ -236,6 +258,13 @@ class UrlListOption(ListOption): self._urloption = UrlOption(schemes=schemes) def parse(self, s): @@ -192016,7 +192040,7 @@ index d09511f..17aa0ca 100644 out = [] s = s.replace('\n', ' ') s = s.replace(',', ' ') -@@ -254,10 +282,7 @@ class UrlListOption(ListOption): +@@ -254,10 +283,7 @@ class UrlListOption(ListOption): class IntOption(Option): @@ -192028,7 +192052,7 @@ index d09511f..17aa0ca 100644 def __init__(self, default=None, range_min=None, range_max=None): super(IntOption, self).__init__(default) -@@ -265,6 +290,13 @@ class IntOption(Option): +@@ -265,6 +291,13 @@ class IntOption(Option): self._range_max = range_max def parse(self, s): @@ -192042,17 +192066,17 @@ index d09511f..17aa0ca 100644 try: val = int(s) except (ValueError, TypeError), e: -@@ -276,39 +308,56 @@ class IntOption(Option): +@@ -276,39 +309,56 @@ class IntOption(Option): return val class PositiveIntOption(IntOption): - -- """ -- An option representing a positive integer value, where 0 can have a special -- represention. + """An option representing a positive integer value, where 0 can + have a special representation. """ +- An option representing a positive integer value, where 0 can have a special +- represention. +- """ - def __init__(self, default=None, range_min=0, range_max=None, names_of_0=None): @@ -192113,7 +192137,7 @@ index d09511f..17aa0ca 100644 if len(s) < 1: raise ValueError("no value specified") -@@ -335,14 +384,20 @@ class SecondsOption(Option): +@@ -335,14 +385,20 @@ class SecondsOption(Option): return int(n * mult) class BoolOption(Option): @@ -192139,7 +192163,7 @@ index d09511f..17aa0ca 100644 s = s.lower() if s in ('0', 'no', 'false'): return False -@@ -352,30 +407,49 @@ class BoolOption(Option): +@@ -352,30 +408,49 @@ class BoolOption(Option): raise ValueError('invalid boolean value') def tostring(self, value): @@ -192194,7 +192218,7 @@ index d09511f..17aa0ca 100644 if s in self._mapper: s = self._mapper[s] if s not in self._allowed: -@@ -383,18 +457,21 @@ class SelectionOption(Option): +@@ -383,18 +458,21 @@ class SelectionOption(Option): return s class CaselessSelectionOption(SelectionOption): @@ -192224,7 +192248,7 @@ index d09511f..17aa0ca 100644 """ # Multipliers for unit symbols MULTS = { -@@ -404,20 +481,18 @@ class BytesOption(Option): +@@ -404,20 +482,18 @@ class BytesOption(Option): } def parse(self, s): @@ -192241,11 +192265,11 @@ index d09511f..17aa0ca 100644 - Valid inputs: 100, 123M, 45.6k, 12.4G, 100K, 786.3, 0 - Invalid inputs: -10, -0.1, 45.6L, 123Mb -- -- Return value will always be an integer + Valid inputs: 100, 123M, 45.6k, 12.4G, 100K, 786.3, 0. + Invalid inputs: -10, -0.1, 45.6L, 123Mb. +- Return value will always be an integer +- - 1k = 1024 bytes. - - ValueError will be raised if the option couldn't be parsed. @@ -192255,7 +192279,7 @@ index d09511f..17aa0ca 100644 """ if len(s) < 1: raise ValueError("no value specified") -@@ -443,25 +518,23 @@ class BytesOption(Option): +@@ -443,25 +519,23 @@ class BytesOption(Option): return int(n * mult) class ThrottleOption(BytesOption): @@ -192295,7 +192319,7 @@ index d09511f..17aa0ca 100644 """ if len(s) < 1: raise ValueError("no value specified") -@@ -479,10 +552,9 @@ class ThrottleOption(BytesOption): +@@ -479,10 +553,9 @@ class ThrottleOption(BytesOption): return BytesOption.parse(self, s) class BaseConfig(object): @@ -192309,7 +192333,7 @@ index d09511f..17aa0ca 100644 def __init__(self): self._section = None -@@ -499,13 +571,14 @@ class BaseConfig(object): +@@ -499,13 +572,14 @@ class BaseConfig(object): return '\n'.join(out) def populate(self, parser, section, parent=None): @@ -192330,7 +192354,7 @@ index d09511f..17aa0ca 100644 self.cfg = parser self._section = section -@@ -527,8 +600,19 @@ class BaseConfig(object): +@@ -527,8 +601,19 @@ class BaseConfig(object): setattr(self, name, value) def optionobj(cls, name, exceptions=True): @@ -192352,7 +192376,7 @@ index d09511f..17aa0ca 100644 obj = getattr(cls, name, None) if isinstance(obj, Option): return obj -@@ -539,37 +623,41 @@ class BaseConfig(object): +@@ -539,37 +624,41 @@ class BaseConfig(object): optionobj = classmethod(optionobj) def isoption(cls, name): @@ -192409,7 +192433,7 @@ index d09511f..17aa0ca 100644 # Write section heading if section is None: if self._section is None: -@@ -586,6 +674,14 @@ class BaseConfig(object): +@@ -586,6 +675,14 @@ class BaseConfig(object): self.cfg.write(fileobj) def getConfigOption(self, option, default=None): @@ -192424,7 +192448,7 @@ index d09511f..17aa0ca 100644 warnings.warn('getConfigOption() will go away in a future version of Yum.\n' 'Please access option values as attributes or using getattr().', DeprecationWarning) -@@ -594,6 +690,12 @@ class BaseConfig(object): +@@ -594,6 +691,12 @@ class BaseConfig(object): return default def setConfigOption(self, option, value): @@ -192437,7 +192461,7 @@ index d09511f..17aa0ca 100644 warnings.warn('setConfigOption() will go away in a future version of Yum.\n' 'Please set option values as attributes or using setattr().', DeprecationWarning) -@@ -603,13 +705,12 @@ class BaseConfig(object): +@@ -603,16 +706,15 @@ class BaseConfig(object): raise Errors.ConfigError, 'No such option %s' % option class StartupConf(BaseConfig): @@ -192455,8 +192479,12 @@ index d09511f..17aa0ca 100644 + debuglevel = IntOption(2, -4, 10) errorlevel = IntOption(2, 0, 10) - distroverpkg = Option('redhat-release') -@@ -625,13 +726,13 @@ class StartupConf(BaseConfig): +- distroverpkg = Option('redhat-release') ++ distroverpkg = ListOption(['system-release(releasever)', 'redhat-release']) + installroot = Option('/') + config_file_path = Option('/etc/yum/yum.conf') + plugins = BoolOption(False) +@@ -625,13 +727,13 @@ class StartupConf(BaseConfig): persistdir = Option('/var/lib/yum') class YumConf(StartupConf): @@ -192474,7 +192502,7 @@ index d09511f..17aa0ca 100644 cachedir = Option('/var/cache/yum') -@@ -641,20 +742,24 @@ class YumConf(StartupConf): +@@ -641,20 +743,24 @@ class YumConf(StartupConf): commands = ListOption() exclude = ListOption() @@ -192502,7 +192530,7 @@ index d09511f..17aa0ca 100644 names_of_0=["0", ""]) kernelpkgnames = ListOption(['kernel','kernel-smp', 'kernel-enterprise', 'kernel-bigmem', 'kernel-BOOT', 'kernel-PAE', 'kernel-PAE-debug']) -@@ -664,6 +769,7 @@ class YumConf(StartupConf): +@@ -664,6 +770,7 @@ class YumConf(StartupConf): tsflags = ListOption() assumeyes = BoolOption(False) @@ -192510,7 +192538,7 @@ index d09511f..17aa0ca 100644 alwaysprompt = BoolOption(True) exactarch = BoolOption(True) tolerant = BoolOption(True) -@@ -677,18 +783,33 @@ class YumConf(StartupConf): +@@ -677,18 +784,33 @@ class YumConf(StartupConf): obsoletes = BoolOption(True) showdupesfromrepos = BoolOption(False) enabled = BoolOption(True) @@ -192544,7 +192572,7 @@ index d09511f..17aa0ca 100644 # Time in seconds (1 day). NOTE: This isn't used when using metalinks mirrorlist_expire = SecondsOption(60 * 60 * 24) # XXX rpm_check_debug is unused, left around for API compatibility for now -@@ -697,13 +818,15 @@ class YumConf(StartupConf): +@@ -697,13 +819,15 @@ class YumConf(StartupConf): skip_broken = BoolOption(False) # Note that "instant" is the old behaviour, but group:primary is very # similar but better :). @@ -192563,7 +192591,7 @@ index d09511f..17aa0ca 100644 color = SelectionOption('auto', ('auto', 'never', 'always'), mapper={'on' : 'always', 'yes' : 'always', -@@ -715,22 +838,27 @@ class YumConf(StartupConf): +@@ -715,22 +839,27 @@ class YumConf(StartupConf): color_list_installed_newer = Option('bold,yellow') color_list_installed_reinstall = Option('normal') color_list_installed_extra = Option('bold,red') @@ -192591,7 +192619,7 @@ index d09511f..17aa0ca 100644 history_record = BoolOption(True) history_record_packages = ListOption(['yum', 'rpm']) -@@ -744,18 +872,39 @@ class YumConf(StartupConf): +@@ -744,18 +873,39 @@ class YumConf(StartupConf): loadts_ignoremissing = BoolOption(False) loadts_ignorerpm = BoolOption(False) @@ -192631,7 +192659,7 @@ index d09511f..17aa0ca 100644 output = '[main]\n' # we exclude all vars which start with _ or are in this list: excluded_vars = ('cfg', 'uid', 'yumvar', 'progress_obj', 'failure_obj', -@@ -778,14 +927,12 @@ class YumConf(StartupConf): +@@ -778,14 +928,12 @@ class YumConf(StartupConf): return output class RepoConf(BaseConfig): @@ -192649,7 +192677,7 @@ index d09511f..17aa0ca 100644 ck = self.__cached_keys if not isinstance(self, RepoConf): ck = set() -@@ -797,6 +944,7 @@ class RepoConf(BaseConfig): +@@ -797,6 +945,7 @@ class RepoConf(BaseConfig): name = Option() enabled = Inherit(YumConf.enabled) @@ -192657,7 +192685,7 @@ index d09511f..17aa0ca 100644 baseurl = UrlListOption() mirrorlist = UrlOption() metalink = UrlOption() -@@ -820,42 +968,52 @@ class RepoConf(BaseConfig): +@@ -820,42 +969,52 @@ class RepoConf(BaseConfig): keepalive = Inherit(YumConf.keepalive) enablegroups = Inherit(YumConf.enablegroups) @@ -192721,7 +192749,7 @@ index d09511f..17aa0ca 100644 # ' xemacs syntax hack -@@ -876,20 +1034,24 @@ def readStartupConfig(configfile, root): +@@ -876,20 +1035,24 @@ def readStartupConfig(configfile, root): raise Errors.ConfigError("All plugin search paths must be absolute") # Stuff this here to avoid later re-parsing startupconf._parser = parser @@ -192752,7 +192780,7 @@ index d09511f..17aa0ca 100644 # ' xemacs syntax hack -@@ -956,6 +1118,12 @@ def readMainConfig(startupconf): +@@ -956,6 +1119,12 @@ def readMainConfig(startupconf): return yumconf def readVersionGroupsConfig(configfile="/etc/yum/version-groups.conf"): @@ -192765,7 +192793,7 @@ index d09511f..17aa0ca 100644 parser = ConfigParser() confpp_obj = ConfigPreProcessor(configfile) try: -@@ -970,17 +1138,16 @@ def readVersionGroupsConfig(configfile="/etc/yum/version-groups.conf"): +@@ -970,17 +1139,16 @@ def readVersionGroupsConfig(configfile="/etc/yum/version-groups.conf"): def getOption(conf, section, name, option): @@ -192793,7 +192821,19 @@ index d09511f..17aa0ca 100644 try: val = conf.get(section, name) except (NoSectionError, NoOptionError): -@@ -1028,25 +1195,28 @@ def _getsysver(installroot, distroverpkg): +@@ -1010,7 +1178,10 @@ def _getsysver(installroot, distroverpkg): + ts = rpmUtils.transaction.initReadOnlyTransaction(root=installroot) + ts.pushVSFlags(~(rpm._RPMVSF_NOSIGNATURES|rpm._RPMVSF_NODIGESTS)) + try: +- idx = ts.dbMatch('provides', distroverpkg) ++ for distroverpkg_prov in distroverpkg: ++ idx = ts.dbMatch('provides', distroverpkg_prov) ++ if idx.count(): ++ break + except TypeError, e: + # This is code for "cannot open rpmdb" + # this is for pep 352 compliance on python 2.6 and above :( +@@ -1028,25 +1199,40 @@ def _getsysver(installroot, distroverpkg): if idx.count() == 0: releasever = '$releasever' else: @@ -192803,6 +192843,18 @@ index d09511f..17aa0ca 100644 + except StopIteration: + raise Errors.YumBaseError("Error: rpmdb failed release provides. Try: rpm --rebuilddb") releasever = hdr['version'] ++ ++ off = hdr[getattr(rpm, 'RPMTAG_PROVIDENAME')].index(distroverpkg_prov) ++ flag = hdr[getattr(rpm, 'RPMTAG_PROVIDEFLAGS')][off] ++ flag = rpmUtils.miscutils.flagToString(flag) ++ ver = hdr[getattr(rpm, 'RPMTAG_PROVIDEVERSION')][off] ++ if flag == 'EQ' and ver: ++ releasever = rpmUtils.miscutils.stringToVersion(releasever) ++ if releasever[2]: ++ releasever = "%s-%s" % (releasever[1], releasever[2]) # No epoch ++ else: ++ releasever = releasever[1] # No epoch or release, just version ++ del hdr del idx del ts @@ -192833,7 +192885,7 @@ index d09511f..17aa0ca 100644 # b/c repoids can have $values in them we need to map both ways to figure # out which one is which section_id = repo.id -@@ -1054,6 +1224,19 @@ def writeRawRepoFile(repo,only=None): +@@ -1054,6 +1240,19 @@ def writeRawRepoFile(repo,only=None): for sect in ini._sections.keys(): if varReplace(sect, repo.yumvar) == repo.id: section_id = sect @@ -192853,7 +192905,7 @@ index d09511f..17aa0ca 100644 # Updated the ConfigParser with the changed values cfgOptions = repo.cfg.options(repo.id) -@@ -1069,7 +1252,7 @@ def writeRawRepoFile(repo,only=None): +@@ -1069,7 +1268,7 @@ def writeRawRepoFile(repo,only=None): # If the value is the same, but just interpreted ... when we don't want # to keep the interpreted values. if (name in ini[section_id] and diff --git a/yum.spec b/yum.spec index 3be63f7..45f1355 100644 --- a/yum.spec +++ b/yum.spec @@ -48,7 +48,7 @@ BuildRequires: bash-completion Summary: RPM package installer/updater/manager Name: yum Version: 3.4.3 -Release: 112%{?dist} +Release: 113%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz @@ -429,6 +429,10 @@ exit 0 %endif %changelog +* Thu Oct 31 2013 James Antill - 3.4.3-113 +- Update to latest HEAD. +- Mostly backwards compat. change to how distroverpkg config. works. BZ 1002977. + * Wed Oct 30 2013 James Antill - 3.4.3-112 - Update to latest HEAD. - Actually run the groups update config. when not in objects mode. BZ 1002439.