From ba31af680e74319e8269d17aff4fe55cdd2fc4c3 Mon Sep 17 00:00:00 2001 From: Zdenek Pavlas Date: Feb 06 2013 09:26:53 +0000 Subject: Update to latest HEAD --- diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch index bb499ec..6e01019 100644 --- a/yum-utils-HEAD.patch +++ b/yum-utils-HEAD.patch @@ -621,6 +621,26 @@ index 7e260b0..9c8dbf3 100644 +The update-minimal command can only directly affect things atm., so if you update pkgA minimally but that requires an update to pkgB then pkgB will be updated to the newest version by the depsolver. Also the above will happen even if you've also minimally updated pkgB, if either the direct (minimal) update for pkgB happens after or if the minimal update for pkgB doesn't satisfy the requirements of pkgA. The main "problem" is that if the data is not correct the plugin cannot work correctly. For instance "--bz 123" will not fix BZ 123 if a package is updated to fix that BZ without referencing that it does so in the updateinfo.xml. +diff --git a/docs/yum-utils.1 b/docs/yum-utils.1 +index fa830b6..fdfbe24 100644 +--- a/docs/yum-utils.1 ++++ b/docs/yum-utils.1 +@@ -15,6 +15,7 @@ yum\-utils \- tools for manipulating repositories and extended package managemen + \fBrepoquery\fR \- query yum repositories and get additional information on the them + \fBreposync\fR \- synchronize a remote yum repository to a local directory using yum to retrieve packages + \fBrepotrack\fR \- track packages and its dependencies and downloads them ++\fBshow-changed-rco\fR \- list of changes to a package Requires, Conflicts and Obsoletes data from installed to a specified rpm file + \fBshow-installed\fR \- gives a compact description of packages installed and makes use of comps groups in repositories + \fBverifytree\fR - verify that a local yum repository is consistent + \fByum\-builddep\fR \- installs missing dependencies to build a specified package +@@ -32,6 +33,6 @@ is a collection of tools and programs for managing yum repositories, installing + .SH "NOTES" + See respective tools for additional help for commands without a manual page + .SH "SEE ALSO" +-debuginfo\-install(1), package\-cleanup(1), repodiff(1), repoquery(1), reposync(1), repo\-rss(1), yumdownloader(1), yum\-builddep(1), yum\-debug\-dump(1), yum\-groups\-manager(1), yumdb(8), yum\-complete\-transaction(8) ++debuginfo\-install(1), package\-cleanup(1), repodiff(1), repoquery(1), reposync(1), repo\-rss(1), show\-changed\-rco(1), show\-installed(1), yumdownloader(1), yum\-builddep(1), yum\-debug\-dump(1), yum\-groups\-manager(1), yumdb(8), yum\-complete\-transaction(8) + .SH "AUTHOR" + Shawn Starr diff --git a/docs/yum-verify.1 b/docs/yum-verify.1 index 706c38e..50ede75 100644 --- a/docs/yum-verify.1 @@ -1436,7 +1456,7 @@ index ff77e0d..bef3b03 100755 # (c) Copyright Seth Vidal 2004 diff --git a/repoquery.py b/repoquery.py -index a3bb111..a854c23 100755 +index a3bb111..45c6826 100755 --- a/repoquery.py +++ b/repoquery.py @@ -8,11 +8,11 @@ @@ -1528,7 +1548,16 @@ index a3bb111..a854c23 100755 __req2pkgs = {} def req2pkgs(ignore, req): req = str(req) -@@ -413,14 +432,9 @@ class pkgQuery: +@@ -406,6 +425,8 @@ class pkgQuery: + providers = matches.keys() + + ++ except yum.Errors.RepoError: ++ raise + except yum.Errors.YumBaseError, err: + print >>sys.stderr, "No package provides %s" % req + return [] +@@ -413,14 +434,9 @@ class pkgQuery: __req2pkgs[req] = providers return providers @@ -1544,7 +1573,7 @@ index a3bb111..a854c23 100755 dot.addPackage(pkg, rpkgs) lim = level + 2 nlevel = level + 1 -@@ -449,6 +463,7 @@ class pkgQuery: +@@ -449,6 +465,7 @@ class pkgQuery: def fmt_tree_obsoletes(self, **kw): pkg = kw.get('pkg', self.pkg) @@ -1552,7 +1581,7 @@ index a3bb111..a854c23 100755 level = kw.get('level', 0) all_reqs = kw.get('all_reqs', {}) -@@ -457,6 +472,7 @@ class pkgQuery: +@@ -457,6 +474,7 @@ class pkgQuery: kw['dot'] = DotPlot() elif 'dot' not in kw.keys() or kw['dot'] is None: kw['dot'] = None @@ -1560,7 +1589,7 @@ index a3bb111..a854c23 100755 if str(kw['tree_level']).lower() != 'all': try: -@@ -467,6 +483,15 @@ class pkgQuery: +@@ -467,6 +485,15 @@ class pkgQuery: if not 'output' in kw.keys(): kw['output'] = 'ascii-tree' @@ -1576,7 +1605,7 @@ index a3bb111..a854c23 100755 def obs2pkgs(): if self.yb is None: return [] -@@ -496,10 +521,7 @@ class pkgQuery: +@@ -496,10 +523,7 @@ class pkgQuery: else: reason = 'cmd line' rpkgs = obs2pkgs() @@ -1588,7 +1617,7 @@ index a3bb111..a854c23 100755 dot.addPackage(pkg, rpkgs) lim = level + 2 all_reqs[pkg] = None -@@ -514,6 +536,7 @@ class pkgQuery: +@@ -514,6 +538,7 @@ class pkgQuery: self._tree_print_req(rpkg, '', nlevel) continue self.fmt_tree_obsoletes(pkg=rpkg, level=nlevel, all_reqs=all_reqs, @@ -1596,7 +1625,7 @@ index a3bb111..a854c23 100755 tree_level = kw['tree_level'], output = kw['output'], dot = dot) -@@ -527,6 +550,7 @@ class pkgQuery: +@@ -527,6 +552,7 @@ class pkgQuery: if kw['output'].lower() == 'dot-tree': if 'dot' not in kw.keys() or kw['dot'] is None: kw['dot'] = DotPlot() @@ -1604,7 +1633,7 @@ index a3bb111..a854c23 100755 if str(kw['tree_level']).lower() != 'all': try: -@@ -537,6 +561,15 @@ class pkgQuery: +@@ -537,6 +563,15 @@ class pkgQuery: if not 'output' in kw.keys(): kw['output'] = 'ascii-tree' @@ -1620,7 +1649,16 @@ index a3bb111..a854c23 100755 __prov2pkgs = {} def prov2pkgs(prov, ignore): if str(prov) in __prov2pkgs: -@@ -575,12 +608,8 @@ class pkgQuery: +@@ -562,6 +597,8 @@ class pkgQuery: + arequirers = [pkg for pkg in areqs + if pkg.pkgtup not in skip] + ++ except yum.Errors.RepoError: ++ raise + except yum.Errors.YumBaseError, err: + print >>sys.stderr, "No package provides %s" % str(prov) + return [] +@@ -575,12 +612,8 @@ class pkgQuery: tups = pkg.provides + filetupes rpkgs, loc_reqs = self._tree_maybe_add_pkgs(all_reqs, tups, prov2pkgs) @@ -1634,7 +1672,7 @@ index a3bb111..a854c23 100755 dot.addPackage(pkg, rpkgs) lim = level + 2 nlevel = level + 1 -@@ -719,13 +748,13 @@ class groupQuery: +@@ -719,13 +752,13 @@ class groupQuery: raise queryError("Invalid group query: %s" % method) # XXX temporary hack to make --group -a query work @@ -1651,7 +1689,7 @@ index a3bb111..a854c23 100755 pkgs = [] for t in self.grouppkgs.split(','): if t == "mandatory": -@@ -741,10 +770,10 @@ class groupQuery: +@@ -741,10 +774,10 @@ class groupQuery: return pkgs @@ -1664,7 +1702,7 @@ index a3bb111..a854c23 100755 return ["%s:\n\n%s\n" % (self.name, self.group.description)] -@@ -826,6 +855,8 @@ class YumBaseQuery(yum.YumBase): +@@ -826,6 +859,8 @@ class YumBaseQuery(yum.YumBase): pkgs = self.pkgSack.returnNewestByNameArch(**kwargs) except yum.Errors.PackageSackError: pkgs = [] @@ -1673,7 +1711,16 @@ index a3bb111..a854c23 100755 else: what = self.options.pkgnarrow ygh = self.doPackageLists(what, **kwargs) -@@ -1008,12 +1039,12 @@ class YumBaseQuery(yum.YumBase): +@@ -848,6 +883,8 @@ class YumBaseQuery(yum.YumBase): + matches = yum.YumBase.searchPackageProvides(self, [str(depstring)]) + provider = matches.keys() + # provider.extend(yum.YumBase.returnPackagesByDep(self, depstring)) ++ except yum.Errors.RepoError: ++ raise + except yum.Errors.YumBaseError, err: + self.logger.error("No package provides %s" % depstring) + return self.queryPkgFactory(provider) +@@ -1008,12 +1045,12 @@ class YumBaseQuery(yum.YumBase): def fmt_whatrequires(self, name, **kw): pkgs = {} @@ -1688,7 +1735,7 @@ index a3bb111..a854c23 100755 provs = [name] -@@ -1054,10 +1085,21 @@ class YumBaseQuery(yum.YumBase): +@@ -1054,10 +1091,21 @@ class YumBaseQuery(yum.YumBase): def fmt_requires(self, name, **kw): pkgs = {} @@ -1711,7 +1758,7 @@ index a3bb111..a854c23 100755 return pkgs.values() def fmt_location(self, name): -@@ -1070,6 +1112,44 @@ class YumBaseQuery(yum.YumBase): +@@ -1070,6 +1118,44 @@ class YumBaseQuery(yum.YumBase): loc.append("%s/%s" % (repo.urls[0], pkg['relativepath'])) return loc @@ -1756,7 +1803,7 @@ index a3bb111..a854c23 100755 def main(args): -@@ -1198,6 +1278,9 @@ def main(args): +@@ -1198,6 +1284,9 @@ def main(args): parser.add_option("--search-fields", action="append", dest="searchfields", default=[], help="search fields to search using --search") @@ -1766,7 +1813,7 @@ index a3bb111..a854c23 100755 (opts, regexs) = parser.parse_args() -@@ -1261,9 +1344,10 @@ def main(args): +@@ -1261,9 +1350,10 @@ def main(args): if opts.srpm: needsource = 1 if opts.whatrequires: @@ -1778,7 +1825,7 @@ index a3bb111..a854c23 100755 if opts.whatprovides: sackops.append("whatprovides") if opts.whatobsoletes: -@@ -1303,6 +1387,13 @@ def main(args): +@@ -1303,6 +1393,13 @@ def main(args): repoq = YumBaseQuery(pkgops, sackops, opts) @@ -1792,7 +1839,7 @@ index a3bb111..a854c23 100755 # silence initialisation junk from modules etc unless verbose mode initnoise = (not opts.quiet) * 2 repoq.preconf.releasever = opts.releasever -@@ -1314,6 +1405,20 @@ def main(args): +@@ -1314,6 +1411,20 @@ def main(args): repoq.preconf.init_plugins = opts.plugins repoq.conf @@ -1813,6 +1860,22 @@ index a3bb111..a854c23 100755 if opts.repofrompath: # setup the fake repos for repo in opts.repofrompath: +@@ -1396,10 +1507,15 @@ def main(args): + except (yum.Errors.RepoError, yum.Errors.GroupsError), e: + repoq.logger.error(e) + sys.exit(1) ++ + try: + repoq.runQuery(regexs) ++ except yum.Errors.RepoError, e: ++ repoq.logger.error(e) ++ sys.exit(1) + except queryError, e: + repoq.logger.error(e) ++ sys.exit(1) + + if __name__ == "__main__": + misc.setup_locale() diff --git a/reposync.py b/reposync.py index 7950854..a749973 100755 --- a/reposync.py @@ -2293,6 +2356,19 @@ index c5074ab..b61df9c 100755 VERSION = '1.0' USAGE = """ yum-complete-transaction: completes unfinished yum transactions which occur due to error, failure +diff --git a/yum-config-manager.py b/yum-config-manager.py +index 50f5123..aed64a2 100755 +--- a/yum-config-manager.py ++++ b/yum-config-manager.py +@@ -153,7 +153,7 @@ if (not args and not opts.addrepo) or 'main' in args: + ybc = yb.conf + writeRawConfigFile(fn, 'main', ybc.yumvar, + ybc.cfg.options, ybc.iteritems, ybc.optionobj, +- only) ++ only=yb.main_setopts.items) + + if opts.enable or opts.disable: + opts.save = True diff --git a/yum-debug-dump.py b/yum-debug-dump.py index 4653f3c..67d943f 100755 --- a/yum-debug-dump.py diff --git a/yum-utils.spec b/yum-utils.spec index 569cb5b..8df6c68 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -10,7 +10,7 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.31 -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz @@ -677,7 +677,11 @@ fi %{pluginhome}/puppetverify.* %changelog -* Wed Nov 21 2013 Zdenek Pavlas - 1.1.31-9 +* Wed Feb 6 2013 Zdenek Pavlas - 1.1.31-10 +- Update to latest HEAD +- Small fixes in documentation and error handling + +* Mon Jan 14 2013 Zdenek Pavlas - 1.1.31-9 - Update to latest HEAD. - Added pluginhome %define to get rid of hardcoded paths - Fix yum-NetworkManager-dispatcher description, BZ 894729