From 3694fd4bccca2b3ba446e3f8371b8306c16a4022 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 17 Feb 2010 03:35:18 +0000 Subject: [PATCH 01/86] Initialize branch F-13 for yum-utils --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..baa94ef --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-13 From bd451465df847d0c637f301f9b36e8f85c1c7bfa Mon Sep 17 00:00:00 2001 From: James Antill Date: Wed, 14 Apr 2010 16:45:49 +0000 Subject: [PATCH 02/86] - Get lots of fixes from latest HEAD. Also: - --alldeps default in repoquery. - repoquery will now do a full provides version check. - Add repoclosure --group. - Big repodiff speedup. --- yum-utils.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/yum-utils.spec b/yum-utils.spec index 307a4e8..79614bd 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,10 +1,11 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.26 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz +Patch0: yum-utils-HEAD.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -365,6 +366,8 @@ filesystem that is touched by the packages in a yum update or yum remove. %prep %setup -q +%patch0 -p1 + %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -619,6 +622,13 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog +* Wed Apr 14 2010 James Antill - 1.1.26-2 +- Get lots of fixes from latest HEAD. Also: +- --alldeps default in repoquery. +- repoquery will now do a full provides version check. +- Add repoclosure --group. +- Big repodiff speedup. + * Wed Feb 10 2010 Tim Lauridsen - mark as 1.1.26 From fb5d16647e46f5013824eeb4d758e15216bac068 Mon Sep 17 00:00:00 2001 From: James Antill Date: Wed, 14 Apr 2010 16:51:04 +0000 Subject: [PATCH 03/86] - Get lots of fixes from latest HEAD. Also: - --alldeps default in repoquery. - repoquery will now do a full provides version check. - Add repoclosure --group. - Big repodiff speedup. --- yum-utils-HEAD.patch | 1618 ++++++++++++++++++++++++++++++++++++++++++ yum-utils.spec | 1 + 2 files changed, 1619 insertions(+) create mode 100644 yum-utils-HEAD.patch diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch new file mode 100644 index 0000000..3dab6b0 --- /dev/null +++ b/yum-utils-HEAD.patch @@ -0,0 +1,1618 @@ +From bc3d026acd1c8f332d024bf9a9918da6451c8c07 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Tue, 9 Feb 2010 21:35:15 +0200 +Subject: [PATCH 01/24] Make --alldeps the default in repoquery. + +--alldeps is what people really almost always want, but fail to +specify for some reason. --exactdeps can be used to get the previous +default of exact matching. +--- + docs/repoquery.1 | 10 +++++++--- + repoquery.py | 6 ++++-- + yum-utils.bash | 2 +- + 3 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/docs/repoquery.1 b/docs/repoquery.1 +index 1056c80..e5ed8b7 100644 +--- a/docs/repoquery.1 ++++ b/docs/repoquery.1 +@@ -107,8 +107,12 @@ Query all packages that provide CAPABILITY. + .IP "\fB\-\-whatrequires CAPABILITY\fP" + Query all packages that require CAPABILITY. + .IP "\fB\-\-alldeps\fP" +-When used with --whatrequires, use both automatic and manual dependencies +-for the query. ++When used with --whatrequires, look for non-explicit dependencies in ++addition to explicit ones (e.g. files and Provides in addition to ++package names). This is the default. ++.IP "\fB\-\-exactdeps\fP" ++When used with --whatrequires, search for dependencies only exactly as given. ++This is effectively the opposite of --alldeps. + .IP "\fB\-\-recursive\fP" + When used with --whatrequires, query packages recursively. + .IP "\fB\-\-archlist=ARCH1[,ARCH2...]\fP" +@@ -147,7 +151,7 @@ Query groups instead of packages. + .IP "List all packages whose name contains 'perl':" + \fBrepoquery '*perl*'\fP + .IP "List all packages depending on openssl:" +-\fBrepoquery --whatrequires --alldeps openssl\fP ++\fBrepoquery --whatrequires openssl\fP + .IP "List all package names and the repository they come from, nicely formatted:" + \fBrepoquery -a --qf "%-20{repoid} %{name}"\fP + .IP "List name and summary of all available updates (if any), nicely formatted:" +diff --git a/repoquery.py b/repoquery.py +index 2e3004b..3e2c18a 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -647,8 +647,10 @@ def main(args): + help="operate on corresponding source RPM") + parser.add_option("--resolve", action="store_true", + help="resolve capabilities to originating package(s)") +- parser.add_option("--alldeps", action="store_true", +- help="check non-explicit dependencies (files and Provides:) as well") ++ parser.add_option("--alldeps", action="store_true", default=True, ++ help="check non-explicit dependencies (files and Provides:) as well, defaults to on") ++ parser.add_option("--exactdeps", dest="alldeps", action="store_false", ++ help="check dependencies exactly as given, opposite of --alldeps") + parser.add_option("--recursive", action="store_true", + help="recursively query for packages (for whatrequires)") + parser.add_option("--whatprovides", action="store_true", +diff --git a/yum-utils.bash b/yum-utils.bash +index d8ca1dd..7df1b49 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -210,7 +210,7 @@ _yu_repoquery() + COMPREPLY=( $( compgen -W '--version --help --list --info --file + --queryformat --groupmember --all --requires --provides --obsoletes + --conflicts --changelog --location --nevra --envra --nvr --source +- --srpm --resolve --alldeps --recursive --whatprovides --whatrequires ++ --srpm --resolve --exactdeps --recursive --whatprovides --whatrequires + --whatobsoletes --whatconflicts --group --grouppkgs --archlist + --pkgnarrow --show-duplicates --repoid --enablerepo --disablerepo + --repofrompath --plugins --quiet --verbose --cache --tempcache +-- +1.6.6.1 + + +From efc35f8de0475db1bfe27eb04a93f571a23ce8b7 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Mon, 15 Feb 2010 22:01:50 -0500 +Subject: [PATCH 02/24] make repoquery pass in the whole string not just split for names + +--- + repoquery.py | 5 +---- + 1 files changed, 1 insertions(+), 4 deletions(-) + +diff --git a/repoquery.py b/repoquery.py +index 2e3004b..c2b8c03 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -554,10 +554,7 @@ class YumBaseQuery(yum.YumBase): + provs.extend(pkg.files()) + + for prov in provs: +- # Only look at the providing name, not the whole version. This +- # might occasionally give some false positives but that's +- # better than missing ones which it had previously +- for pkg in self.pkgSack.searchRequires(prov.split()[0]): ++ for pkg in self.pkgSack.searchRequires(prov): + pkgs[pkg.pkgtup] = pkg + if self.options.recursive: + require_recursive(pkg.name) +-- +1.6.6.1 + + +From 493450d26d04e3f61470e21f7db717e7d98e3d57 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Thu, 25 Feb 2010 12:58:35 -0500 +Subject: [PATCH 03/24] move around where we query for pkgs from sackops/prcos and what happens if no special output format + is specified in repoquery. + +makes: +repoquery -qfi /bin/bash output -qi output rather than -q output. +--- + repoquery.py | 19 +++++++++++-------- + 1 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/repoquery.py b/repoquery.py +index 0a56430..225a4cb 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -504,10 +504,21 @@ class YumBaseQuery(yum.YumBase): + else: + if self.options.srpm: + pkgs = self.matchSrcPkgs(items) ++ + else: + pkgs = self.matchPkgs(items) ++ for prco in items: ++ for oper in self.sackops: ++ try: ++ for p in self.doQuery(oper, prco): ++ if p: ++ pkgs.append(p) ++ except queryError, e: ++ self.logger.error( e.msg) + + for pkg in pkgs: ++ if not self.pkgops: ++ print to_unicode(pkg) + for oper in self.pkgops: + try: + out = pkg.doQuery(oper) +@@ -515,14 +526,6 @@ class YumBaseQuery(yum.YumBase): + print to_unicode(out) + except queryError, e: + self.logger.error( e.msg) +- for prco in items: +- for oper in self.sackops: +- try: +- for p in self.doQuery(oper, prco): +- if p: +- print p +- except queryError, e: +- self.logger.error( e.msg) + + def doQuery(self, method, *args, **kw): + return getattr(self, "fmt_%s" % method)(*args, **kw) +-- +1.6.6.1 + + +From f0bee60c3fc81325e547d0f8bf42591368d18ee4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Sat, 27 Feb 2010 14:21:02 +0200 +Subject: [PATCH 04/24] Fix --releasever. + +--- + repoquery.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/repoquery.py b/repoquery.py +index 225a4cb..eb524f3 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -774,7 +774,7 @@ def main(args): + + # silence initialisation junk from modules etc unless verbose mode + initnoise = (not opts.quiet) * 2 +- repoq.releasever = opts.releasever ++ repoq.preconf.releasever = opts.releasever + if opts.conffile: + repoq.doConfigSetup(fn=opts.conffile, debuglevel=initnoise, init_plugins=opts.plugins) + else: +-- +1.6.6.1 + + +From b15cb0760c864cadc5029474d07cc38882ec1815 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Mon, 1 Mar 2010 14:58:27 -0500 +Subject: [PATCH 05/24] catch all yum errors and valueError (which is coming from yum.config.py :() + generally this just means we'll get less ABRT errors and more reports from users + +(I hope) +--- + repoclosure.py | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/repoclosure.py b/repoclosure.py +index 5076fe8..8c27cdd 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -273,5 +273,10 @@ def main(): + my.logger.info(' %s' % req) + + if __name__ == "__main__": +- main() ++ try: ++ main() ++ except (yum.Errors.YumBaseError, ValueError), e: ++ print >> sys.stderr, str(e) ++ sys.exit(1) ++ + +-- +1.6.6.1 + + +From 30e58c85e07abe939ff3c9af017f8355f81a4f32 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Mon, 1 Mar 2010 15:27:57 -0500 +Subject: [PATCH 06/24] setup some repo features that make sense for the debug repos to + inherit from the non-debug repos when we add them + +--- + debuginfo-install.py | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/debuginfo-install.py b/debuginfo-install.py +index 242be65..dc41b5f 100755 +--- a/debuginfo-install.py ++++ b/debuginfo-install.py +@@ -90,6 +90,11 @@ class DebugInfoInstall(YumUtilBase): + r.enable() + try: + self.doRepoSetup(thisrepo=r.id) ++ for opt in ['repo_gpgcheck', 'gpgcheck', 'cost', ++ 'skip_if_unavailable']: ++ if hasattr(r, opt): ++ setattr(r, opt, getattr(repo, opt)) ++ + except yum.Errors.RepoError, e: + self.logger.critical("Could not access repo %s error was: %s" % + (r.id, to_unicode(str(e)))) +-- +1.6.6.1 + + +From c65516666fdca02f6f1500134d8a6832176320c7 Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Mon, 1 Mar 2010 22:57:07 -0500 +Subject: [PATCH 07/24] Add yum-utils to the run_with_packages when running y-c-t + +--- + yum-complete-transaction.py | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/yum-complete-transaction.py b/yum-complete-transaction.py +index ba41a51..0a9f5df 100755 +--- a/yum-complete-transaction.py ++++ b/yum-complete-transaction.py +@@ -161,6 +161,7 @@ class YumCompleteTransaction(YumUtilBase): + # populate the ts + # run it + ++ self.run_with_package_names.add('yum-utils') + times = [] + for thistime in find_unfinished_transactions(self.conf.persistdir): + if thistime.endswith('disabled'): +-- +1.6.6.1 + + +From 37454f631436624cfeda72496757c6206420cc78 Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Mon, 1 Mar 2010 22:58:53 -0500 +Subject: [PATCH 08/24] Add yum-utils to the run_with_packages when running pkg-cleanup + +--- + package-cleanup.py | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/package-cleanup.py b/package-cleanup.py +index 3f5507f..ca4aa9a 100755 +--- a/package-cleanup.py ++++ b/package-cleanup.py +@@ -335,6 +335,7 @@ class PackageCleanup(YumUtilBase): + sys.exit(100) + + self._remove_old_kernels(opts.kernelcount, opts.keepdevel) ++ self.run_with_package_names.add('yum-utils') + self.buildTransaction() + if len(self.tsInfo) < 1: + print 'No old kernels to remove' +@@ -371,6 +372,7 @@ class PackageCleanup(YumUtilBase): + if opts.noscripts: + self.conf.tsflags.append('noscripts') + self._remove_old_dupes() ++ self.run_with_package_names.add('yum-utils') + self.buildTransaction() + if len(self.tsInfo) < 1: + print 'No duplicates to remove' +-- +1.6.6.1 + + +From 94b52cb5499b47cb4e2b64c8a2e4e7863b2e965e Mon Sep 17 00:00:00 2001 +From: Tim Lauridsen +Date: Tue, 2 Mar 2010 12:18:31 +0100 +Subject: [PATCH 09/24] Make repoclosure work with relative paths, like ./myrepo or just . + +--- + repoclosure.py | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/repoclosure.py b/repoclosure.py +index 8c27cdd..9bfc007 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -60,7 +60,7 @@ def parseArgs(): + parser.add_option("-n", "--newest", default=0, action="store_true", + help="check only the newest packages in the repos") + parser.add_option("--repofrompath", action="append", +- help="specify repoid & paths of additional repositories - unique repoid and complete path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") ++ help="specify repoid & paths of additional repositories - unique repoid and path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") + parser.add_option("-p", "--pkg", action="append", + help="check closure for this package only") + (opts, args) = parser.parse_args() +@@ -195,12 +195,12 @@ def main(): + # setup the fake repos + for repo in opts.repofrompath: + repoid,repopath = tuple(repo.split(',')) ++ repopath = os.path.abspath(repopath) + if repopath[0] == '/': + baseurl = 'file://' + repopath + else: + baseurl = repopath + +- repopath = os.path.normpath(repopath) + newrepo = yum.yumRepo.YumRepository(repoid) + newrepo.name = repopath + newrepo.baseurl = baseurl +-- +1.6.6.1 + + +From 7cece362ea4c2f9c6619339775adb5975e022275 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Wed, 10 Mar 2010 21:13:00 +0200 +Subject: [PATCH 10/24] Add bash completion for yumdb. + +--- + yum-utils.bash | 27 +++++++++++++++++++++++++++ + 1 files changed, 27 insertions(+), 0 deletions(-) + +diff --git a/yum-utils.bash b/yum-utils.bash +index 7df1b49..1ff3fbd 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -218,6 +218,33 @@ _yu_repoquery() + } && + complete -F _yu_repoquery -o filenames repoquery repoquery.py + ++# yumdb ++_yu_yumdb() ++{ ++ COMPREPLY=() ++ ++ case "$3" in ++ -h|--help|-version) ++ return 0 ++ ;; ++ -c|--config) ++ COMPREPLY=( $( compgen -f -o plusdirs -X '!*.conf' -- "$2" ) ) ++ return 0 ++ ;; ++ shell) ++ COMPREPLY=( $( compgen -f -o plusdirs -- "$2" ) ) ++ return 0 ++ ;; ++ esac ++ ++ if [ $COMP_CWORD -le 1 ] ; then ++ COMPREPLY=( $( compgen -W 'get set del rename rename-force search ++ exist unset info shell --version --help --noplugins --config' \ ++ -- "$2" ) ) ++ fi ++} && ++complete -F _yu_yumdb -o filenames yumdb yumdb.py ++ + # Local variables: + # mode: shell-script + # sh-basic-offset: 4 +-- +1.6.6.1 + + +From 421ba27da401618dd10d1a31801df01b89277585 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Fri, 26 Mar 2010 22:58:45 +0200 +Subject: [PATCH 11/24] Complete on repomanage.py, package-cleanup.py, and verifytree.py. + +--- + yum-utils.bash | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/yum-utils.bash b/yum-utils.bash +index 1ff3fbd..308d82b 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -23,7 +23,7 @@ _yu_repomanage() + + COMPREPLY=( $( compgen -d -- "$2" ) ) + } && +-complete -F _yu_repomanage -o filenames repomanage ++complete -F _yu_repomanage -o filenames repomanage repomanage.py + + # package-cleanup + _yu_package_cleanup() +@@ -49,7 +49,7 @@ _yu_package_cleanup() + --cleandupes --oldkernels --count --keepdevel -c --queryformat' \ + -- "$2" ) ) + } && +-complete -F _yu_package_cleanup -o filenames package-cleanup ++complete -F _yu_package_cleanup -o filenames package-cleanup package-cleanup.py + + # verifytree + _yu_verifytree() +@@ -70,7 +70,7 @@ _yu_verifytree() + + COMPREPLY=( $( compgen -d -- "$2" ) ) + } && +-complete -F _yu_verifytree -o filenames verifytree ++complete -F _yu_verifytree -o filenames verifytree verifytree.py + + # repo-graph + _yu_repo_graph() +-- +1.6.6.1 + + +From 25ceb993e0bda203804c3e8241df5d1942eab303 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Tue, 30 Mar 2010 23:04:44 +0300 +Subject: [PATCH 12/24] Use "in" instead of has_key. + +--- + package-cleanup.py | 2 +- + plugins/changelog/changelog.py | 4 ++-- + .../fastestmirror-asyncore.py | 2 +- + plugins/fedorakmod/fedorakmod.py | 9 +++++---- + plugins/fs-snapshot/fs-snapshot.py | 2 +- + .../post-transaction-actions.py | 2 +- + plugins/priorities/priorities.py | 10 +++++----- + plugins/protectbase/protectbase.py | 2 +- + plugins/remove-with-leaves/remove-with-leaves.py | 2 +- + plugins/upgrade-helper/upgrade-helper.py | 8 ++++---- + repo-graph.py | 4 ++-- + repo-rss.py | 2 +- + repoclosure.py | 6 +++--- + repodiff.py | 2 +- + repomanage.py | 4 ++-- + repoquery.py | 6 +++--- + reposync.py | 2 +- + repotrack.py | 5 ++--- + yum-debug-dump.py | 2 +- + 19 files changed, 38 insertions(+), 38 deletions(-) + +diff --git a/package-cleanup.py b/package-cleanup.py +index ca4aa9a..c796286 100755 +--- a/package-cleanup.py ++++ b/package-cleanup.py +@@ -129,7 +129,7 @@ class PackageCleanup(YumUtilBase): + for (req,flags,ver) in po.requires: + + if req.startswith('rpmlib'): continue # ignore rpmlib deps +- if not providers.has_key((req,flags,ver)): ++ if (req,flags,ver) not in providers: + resolve_sack = self.rpmdb.whatProvides(req,flags,ver) + else: + resolve_sack = providers[(req,flags,ver)] +diff --git a/plugins/changelog/changelog.py b/plugins/changelog/changelog.py +index 250326f..007ac6d 100644 +--- a/plugins/changelog/changelog.py ++++ b/plugins/changelog/changelog.py +@@ -58,7 +58,7 @@ def srpmname(pkg): + def _show_changes_changelog(conduit, srpms): + for name in sorted(srpms.keys()): + rpms = [] +- if origpkgs.has_key(name): ++ if name in origpkgs: + for rpm in srpms[name]: + rpms.append("%s" % rpm) + done = False +@@ -85,7 +85,7 @@ def show_changes(conduit, msg): + if not tsmem.updates: + continue + name = srpmname(tsmem.po) +- if srpms.has_key(name): ++ if name in srpms: + srpms[name].append(tsmem.po) + else: + srpms[name] = [tsmem.po] +diff --git a/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py b/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py +index 8129e2c..11c394f 100644 +--- a/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py ++++ b/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py +@@ -135,7 +135,7 @@ def postreposetup_hook(conduit): + repomirrors = {} + repos = conduit.getRepos() + for repo in repos.listEnabled(): +- if not repomirrors.has_key(str(repo)): ++ if str(repo) not in repomirrors: + repomirrors[str(repo)] = FastestMirror(repo.urls).get_mirrorlist() + if exclude: + for mirror in repomirrors[str(repo)]: +diff --git a/plugins/fedorakmod/fedorakmod.py b/plugins/fedorakmod/fedorakmod.py +index ab9f673..b3aed61 100644 +--- a/plugins/fedorakmod/fedorakmod.py ++++ b/plugins/fedorakmod/fedorakmod.py +@@ -140,7 +140,7 @@ def resolveVersions(packageList): + continue + po.kmodName = name[0] + +- if not pdict.has_key(kernel): ++ if kernel not in pdict: + pdict[kernel] = [po] + else: + sameName = None +@@ -208,7 +208,7 @@ def pinKernels(c, newKernels, installedKernels, modules): + str(runningKernel)) + + table = resolveVersions(modules) +- if not table.has_key(runningKernel): ++ if runningKernel not in table: + c.info(2, "Trying to mimic %s which has no kernel modules installed" \ + % str(runningKernel)) + return +@@ -217,7 +217,7 @@ def pinKernels(c, newKernels, installedKernels, modules): + c.info(2, "kmods in %s: %s" % (str(runningKernel), str(names))) + for kpo in newKernels: + prov = getKernelProvides(kpo)[0] +- if table.has_key(prov): ++ if prov in table: + kmods = [ po.kmodName for po in table[prov] ] + else: + kmods = [] +@@ -255,7 +255,8 @@ def installAllKmods(c, avaModules, modules, kernels): + table = resolveVersions(interesting + modules) + + for kernel in [ getKernelProvides(k)[0] for k in kernels ]: +- if not table.has_key(kernel): continue ++ if kernel not in table: ++ continue + for po in table[kernel]: + if po not in modules: + c.getTsInfo().addTrueInstall(po) +diff --git a/plugins/fs-snapshot/fs-snapshot.py b/plugins/fs-snapshot/fs-snapshot.py +index f0ce051..a83156d 100644 +--- a/plugins/fs-snapshot/fs-snapshot.py ++++ b/plugins/fs-snapshot/fs-snapshot.py +@@ -178,7 +178,7 @@ def _create_snapshot(conduit, snapshot_tag, volume): + """ + if volume["fstype"] == "btrfs": + return _create_btrfs_snapshot(conduit, snapshot_tag, volume) +- elif volume.has_key(lvm_key): ++ elif lvm_key in volume: + return _create_lvm_snapshot(conduit, snapshot_tag, volume) + + return 0 +diff --git a/plugins/post-transaction-actions/post-transaction-actions.py b/plugins/post-transaction-actions/post-transaction-actions.py +index 7b94b90..b4da1ce 100644 +--- a/plugins/post-transaction-actions/post-transaction-actions.py ++++ b/plugins/post-transaction-actions/post-transaction-actions.py +@@ -62,7 +62,7 @@ def parse_actions(ddir, conduit): + + def _get_installed_po(rpmdb, pkgtup): + (n,a,e,v,r) = pkgtup +- if _just_installed.has_key(pkgtup): ++ if pkgtup in _just_installed: + return _just_installed[pkgtup] + return rpmdb.searchNevra(name=n, arch=a, epoch=e, ver=v, rel=r)[0] + +diff --git a/plugins/priorities/priorities.py b/plugins/priorities/priorities.py +index 3650736..ddee1cb 100644 +--- a/plugins/priorities/priorities.py ++++ b/plugins/priorities/priorities.py +@@ -134,11 +134,11 @@ def exclude_hook(conduit): + + if only_samearch: + key = "%s.%s" % (po.name,po.arch) +- if pkg_priorities.has_key(key) and pkg_priorities[key] < repo.priority: ++ if key in pkg_priorities and pkg_priorities[key] < repo.priority: + delPackage = True + else: + key = "%s" % po.name +- if pkg_priorities_archless.has_key(key) and pkg_priorities_archless[key] < repo.priority: ++ if key in pkg_priorities_archless and pkg_priorities_archless[key] < repo.priority: + delPackage = True + + if delPackage: +@@ -150,11 +150,11 @@ def exclude_hook(conduit): + # one of the obsoleted packages is not available through + # a repo with a higher priority. If so, remove this package. + if check_obsoletes: +- if obsoletes.has_key(po.pkgtup): ++ if po.pkgtup in obsoletes: + obsolete_pkgs = obsoletes[po.pkgtup] + for obsolete_pkg in obsolete_pkgs: + pkg_name = obsolete_pkg[0] +- if pkg_priorities_archless.has_key(pkg_name) and pkg_priorities_archless[pkg_name] < repo.priority: ++ if pkg_name in pkg_priorities_archless and pkg_priorities_archless[pkg_name] < repo.priority: + conduit.delPackage(po) + cnt += 1 + conduit.info(3," --> %s from %s excluded (priority)" % (po,po.repoid)) +@@ -173,5 +173,5 @@ def _pkglist_to_dict(pl, priority, addArch = False): + + def _mergeprioritydicts(dict1, dict2): + for package in dict2.keys(): +- if not dict1.has_key(package) or dict2[package] < dict1[package]: ++ if package not in dict1 or dict2[package] < dict1[package]: + dict1[package] = dict2[package] +diff --git a/plugins/protectbase/protectbase.py b/plugins/protectbase/protectbase.py +index 441cdba..37a39dd 100644 +--- a/plugins/protectbase/protectbase.py ++++ b/plugins/protectbase/protectbase.py +@@ -55,7 +55,7 @@ def exclude_hook(conduit): + continue + + for po in conduit.getPackages(repo2): +- if repo1pkgs.has_key(po.name): ++ if po.name in repo1pkgs: + conduit.delPackage(po) + cnt += 1 + +diff --git a/plugins/remove-with-leaves/remove-with-leaves.py b/plugins/remove-with-leaves/remove-with-leaves.py +index 004472f..a808aef 100644 +--- a/plugins/remove-with-leaves/remove-with-leaves.py ++++ b/plugins/remove-with-leaves/remove-with-leaves.py +@@ -42,7 +42,7 @@ remove_always = False + + + def _requires_this_package(rpmdb, pkg): +- if _requires_cache.has_key(pkg): ++ if pkg in _requires_cache: + return _requires_cache[pkg] + + requirers = {} +diff --git a/plugins/upgrade-helper/upgrade-helper.py b/plugins/upgrade-helper/upgrade-helper.py +index fd76c4f..9aa05f0 100644 +--- a/plugins/upgrade-helper/upgrade-helper.py ++++ b/plugins/upgrade-helper/upgrade-helper.py +@@ -68,11 +68,11 @@ def parse_xml(xmlfile): + child_name = ns_cleanup(child.tag) + thisarch = myarch + if child_name == 'removespec': +- if child.attrib.has_key('on_arch'): ++ if 'on_arch' in child.attrib: + thisarch = child.attrib.get('on_arch') +- if child.attrib.has_key('pkgmatch'): ++ if 'pkgmatch' in child.attrib: + thismatch = child.attrib.get('pkgmatch') +- if results.has_key(thisarch): ++ if thisarch in results: + if thismatch not in results[thisarch]: + results[thisarch].append(thismatch) + else: +@@ -89,7 +89,7 @@ def stuff_to_remove(repos): + # return them as the toremove list + + for repo in repos.listEnabled(): +- if repo.repoXML.repoData.has_key('cleanup'): ++ if 'cleanup' in repo.repoXML.repoData: + trf = repo.retrieveMD('cleanup') + tr_dict = parse_xml(trf) + # prune out things like *, ?, *.*, *.*.*.*.* +diff --git a/repo-graph.py b/repo-graph.py +index e771874..bb901a8 100755 +--- a/repo-graph.py ++++ b/repo-graph.py +@@ -69,7 +69,7 @@ class yumQuiet(yum.YumBase): + for r in pkg.returnPrco('requires'): + reqname = r[0] + if reqname.startswith('rpmlib'): continue +- if prov.has_key(reqname): ++ if reqname in prov: + provider = prov[reqname] + cached += 1 + else: +@@ -83,7 +83,7 @@ class yumQuiet(yum.YumBase): + prov[reqname] = provider + if provider == pkg.name: + xx[provider] = None +- if xx.has_key(provider) or provider in skip: ++ if provider in xx or provider in skip: + continue + else: + xx[provider] = None +diff --git a/repo-rss.py b/repo-rss.py +index f395089..845c65e 100755 +--- a/repo-rss.py ++++ b/repo-rss.py +@@ -45,7 +45,7 @@ class YumQuiet(yum.YumBase): + for po in avail: + ftime = int(po.returnSimple('filetime')) + if ftime > recentlimit: +- if not ftimehash.has_key(ftime): ++ if ftime not in ftimehash: + ftimehash[ftime] = [po] + else: + ftimehash[ftime].append(po) +diff --git a/repoclosure.py b/repoclosure.py +index 9bfc007..d9a94d7 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -153,7 +153,7 @@ class RepoClosure(yum.YumBase): + if req.startswith('rpmlib'): continue # ignore rpmlib deps + + ver = self.evrTupletoVer((reqe, reqv, reqr)) +- if resolved.has_key((req,flags,ver)): ++ if (req,flags,ver) in resolved: + continue + try: + resolve_sack = self.whatProvides(req, flags, ver) +@@ -161,7 +161,7 @@ class RepoClosure(yum.YumBase): + pass + + if len(resolve_sack) < 1: +- if not unresolved.has_key(pkg): ++ if pkg not in unresolved: + unresolved[pkg] = [] + unresolved[pkg].append((req, flags, ver)) + continue +@@ -176,7 +176,7 @@ class RepoClosure(yum.YumBase): + if resolved_by_newest: + resolved[(req,flags,ver)] = 1 + else: +- if not unresolved.has_key(pkg): ++ if pkg not in unresolved: + unresolved[pkg] = [] + unresolved[pkg].append((req, flags, ver)) + +diff --git a/repodiff.py b/repodiff.py +index 5b547c0..ac1865e 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -184,7 +184,7 @@ def main(args): + if ygh.remove: + for pkg in sorted(ygh.remove): + print 'Removed package %s' % pkg.name +- if ygh.obsoleted.has_key(pkg): ++ if pkg in ygh.obsoleted: + print 'Obsoleted by %s' % ygh.obsoleted[pkg] + remove_sizechange += (int(pkg.size)) + +diff --git a/repomanage.py b/repomanage.py +index 759bf30..aeff9e5 100755 +--- a/repomanage.py ++++ b/repomanage.py +@@ -158,11 +158,11 @@ def main(args): + (n,a,e,v,r) = pkgtuple + del hdr + +- if not pkgdict.has_key((n,a)): ++ if (n,a) not in pkgdict: + pkgdict[(n,a)] = [] + pkgdict[(n,a)].append((e,v,r)) + +- if not verfile.has_key(pkgtuple): ++ if pkgtuple not in verfile: + verfile[pkgtuple] = [] + verfile[pkgtuple].append(pkg) + +diff --git a/repoquery.py b/repoquery.py +index eb524f3..76b1178 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -146,7 +146,7 @@ class pkgQuery: + if len(tmp) > 1: + item = tmp[0] + conv = tmp[1] +- if convertmap.has_key(conv): ++ if conv in convertmap: + convert = convertmap[conv] + else: + raise queryError("Invalid conversion: %s" % conv) +@@ -168,7 +168,7 @@ class pkgQuery: + return self.fmt_queryformat() + + def doQuery(self, method, *args, **kw): +- if std_qf.has_key(method): ++ if method in std_qf: + self.qf = std_qf[method] + return self.fmt_queryformat() + elif hasattr(self, "fmt_%s" % method): +@@ -295,7 +295,7 @@ class instPkgQuery(pkgQuery): + self.classname = 'installed pkg' + + def __getitem__(self, item): +- if self.tagmap.has_key(item): ++ if item in self.tagmap: + return self.pkg.tagByName(self.tagmap[item]) + else: + return pkgQuery.__getitem__(self, item) +diff --git a/reposync.py b/reposync.py +index 5c8ee32..b66e927 100755 +--- a/reposync.py ++++ b/reposync.py +@@ -222,7 +222,7 @@ def main(): + download_set[rpmname] = 1 + + for pkg in current_pkgs: +- if download_set.has_key(pkg): ++ if pkg in download_set: + continue + + if not opts.quiet: +diff --git a/repotrack.py b/repotrack.py +index 35b8375..1c7158a 100755 +--- a/repotrack.py ++++ b/repotrack.py +@@ -214,9 +214,8 @@ def main(): + del this_sack + + for res in pkg_list: +- if res is not None: +- if not unprocessed_pkgs.has_key(res.pkgtup): +- unprocessed_pkgs[res.pkgtup] = res ++ if res is not None and res.pkgtup not in unprocessed_pkgs: ++ unprocessed_pkgs[res.pkgtup] = res + + + +diff --git a/yum-debug-dump.py b/yum-debug-dump.py +index f280d61..0ef90b2 100644 +--- a/yum-debug-dump.py ++++ b/yum-debug-dump.py +@@ -128,7 +128,7 @@ class YumDebugDump(yum.YumBase): + if req.startswith('rpmlib'): + continue # ignore rpmlib deps + +- if not providers.has_key((req,rflags,ver)): ++ if (req,rflags,ver) not in providers: + resolve_sack = self.rpmdb.whatProvides(req,rflags,ver) + else: + resolve_sack = providers[(req,rflags,ver)] +-- +1.6.6.1 + + +From 39e3f286c7bb5d09f1440e2a50dd21d0c1603b49 Mon Sep 17 00:00:00 2001 +From: Dennis Gregorovic +Date: Wed, 31 Mar 2010 15:00:54 -0400 +Subject: [PATCH 13/24] Include all packages listed in the pkgonly arg + +--- + repoclosure.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/repoclosure.py b/repoclosure.py +index d9a94d7..4c8cfa6 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -146,7 +146,7 @@ class RepoClosure(yum.YumBase): + pkgs = filter(lambda x: x.arch == 'src', pkgs) + + if self.pkgonly: +- pkgs = filter(lambda x: x.name == self.pkgonly[0], pkgs) ++ pkgs = filter(lambda x: x.name in self.pkgonly, pkgs) + + for pkg in pkgs: + for (req, flags, (reqe, reqv, reqr)) in pkg.returnPrco('requires'): +-- +1.6.6.1 + + +From 267c33dd4c50ea9844f3720832c6c65a623d7b4c Mon Sep 17 00:00:00 2001 +From: Dennis Gregorovic +Date: Wed, 31 Mar 2010 15:18:35 -0400 +Subject: [PATCH 14/24] Add a --group flag to filter packages by comps group + +--- + repoclosure.py | 20 +++++++++++++++++--- + 1 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/repoclosure.py b/repoclosure.py +index 4c8cfa6..88a6adb 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -63,6 +63,8 @@ def parseArgs(): + help="specify repoid & paths of additional repositories - unique repoid and path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") + parser.add_option("-p", "--pkg", action="append", + help="check closure for this package only") ++ parser.add_option("-g", "--group", action="append", ++ help="check closure for packages in this group only") + (opts, args) = parser.parse_args() + return (opts, args) + +@@ -70,13 +72,14 @@ def parseArgs(): + # so we have to do at least some API guarantee stuff. + class RepoClosure(yum.YumBase): + def __init__(self, arch=[], config="/etc/yum.conf", builddeps=False, pkgonly=None, +- basearch=None): ++ basearch=None, grouponly=None): + yum.YumBase.__init__(self) + if basearch: + self.preconf.arch = basearch + self.logger = logging.getLogger("yum.verbose.repoclosure") + self.builddeps = builddeps + self.pkgonly = pkgonly ++ self.grouponly = grouponly + self.doConfigSetup(fn = config,init_plugins=False) + self._rc_arches = arch + +@@ -145,8 +148,18 @@ class RepoClosure(yum.YumBase): + if self.builddeps: + pkgs = filter(lambda x: x.arch == 'src', pkgs) + +- if self.pkgonly: +- pkgs = filter(lambda x: x.name in self.pkgonly, pkgs) ++ pkglist = self.pkgonly ++ if self.grouponly: ++ if not pkglist: ++ pkglist = [] ++ for group in self.grouponly: ++ groupobj = self.comps.return_group(group) ++ if not groupobj: ++ continue ++ pkglist.extend(groupobj.packages) ++ ++ if pkglist: ++ pkgs = filter(lambda x: x.name in pkglist, pkgs) + + for pkg in pkgs: + for (req, flags, (reqe, reqv, reqr)) in pkg.returnPrco('requires'): +@@ -189,6 +202,7 @@ def main(): + config=opts.config, + builddeps=opts.builddeps, + pkgonly=opts.pkg, ++ grouponly=opts.group, + basearch=opts.basearch) + + if opts.repofrompath: +-- +1.6.6.1 + + +From 8361ec1ae233a507a05c214fa4966e1f232e7a92 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Thu, 1 Apr 2010 21:57:36 +0300 +Subject: [PATCH 15/24] Add repoclosure --group completion. + +--- + yum-utils.bash | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/yum-utils.bash b/yum-utils.bash +index 308d82b..d1f13c9 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -142,10 +142,14 @@ _yu_repoclosure() + type _yum_list &>/dev/null && _yum_list all "$2" + return 0 + ;; ++ -g|--group) ++ type _yum_grouplist &>/dev/null && _yum_grouplist "" "$2" ++ return 0 ++ ;; + esac + + COMPREPLY=( $( compgen -W '--help --config --arch --basearch --builddeps +- --repoid --tempcache --quiet --newest --repofrompath --pkg' \ ++ --repoid --tempcache --quiet --newest --repofrompath --pkg --group' \ + -- "$2" ) ) + } && + complete -F _yu_repoclosure -o filenames repoclosure repoclosure.py +-- +1.6.6.1 + + +From 08975b3f4d0f31fe7af7a12443c227bfcbc9f6de Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Fri, 2 Apr 2010 11:34:54 +0300 +Subject: [PATCH 16/24] Fix always_print_best_host conf setting. + +--- + plugins/fastestmirror/fastestmirror.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py +index 0701ef7..a8f1ee7 100644 +--- a/plugins/fastestmirror/fastestmirror.py ++++ b/plugins/fastestmirror/fastestmirror.py +@@ -90,7 +90,7 @@ def init_hook(conduit): + + """ + global verbose, socket_timeout, hostfilepath, maxhostfileage, loadcache +- global maxthreads, exclude, prefer, downgrade_ftp ++ global maxthreads, exclude, prefer, downgrade_ftp, always_print_best_host + if hasattr(conduit, 'registerPackageName'): + conduit.registerPackageName("yum-plugin-fastestmirror") + verbose = conduit.confBool('main', 'verbose', default=False) +-- +1.6.6.1 + + +From a33e328bd75f1c1828ee287df0582298f625fd93 Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Thu, 8 Apr 2010 15:58:48 -0400 +Subject: [PATCH 17/24] Add yumdb man page, and yumdb copy command + +--- + docs/Makefile | 2 +- + docs/yumdb.8 | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + yum-utils.spec | 1 + + yumdb.py | 14 ++++++ + 4 files changed, 142 insertions(+), 1 deletions(-) + create mode 100644 docs/yumdb.8 + +diff --git a/docs/Makefile b/docs/Makefile +index 7e81045..947498d 100644 +--- a/docs/Makefile ++++ b/docs/Makefile +@@ -2,7 +2,7 @@ DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changel + yum-list-data yum-filter-data yum-verify yum-utils yum-aliases yum-debug-dump yum-versionlock \ + yum-groups-manager debuginfo-install repodiff yum-fs-snapshot + DOCS5 = yum-changelog.conf yum-versionlock.conf yum-fs-snapshot.conf +-DOCS8 = yum-security yum-complete-transaction ++DOCS8 = yum-security yum-complete-transaction yumdb + + all: + echo "Nothing to do" +diff --git a/docs/yumdb.8 b/docs/yumdb.8 +new file mode 100644 +index 0000000..7c39459 +--- /dev/null ++++ b/docs/yumdb.8 +@@ -0,0 +1,126 @@ ++.\" yumdb command ++.TH "yumdb" "8" "8 April 2010" "James Antill" "" ++.SH "NAME" ++yumdb command ++.SH "SYNOPSIS" ++\fByumdb\fP [command] [packages ...] ++.SH "DESCRIPTION" ++.PP ++This command is used to query and alter the yum database, which is a simple ++key value store used in conjunction with the rpm database. Any installed package ++can have arbitrary data in the yum database, however the main use case is to ++store extra data about packages as they are installed. ++.PP ++yumdb \fIcommand\fPs are: ++.br ++.IP "\fByumdb get [pkg-wildcard]...\fP" ++.PP ++This command will get the value for the given key, limiting to any specified ++packages. ++.br ++.IP "\fByumdb set [pkg-wildcard]..." ++.PP ++This command will set the value for the given key, to the given value, limiting ++to any specified packages. ++.br ++.IP "\fByumdb del [pkg-wildcard]... ++.PP ++This command will delete the given key, limiting to any specified packages. ++.br ++.IP "\fByumdb rename [pkg-wildcard]... ++.PP ++This command will rename the given old-key, to the given new-key, limiting to ++any specified packages. If the old-key does not exist, nothing happens. ++.br ++.IP "\fByumdb rename-force [pkg-wildcard]... ++.PP ++This command will rename the given old-key, to the given new-key, limiting to ++any specified packages. If the old-key does not exist, new-key is deleted. ++.br ++.IP "\fByumdb copy [pkg-wildcard]... ++.PP ++This command will copy the given old-key, to the given new-key, limiting to ++any specified packages. If the old-key does not exist, nothing happens. ++.br ++.IP "\fByumdb search ... ++.PP ++This command will search all packages for the given key, against any of the ++given wildcard values. ++.br ++.IP "\fByumdb exist [pkg-wildcard]... ++.PP ++This command will print any packages which have the given key, limiting to any ++specified packages. ++.br ++.IP "\fByumdb unset [pkg-wildcard]... ++.PP ++This command will print any packages which do not have the given key, limiting ++to any specified packages. ++.br ++.IP "\fByumdb info [pkg-wildcard]... ++.PP ++This command will all the data stored in the yumdb, limiting to any specified ++packages. ++ ++.SH "EXAMPLES" ++.PP ++List all the packages which don't have a from_repo key/value: ++.IP ++yumdb unset from_repo ++.PP ++List all the packages which were installed as dependencies: ++.IP ++yumdb search reason dep ++ ++.SH "WELL KNOWN KEYS" ++.PP ++Note that there is no limit to the number of keys that can be created or what ++they may contain (for installed packages only). However this is a list of well ++known keys, and what they store. ++.nf ++.br ++.IP "\fBchecksum_data ++.IP "\fBchecksum_type ++.PP ++These keys store the createrepo checksum, and it's type, of the available ++package yum installed. Note that these are used by "yum version" to calculate ++the rpmdb version. ++.br ++.IP "\fBcommand_line ++.PP ++This key stores the entire command line, of the yum command (if it was called). ++.br ++.IP "\fBfrom_repo ++.IP "\fBfrom_repo_revision ++.IP "\fBfrom_repo_timestamp ++.PP ++These keys take values from the available package yum installed, and store the ++repo id, it's revision and timestamp. ++.br ++.IP "\fBreason ++.PP ++This key stores either "user" or "dep", currently. To mark if the user requested ++the package to be installed, or if it was brought in automatically as a ++dependency. Note that this is kept over updates. ++.br ++.IP "\fBreleasever ++.PP ++This key stores the value of releasever, when the package was installed. ++.br ++.IP "\fBinstallonly ++.PP ++If this attribute has the value "keep" then this package will not be ++removed automatically by the installonly process (and does not count towards ++the installonly_limit). ++ ++.SH "SEE ALSO" ++.nf ++.I yum (8) ++.I rpm (8) ++.fi ++ ++.SH "AUTHORS" ++.nf ++James Antill . ++.fi ++ +diff --git a/yum-utils.spec b/yum-utils.spec +index 307a4e8..2f0b955 100644 +--- a/yum-utils.spec ++++ b/yum-utils.spec +@@ -463,6 +463,7 @@ fi + %{_mandir}/man1/yum-debug-dump.1.* + %{_mandir}/man8/yum-complete-transaction.8.* + %{_mandir}/man1/yum-groups-manager.1.* ++%{_mandir}/man8/yumdb.8.* + %{_mandir}/man1/yumdownloader.1.* + + %files -n yum-updateonboot +diff --git a/yumdb.py b/yumdb.py +index 365006e..38ba561 100755 +--- a/yumdb.py ++++ b/yumdb.py +@@ -19,6 +19,7 @@ def setup_opts(): + del [pkg-wildcard]... + rename [pkg-wildcard]... + rename-force [pkg-wildcard]... ++ copy [pkg-wildcard]... + search ... + exist? [pkg-wildcard]... + unset? [pkg-wildcard]... +@@ -68,6 +69,19 @@ def run_cmd(yb, args, inshell=False): + print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) + else: + print " " * 4, ynkey, '' ++ elif args[0] == 'copy' and len(args) > 2: ++ args.pop(0) ++ yokey = args.pop(0) ++ ynkey = args.pop(0) ++ for pkg in sorted(yb.rpmdb.returnPackages(patterns=args)): ++ print pkg ++ if yokey in pkg.yumdb_info: ++ setattr(pkg.yumdb_info, ynkey, getattr(pkg.yumdb_info, yokey)) ++ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) ++ elif ynkey in pkg.yumdb_info: ++ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) ++ else: ++ print " " * 4, ynkey, '' + elif args[0] in ['rename-f', 'rename-force'] and len(args) > 2: + args.pop(0) + yokey = args.pop(0) +-- +1.6.6.1 + + +From b4c9ab9ecf7e602f78836ba34b1fc3994904e533 Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Thu, 8 Apr 2010 16:02:55 -0400 +Subject: [PATCH 18/24] Use the yum configured cachedir value, in fastestmirror + +--- + plugins/fastestmirror/fastestmirror.conf | 4 +++- + plugins/fastestmirror/fastestmirror.py | 6 ++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/plugins/fastestmirror/fastestmirror.conf b/plugins/fastestmirror/fastestmirror.conf +index 32ecec4..c6db0d8 100644 +--- a/plugins/fastestmirror/fastestmirror.conf ++++ b/plugins/fastestmirror/fastestmirror.conf +@@ -3,7 +3,9 @@ enabled=1 + verbose=0 + always_print_best_host = true + socket_timeout=3 +-hostfilepath=/var/cache/yum/timedhosts.txt ++# Relative paths are relative to the cachedir (and so works for users as well ++# as root). ++hostfilepath=timedhosts.txt + maxhostfileage=10 + maxthreads=15 + #exclude=.gov, facebook +diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py +index a8f1ee7..db2fede 100644 +--- a/plugins/fastestmirror/fastestmirror.py ++++ b/plugins/fastestmirror/fastestmirror.py +@@ -14,7 +14,7 @@ + # enabled=1 + # verbose=1 + # socket_timeout=3 +-# hostfilepath=/var/cache/yum/timedhosts ++# hostfilepath=timedhosts + # maxhostfileage=10 + # maxthreads=15 + # #exclude=.gov, facebook +@@ -98,7 +98,9 @@ def init_hook(conduit): + default=True) + socket_timeout = conduit.confInt('main', 'socket_timeout', default=3) + hostfilepath = conduit.confString('main', 'hostfilepath', +- default='/var/cache/yum/timedhosts') ++ default='timedhosts') ++ if hostfilepath and hostfilepath[0] != '/': ++ hostfilepath = conduit._base.conf.cachedir + '/' + hostfilepath + maxhostfileage = conduit.confInt('main', 'maxhostfileage', default=10) + maxthreads = conduit.confInt('main', 'maxthreads', default=10) + exclude = conduit.confString('main', 'exclude', default=None) +-- +1.6.6.1 + + +From 264a67e713827a086ceef13b163a46dc6f28acf4 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Fri, 9 Apr 2010 17:01:16 -0400 +Subject: [PATCH 19/24] fixes https://bugzilla.redhat.com/show_bug.cgi?id=580343 + +when we are dealing with compressed comps files just fetch the group +not group_gz +--- + reposync.py | 45 +++++++++++++++++++++++---------------------- + 1 files changed, 23 insertions(+), 22 deletions(-) + +diff --git a/reposync.py b/reposync.py +index b66e927..4d70e30 100755 +--- a/reposync.py ++++ b/reposync.py +@@ -110,7 +110,7 @@ def parseArgs(): + parser.add_option("-p", "--download_path", dest='destdir', + default=os.getcwd(), help="Path to download packages to: defaults to current dir") + parser.add_option("--norepopath", dest='norepopath', default=False, action="store_true", +- help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)") ++ help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)") + parser.add_option("-g", "--gpgcheck", default=False, action="store_true", + help="Remove packages that fail GPG signature checking after downloading") + parser.add_option("-u", "--urls", default=False, action="store_true", +@@ -176,7 +176,7 @@ def main(): + # enable the ones we like + for repo in myrepos: + repo.enable() +- ++ + # --norepopath can only be sensibly used with a single repository: + if len(my.repos.listEnabled()) > 1 and opts.norepopath: + print >> sys.stderr, "Error: Can't use --norepopath with multiple repositories" +@@ -238,29 +238,30 @@ def main(): + my.logger.error("Could not make repo subdir: %s" % e) + my.closeRpmDB() + sys.exit(1) +- try: # download random other metadata +- if opts.downloadcomps: +- compsfile = repo.getGroups() +- shutil.copyfile(compsfile,"%s/%s" % (local_repo_path,'comps.xml')) +- except yum.Errors.RepoMDError,e : +- if not opts.quiet: +- my.logger.error("Unable to fetch metadata: %s" % e) + ++ if opts.downloadcomps: ++ wanted_types = ['group'] ++ + if opts.downloadmd: +- for ftype in repo.repoXML.fileTypes(): +- if ftype in ['primary', 'primary_db', 'filelists', +- 'filelists_db', 'other', 'other_db']: +- continue +- if opts.downloadcomps and ftype == 'group': +- continue +- try: +- resultfile = repo.retrieveMD(ftype) +- basename = os.path.basename(resultfile) +- shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename)) +- except yum.Errors.RepoMDError,e : +- if not opts.quiet: +- my.logger.error("Unable to fetch metadata: %s" % e) ++ wanted_types = repo.repoXML.fileTypes.keys() ++ ++ for ftype in repo.repoXML.fileTypes(): ++ if ftype in ['primary', 'primary_db', 'filelists', ++ 'filelists_db', 'other', 'other_db']: ++ continue ++ if ftype not in wanted_types: ++ continue + ++ try: ++ resultfile = repo.retrieveMD(ftype) ++ basename = os.path.basename(resultfile) ++ if ftype == 'group' and opts.downloadcomps: # for compat with how --downloadcomps saved the comps file always as comps.xml ++ basename = 'comps.xml' ++ shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename)) ++ except yum.Errors.RepoMDError,e : ++ if not opts.quiet: ++ my.logger.error("Unable to fetch metadata: %s" % e) ++ + remote_size = 0 + local_size = 0 + if not opts.urls: +-- +1.6.6.1 + + +From 4f7fa956098ec985727c5d12e694ccb259a6f037 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Sat, 10 Apr 2010 00:21:57 +0300 +Subject: [PATCH 20/24] Add copy to yumdb completions. + +--- + yum-utils.bash | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/yum-utils.bash b/yum-utils.bash +index d1f13c9..54c9ef8 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -242,7 +242,7 @@ _yu_yumdb() + esac + + if [ $COMP_CWORD -le 1 ] ; then +- COMPREPLY=( $( compgen -W 'get set del rename rename-force search ++ COMPREPLY=( $( compgen -W 'get set del rename rename-force copy search + exist unset info shell --version --help --noplugins --config' \ + -- "$2" ) ) + fi +-- +1.6.6.1 + + +From 2e5b45d9c4e743f88b085587984a19cc009d282e Mon Sep 17 00:00:00 2001 +From: Michael Schwendt +Date: Tue, 13 Apr 2010 16:19:19 -0400 +Subject: [PATCH 21/24] Get the newer "same day" changelog entries in repodiff. + +Tided by by James. +--- + repodiff.py | 21 ++++++++++++++------- + 1 files changed, 14 insertions(+), 7 deletions(-) + +diff --git a/repodiff.py b/repodiff.py +index ac1865e..ff67fe4 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -198,15 +198,22 @@ def main(args): + # for any newer clog in pkg + # print it + oldlogs = oldpkg.changelog +- oldlogs.sort() +- oldlogs.reverse() + if len(oldlogs): +- oldtime = oldlogs[0][0] +- clogdelta = [] ++ # Don't sort as that can screw the order up when time is the ++ # same. ++ oldtime = oldlogs[-1][0] ++ oldauth = oldlogs[-1][2] ++ oldcontent = oldlogs[-1][2] + for (t, author, content) in pkg.changelog: +- if t > oldtime: +- msg += "* %s %s\n%s\n\n" % (datetime.date.fromtimestamp(int(t)).strftime("%a %b %d %Y"), +- to_unicode(author), to_unicode(content)) ++ if t < oldtime: ++ break ++ if ((t == oldtime) and (author == auth) and ++ (content == oldcontent)): ++ break ++ tm = datetime.date.fromtimestamp(int(t)) ++ tm = tm.strftime("%a %b %d %Y") ++ msg += "* %s %s\n%s\n\n" % (tm, to_unicode(author), ++ to_unicode(content)) + if opts.size: + sizechange = int(pkg.size) - int(oldpkg.size) + total_sizechange += sizechange +-- +1.6.6.1 + + +From 9afba990529f7b2381f907b5341a45a4e9eac08d Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Tue, 13 Apr 2010 16:44:06 -0400 +Subject: [PATCH 22/24] Stupid typo fix + +--- + repodiff.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/repodiff.py b/repodiff.py +index ff67fe4..5f3d5b1 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -207,7 +207,7 @@ def main(args): + for (t, author, content) in pkg.changelog: + if t < oldtime: + break +- if ((t == oldtime) and (author == auth) and ++ if ((t == oldtime) and (author == oldauth) and + (content == oldcontent)): + break + tm = datetime.date.fromtimestamp(int(t)) +-- +1.6.6.1 + + +From cb745dcbca766c7b1a185b938e8eff9792a1317a Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Tue, 13 Apr 2010 18:05:05 -0400 +Subject: [PATCH 23/24] Fix obsoletes processing in repodiff, also giant speedup. Compared output + both before and after and it was identical: + +1. Original with 3.2.27: 8 minutes 27 seconds + +2. Original with returnNewestByName() speedup: 1 minute 50 seconds. + +3. New repodiff with 3.2.27: 11 seconds. + +...tested with Updates/11 vs. Updates/12 on 2010-04-13. +--- + repodiff.py | 74 ++++++++++++++++++++++++++++++++++++---------------------- + 1 files changed, 46 insertions(+), 28 deletions(-) + +diff --git a/repodiff.py b/repodiff.py +index 5f3d5b1..475f599 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -20,6 +20,7 @@ import datetime + import os + import locale + from yum.i18n import to_unicode ++import time + + from optparse import OptionParser + +@@ -59,42 +60,59 @@ class DiffYum(yum.YumBase): + remove = [] + modified = [] + obsoleted = {} # obsoleted = by +- newsack = yum.packageSack.ListPackageSack() +- for repoid in self.dy_repos['new']: +- newsack.addList(self.pkgSack.returnPackages(repoid=repoid)) +- +- oldsack = yum.packageSack.ListPackageSack() +- for repoid in self.dy_repos['old']: +- oldsack.addList(self.pkgSack.returnPackages(repoid=repoid)) +- +- for pkg in newsack.returnNewestByName(): +- tot = self.pkgSack.searchNevra(name=pkg.name) +- if len(tot) == 1: # it's only in new +- add.append(pkg) +- if len(tot) > 1: +- if oldsack.contains(name=pkg.name): +- newest_old = oldsack.returnNewestByName(name=pkg.name)[0] +- if newest_old.EVR != pkg.EVR: +- modified.append((pkg, newest_old)) ++ ++ # Originally we did this by setting up old and new repos. ... but as ++ # a faster way, we can just go through all the pkgs once getting the ++ # newest pkg with a repoid prefix of "old", dito. "new", and then ++ # compare those directly. ++ def _next_old_new(pkgs): ++ """ Returns latest pair of (oldpkg, newpkg) for each package ++ name. If that name doesn't exist, then it returns None for ++ that package. """ ++ lastname = None ++ npkg = opkg = None ++ for pkg in sorted(pkgs): ++ if lastname is None: ++ lastname = pkg.name ++ if lastname != pkg.name: ++ yield opkg, npkg ++ opkg = npkg = None ++ lastname = pkg.name ++ ++ if pkg.repo.id.startswith('old'): ++ opkg = pkg + else: +- add.append(pkg) ++ assert pkg.repo.id.startswith('new') ++ npkg = pkg ++ if opkg is not None or npkg is not None: ++ yield opkg, npkg + +- for pkg in oldsack.returnNewestByName(): +- if len(newsack.searchNevra(name=pkg.name)) == 0: +- remove.append(pkg) ++ for opkg, npkg in _next_old_new(self.pkgSack.returnPackages()): ++ if opkg is None: ++ add.append(npkg) ++ elif npkg is None: ++ remove.append(opkg) ++ elif not npkg.verEQ(opkg): ++ modified.append((npkg, opkg)) + ++ ao = [] ++ for pkg in add: ++ if not pkg.obsoletes: ++ continue ++ ao.append(pkg) + ++ # Note that this _only_ shows something when you have an additional ++ # package obsoleting a removed package. If the obsoleted package is ++ # still there (somewhat "common") or the obsoleter is an update (dito) ++ # you get get hits here. + for po in remove: +- for newpo in add: +- foundit = 0 +- for obs in newpo.obsoletes: +- if po.inPrcoRange('provides', obs): +- foundit = 1 +- obsoleted[po] = newpo +- break +- if foundit: ++ # Remember: Obsoletes are for package names only. ++ poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release)) ++ for newpo in ao: ++ if po.inPrcoRange('obsoletes', poprovtup): ++ obsoleted[po] = newpo + break +- ++ + ygh = yum.misc.GenericHolder() + ygh.add = add + ygh.remove = remove +-- +1.6.6.1 + + +From 99cbe8d6dad9ca8543dedcc5c12bc0f9fdde200e Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Tue, 13 Apr 2010 18:16:03 -0400 +Subject: [PATCH 24/24] Add message about archlist usage, to stop people being confused. + +--- + docs/repodiff.1 | 2 ++ + repodiff.py | 4 ++++ + 2 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/docs/repodiff.1 b/docs/repodiff.1 +index e1ffc3b..640b023 100644 +--- a/docs/repodiff.1 ++++ b/docs/repodiff.1 +@@ -16,6 +16,8 @@ Add a repo. as an old repo. + Add a repo. as an new repo. + .IP "\fB\-\-archlist, -a\fP" + Add architectures to change the default from just comparing source packages. ++Note that if you want the same as a native ++"x86_64" architecture machine you need: x86_64,athlon,i686,i586,i486,i386,noarch + .IP "\fB\-\-size, -s\fP" + Ouput additional data about the size of the changes. + .SH "EXAMPLES" +diff --git a/repodiff.py b/repodiff.py +index 475f599..0a1c42f 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -239,6 +239,10 @@ def main(args): + + print msg + ++ if (not ygh.add and not ygh.remove and not ygh.modified and ++ not my.pkgSack.searchNevra(arch='src')): ++ print "** No 'src' pkgs in any repo. maybe see docs. on --archlist?" ++ + print 'Summary:' + print 'Added Packages: %s' % len(ygh.add) + print 'Removed Packages: %s' % len(ygh.remove) +-- +1.6.6.1 + diff --git a/yum-utils.spec b/yum-utils.spec index 79614bd..cc5198c 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -466,6 +466,7 @@ fi %{_mandir}/man1/yum-debug-dump.1.* %{_mandir}/man8/yum-complete-transaction.8.* %{_mandir}/man1/yum-groups-manager.1.* +%{_mandir}/man8/yumdb.8.* %{_mandir}/man1/yumdownloader.1.* %files -n yum-updateonboot From 138709b6a0f675e5a572a299c3d334f057ff91da Mon Sep 17 00:00:00 2001 From: James Antill Date: Thu, 15 Apr 2010 04:55:08 +0000 Subject: [PATCH 04/86] - Get lots of fixes from latest HEAD. Also: - --alldeps default in repoquery. - repoquery will now do a full provides version check. - Add repoclosure --group. - Big repodiff speedup. --- yum-utils-HEAD.patch | 19 +++++++++++++++++++ yum-utils.spec | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch index 3dab6b0..503a277 100644 --- a/yum-utils-HEAD.patch +++ b/yum-utils-HEAD.patch @@ -1616,3 +1616,22 @@ index 475f599..0a1c42f 100755 -- 1.6.6.1 +commit 9c647a75528566c0abf7bf4d0ed8c8c03e6223a5 +Author: James Antill +Date: Thu Apr 15 00:54:03 2010 -0400 + + Fix typo on obsoletes check, in repodiff + +diff --git a/repodiff.py b/repodiff.py +index 0a1c42f..2810108 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -109,7 +109,7 @@ class DiffYum(yum.YumBase): + # Remember: Obsoletes are for package names only. + poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release)) + for newpo in ao: +- if po.inPrcoRange('obsoletes', poprovtup): ++ if newpo.inPrcoRange('obsoletes', poprovtup): + obsoleted[po] = newpo + break + diff --git a/yum-utils.spec b/yum-utils.spec index cc5198c..8d96944 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,7 +1,7 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.26 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz @@ -623,7 +623,7 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog -* Wed Apr 14 2010 James Antill - 1.1.26-2 +* Wed Apr 14 2010 James Antill - 1.1.26-3 - Get lots of fixes from latest HEAD. Also: - --alldeps default in repoquery. - repoquery will now do a full provides version check. From 14a7e051f142729497af90e7b7229e113968fbb7 Mon Sep 17 00:00:00 2001 From: James Antill Date: Fri, 16 Apr 2010 18:52:08 +0000 Subject: [PATCH 05/86] - Fix the changelog entry time comparison in repodiff. --- yum-utils-HEAD.patch | 23 +++++++++++++++++++++++ yum-utils.spec | 5 ++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch index 503a277..941998e 100644 --- a/yum-utils-HEAD.patch +++ b/yum-utils-HEAD.patch @@ -1635,3 +1635,26 @@ index 0a1c42f..2810108 100755 obsoleted[po] = newpo break +commit 007bf5d4fd3147b51390d7124e64b3e431c831a9 +Author: James Antill +Date: Fri Apr 16 14:50:27 2010 -0400 + + Use the newest old changelog entry, not the oldest ... *sigh* + +diff --git a/repodiff.py b/repodiff.py +index 2810108..bc2cbf7 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -219,9 +219,9 @@ def main(args): + if len(oldlogs): + # Don't sort as that can screw the order up when time is the + # same. +- oldtime = oldlogs[-1][0] +- oldauth = oldlogs[-1][2] +- oldcontent = oldlogs[-1][2] ++ oldtime = oldlogs[0][0] ++ oldauth = oldlogs[0][2] ++ oldcontent = oldlogs[0][2] + for (t, author, content) in pkg.changelog: + if t < oldtime: + break diff --git a/yum-utils.spec b/yum-utils.spec index 8d96944..f2afff6 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,7 +1,7 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.26 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz @@ -623,6 +623,9 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog +* Fri Apr 16 2010 James Antill - 1.1.26-4 +- Fix the changelog entry time comparison in repodiff. + * Wed Apr 14 2010 James Antill - 1.1.26-3 - Get lots of fixes from latest HEAD. Also: - --alldeps default in repoquery. From 232d8fa28f167fa7b9d0f395d57fdb699dda2a11 Mon Sep 17 00:00:00 2001 From: James Antill Date: Sun, 18 Apr 2010 05:46:14 +0000 Subject: [PATCH 06/86] - Fix the changelog entry time comparison in repodiff, again. --- yum-utils-HEAD.patch | 21 +++++++++++++++++++++ yum-utils.spec | 5 ++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch index 941998e..20725f6 100644 --- a/yum-utils-HEAD.patch +++ b/yum-utils-HEAD.patch @@ -1658,3 +1658,24 @@ index 2810108..bc2cbf7 100755 for (t, author, content) in pkg.changelog: if t < oldtime: break +commit 3d9cf740ee9c9c2fbf8e408fe0eb2d46c1a88a00 +Author: James Antill +Date: Sun Apr 18 01:44:24 2010 -0400 + + One more fix for the changelog time comparison + +diff --git a/repodiff.py b/repodiff.py +index bc2cbf7..805e3b0 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -225,8 +225,8 @@ def main(args): + for (t, author, content) in pkg.changelog: + if t < oldtime: + break +- if ((t == oldtime) and (author == oldauth) and +- (content == oldcontent)): ++ if ((t == oldtime) and ((author != oldauth) or ++ (content != oldcontent)): + break + tm = datetime.date.fromtimestamp(int(t)) + tm = tm.strftime("%a %b %d %Y") diff --git a/yum-utils.spec b/yum-utils.spec index f2afff6..86355d1 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,7 +1,7 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.26 -Release: 4%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz @@ -623,6 +623,9 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog +* Sat Apr 17 2010 James Antill - 1.1.26-6 +- Fix the changelog entry time comparison in repodiff, again. + * Fri Apr 16 2010 James Antill - 1.1.26-4 - Fix the changelog entry time comparison in repodiff. From 5b04f29c7674730dca2533b1a27f786c81553284 Mon Sep 17 00:00:00 2001 From: James Antill Date: Sun, 18 Apr 2010 06:09:42 +0000 Subject: [PATCH 07/86] - Fix the changelog entry time comparison in repodiff, again. --- yum-utils-HEAD.patch | 24 +++++++++++------------- yum-utils.spec | 4 ++-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch index 20725f6..7f1000a 100644 --- a/yum-utils-HEAD.patch +++ b/yum-utils-HEAD.patch @@ -1658,24 +1658,22 @@ index 2810108..bc2cbf7 100755 for (t, author, content) in pkg.changelog: if t < oldtime: break -commit 3d9cf740ee9c9c2fbf8e408fe0eb2d46c1a88a00 +commit d4722ce74fe655888fa9d5b02090a56f6e137ce0 Author: James Antill -Date: Sun Apr 18 01:44:24 2010 -0400 +Date: Sun Apr 18 02:08:39 2010 -0400 - One more fix for the changelog time comparison + Fix the actual bug in repodiff, comparison diff --git a/repodiff.py b/repodiff.py -index bc2cbf7..805e3b0 100755 +index bc2cbf7..7ef7c50 100755 --- a/repodiff.py +++ b/repodiff.py -@@ -225,8 +225,8 @@ def main(args): +@@ -220,7 +220,7 @@ def main(args): + # Don't sort as that can screw the order up when time is the + # same. + oldtime = oldlogs[0][0] +- oldauth = oldlogs[0][2] ++ oldauth = oldlogs[0][1] + oldcontent = oldlogs[0][2] for (t, author, content) in pkg.changelog: if t < oldtime: - break -- if ((t == oldtime) and (author == oldauth) and -- (content == oldcontent)): -+ if ((t == oldtime) and ((author != oldauth) or -+ (content != oldcontent)): - break - tm = datetime.date.fromtimestamp(int(t)) - tm = tm.strftime("%a %b %d %Y") diff --git a/yum-utils.spec b/yum-utils.spec index 86355d1..a81b308 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,7 +1,7 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.26 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz @@ -623,7 +623,7 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog -* Sat Apr 17 2010 James Antill - 1.1.26-6 +* Sat Apr 17 2010 James Antill - 1.1.26-7 - Fix the changelog entry time comparison in repodiff, again. * Fri Apr 16 2010 James Antill - 1.1.26-4 From e997a074e323471a9ae1ba837d9d3b1da227afd2 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Mon, 17 May 2010 14:06:52 +0000 Subject: [PATCH 08/86] backport latest from rawhide --- yum-utils-HEAD.patch | 1679 ++++++++++++++++++++++++++++++++++++++++++ yum-utils.spec | 19 +- 2 files changed, 1697 insertions(+), 1 deletion(-) create mode 100644 yum-utils-HEAD.patch diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch new file mode 100644 index 0000000..7f1000a --- /dev/null +++ b/yum-utils-HEAD.patch @@ -0,0 +1,1679 @@ +From bc3d026acd1c8f332d024bf9a9918da6451c8c07 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Tue, 9 Feb 2010 21:35:15 +0200 +Subject: [PATCH 01/24] Make --alldeps the default in repoquery. + +--alldeps is what people really almost always want, but fail to +specify for some reason. --exactdeps can be used to get the previous +default of exact matching. +--- + docs/repoquery.1 | 10 +++++++--- + repoquery.py | 6 ++++-- + yum-utils.bash | 2 +- + 3 files changed, 12 insertions(+), 6 deletions(-) + +diff --git a/docs/repoquery.1 b/docs/repoquery.1 +index 1056c80..e5ed8b7 100644 +--- a/docs/repoquery.1 ++++ b/docs/repoquery.1 +@@ -107,8 +107,12 @@ Query all packages that provide CAPABILITY. + .IP "\fB\-\-whatrequires CAPABILITY\fP" + Query all packages that require CAPABILITY. + .IP "\fB\-\-alldeps\fP" +-When used with --whatrequires, use both automatic and manual dependencies +-for the query. ++When used with --whatrequires, look for non-explicit dependencies in ++addition to explicit ones (e.g. files and Provides in addition to ++package names). This is the default. ++.IP "\fB\-\-exactdeps\fP" ++When used with --whatrequires, search for dependencies only exactly as given. ++This is effectively the opposite of --alldeps. + .IP "\fB\-\-recursive\fP" + When used with --whatrequires, query packages recursively. + .IP "\fB\-\-archlist=ARCH1[,ARCH2...]\fP" +@@ -147,7 +151,7 @@ Query groups instead of packages. + .IP "List all packages whose name contains 'perl':" + \fBrepoquery '*perl*'\fP + .IP "List all packages depending on openssl:" +-\fBrepoquery --whatrequires --alldeps openssl\fP ++\fBrepoquery --whatrequires openssl\fP + .IP "List all package names and the repository they come from, nicely formatted:" + \fBrepoquery -a --qf "%-20{repoid} %{name}"\fP + .IP "List name and summary of all available updates (if any), nicely formatted:" +diff --git a/repoquery.py b/repoquery.py +index 2e3004b..3e2c18a 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -647,8 +647,10 @@ def main(args): + help="operate on corresponding source RPM") + parser.add_option("--resolve", action="store_true", + help="resolve capabilities to originating package(s)") +- parser.add_option("--alldeps", action="store_true", +- help="check non-explicit dependencies (files and Provides:) as well") ++ parser.add_option("--alldeps", action="store_true", default=True, ++ help="check non-explicit dependencies (files and Provides:) as well, defaults to on") ++ parser.add_option("--exactdeps", dest="alldeps", action="store_false", ++ help="check dependencies exactly as given, opposite of --alldeps") + parser.add_option("--recursive", action="store_true", + help="recursively query for packages (for whatrequires)") + parser.add_option("--whatprovides", action="store_true", +diff --git a/yum-utils.bash b/yum-utils.bash +index d8ca1dd..7df1b49 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -210,7 +210,7 @@ _yu_repoquery() + COMPREPLY=( $( compgen -W '--version --help --list --info --file + --queryformat --groupmember --all --requires --provides --obsoletes + --conflicts --changelog --location --nevra --envra --nvr --source +- --srpm --resolve --alldeps --recursive --whatprovides --whatrequires ++ --srpm --resolve --exactdeps --recursive --whatprovides --whatrequires + --whatobsoletes --whatconflicts --group --grouppkgs --archlist + --pkgnarrow --show-duplicates --repoid --enablerepo --disablerepo + --repofrompath --plugins --quiet --verbose --cache --tempcache +-- +1.6.6.1 + + +From efc35f8de0475db1bfe27eb04a93f571a23ce8b7 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Mon, 15 Feb 2010 22:01:50 -0500 +Subject: [PATCH 02/24] make repoquery pass in the whole string not just split for names + +--- + repoquery.py | 5 +---- + 1 files changed, 1 insertions(+), 4 deletions(-) + +diff --git a/repoquery.py b/repoquery.py +index 2e3004b..c2b8c03 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -554,10 +554,7 @@ class YumBaseQuery(yum.YumBase): + provs.extend(pkg.files()) + + for prov in provs: +- # Only look at the providing name, not the whole version. This +- # might occasionally give some false positives but that's +- # better than missing ones which it had previously +- for pkg in self.pkgSack.searchRequires(prov.split()[0]): ++ for pkg in self.pkgSack.searchRequires(prov): + pkgs[pkg.pkgtup] = pkg + if self.options.recursive: + require_recursive(pkg.name) +-- +1.6.6.1 + + +From 493450d26d04e3f61470e21f7db717e7d98e3d57 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Thu, 25 Feb 2010 12:58:35 -0500 +Subject: [PATCH 03/24] move around where we query for pkgs from sackops/prcos and what happens if no special output format + is specified in repoquery. + +makes: +repoquery -qfi /bin/bash output -qi output rather than -q output. +--- + repoquery.py | 19 +++++++++++-------- + 1 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/repoquery.py b/repoquery.py +index 0a56430..225a4cb 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -504,10 +504,21 @@ class YumBaseQuery(yum.YumBase): + else: + if self.options.srpm: + pkgs = self.matchSrcPkgs(items) ++ + else: + pkgs = self.matchPkgs(items) ++ for prco in items: ++ for oper in self.sackops: ++ try: ++ for p in self.doQuery(oper, prco): ++ if p: ++ pkgs.append(p) ++ except queryError, e: ++ self.logger.error( e.msg) + + for pkg in pkgs: ++ if not self.pkgops: ++ print to_unicode(pkg) + for oper in self.pkgops: + try: + out = pkg.doQuery(oper) +@@ -515,14 +526,6 @@ class YumBaseQuery(yum.YumBase): + print to_unicode(out) + except queryError, e: + self.logger.error( e.msg) +- for prco in items: +- for oper in self.sackops: +- try: +- for p in self.doQuery(oper, prco): +- if p: +- print p +- except queryError, e: +- self.logger.error( e.msg) + + def doQuery(self, method, *args, **kw): + return getattr(self, "fmt_%s" % method)(*args, **kw) +-- +1.6.6.1 + + +From f0bee60c3fc81325e547d0f8bf42591368d18ee4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Sat, 27 Feb 2010 14:21:02 +0200 +Subject: [PATCH 04/24] Fix --releasever. + +--- + repoquery.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/repoquery.py b/repoquery.py +index 225a4cb..eb524f3 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -774,7 +774,7 @@ def main(args): + + # silence initialisation junk from modules etc unless verbose mode + initnoise = (not opts.quiet) * 2 +- repoq.releasever = opts.releasever ++ repoq.preconf.releasever = opts.releasever + if opts.conffile: + repoq.doConfigSetup(fn=opts.conffile, debuglevel=initnoise, init_plugins=opts.plugins) + else: +-- +1.6.6.1 + + +From b15cb0760c864cadc5029474d07cc38882ec1815 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Mon, 1 Mar 2010 14:58:27 -0500 +Subject: [PATCH 05/24] catch all yum errors and valueError (which is coming from yum.config.py :() + generally this just means we'll get less ABRT errors and more reports from users + +(I hope) +--- + repoclosure.py | 7 ++++++- + 1 files changed, 6 insertions(+), 1 deletions(-) + +diff --git a/repoclosure.py b/repoclosure.py +index 5076fe8..8c27cdd 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -273,5 +273,10 @@ def main(): + my.logger.info(' %s' % req) + + if __name__ == "__main__": +- main() ++ try: ++ main() ++ except (yum.Errors.YumBaseError, ValueError), e: ++ print >> sys.stderr, str(e) ++ sys.exit(1) ++ + +-- +1.6.6.1 + + +From 30e58c85e07abe939ff3c9af017f8355f81a4f32 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Mon, 1 Mar 2010 15:27:57 -0500 +Subject: [PATCH 06/24] setup some repo features that make sense for the debug repos to + inherit from the non-debug repos when we add them + +--- + debuginfo-install.py | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/debuginfo-install.py b/debuginfo-install.py +index 242be65..dc41b5f 100755 +--- a/debuginfo-install.py ++++ b/debuginfo-install.py +@@ -90,6 +90,11 @@ class DebugInfoInstall(YumUtilBase): + r.enable() + try: + self.doRepoSetup(thisrepo=r.id) ++ for opt in ['repo_gpgcheck', 'gpgcheck', 'cost', ++ 'skip_if_unavailable']: ++ if hasattr(r, opt): ++ setattr(r, opt, getattr(repo, opt)) ++ + except yum.Errors.RepoError, e: + self.logger.critical("Could not access repo %s error was: %s" % + (r.id, to_unicode(str(e)))) +-- +1.6.6.1 + + +From c65516666fdca02f6f1500134d8a6832176320c7 Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Mon, 1 Mar 2010 22:57:07 -0500 +Subject: [PATCH 07/24] Add yum-utils to the run_with_packages when running y-c-t + +--- + yum-complete-transaction.py | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/yum-complete-transaction.py b/yum-complete-transaction.py +index ba41a51..0a9f5df 100755 +--- a/yum-complete-transaction.py ++++ b/yum-complete-transaction.py +@@ -161,6 +161,7 @@ class YumCompleteTransaction(YumUtilBase): + # populate the ts + # run it + ++ self.run_with_package_names.add('yum-utils') + times = [] + for thistime in find_unfinished_transactions(self.conf.persistdir): + if thistime.endswith('disabled'): +-- +1.6.6.1 + + +From 37454f631436624cfeda72496757c6206420cc78 Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Mon, 1 Mar 2010 22:58:53 -0500 +Subject: [PATCH 08/24] Add yum-utils to the run_with_packages when running pkg-cleanup + +--- + package-cleanup.py | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/package-cleanup.py b/package-cleanup.py +index 3f5507f..ca4aa9a 100755 +--- a/package-cleanup.py ++++ b/package-cleanup.py +@@ -335,6 +335,7 @@ class PackageCleanup(YumUtilBase): + sys.exit(100) + + self._remove_old_kernels(opts.kernelcount, opts.keepdevel) ++ self.run_with_package_names.add('yum-utils') + self.buildTransaction() + if len(self.tsInfo) < 1: + print 'No old kernels to remove' +@@ -371,6 +372,7 @@ class PackageCleanup(YumUtilBase): + if opts.noscripts: + self.conf.tsflags.append('noscripts') + self._remove_old_dupes() ++ self.run_with_package_names.add('yum-utils') + self.buildTransaction() + if len(self.tsInfo) < 1: + print 'No duplicates to remove' +-- +1.6.6.1 + + +From 94b52cb5499b47cb4e2b64c8a2e4e7863b2e965e Mon Sep 17 00:00:00 2001 +From: Tim Lauridsen +Date: Tue, 2 Mar 2010 12:18:31 +0100 +Subject: [PATCH 09/24] Make repoclosure work with relative paths, like ./myrepo or just . + +--- + repoclosure.py | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/repoclosure.py b/repoclosure.py +index 8c27cdd..9bfc007 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -60,7 +60,7 @@ def parseArgs(): + parser.add_option("-n", "--newest", default=0, action="store_true", + help="check only the newest packages in the repos") + parser.add_option("--repofrompath", action="append", +- help="specify repoid & paths of additional repositories - unique repoid and complete path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") ++ help="specify repoid & paths of additional repositories - unique repoid and path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") + parser.add_option("-p", "--pkg", action="append", + help="check closure for this package only") + (opts, args) = parser.parse_args() +@@ -195,12 +195,12 @@ def main(): + # setup the fake repos + for repo in opts.repofrompath: + repoid,repopath = tuple(repo.split(',')) ++ repopath = os.path.abspath(repopath) + if repopath[0] == '/': + baseurl = 'file://' + repopath + else: + baseurl = repopath + +- repopath = os.path.normpath(repopath) + newrepo = yum.yumRepo.YumRepository(repoid) + newrepo.name = repopath + newrepo.baseurl = baseurl +-- +1.6.6.1 + + +From 7cece362ea4c2f9c6619339775adb5975e022275 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Wed, 10 Mar 2010 21:13:00 +0200 +Subject: [PATCH 10/24] Add bash completion for yumdb. + +--- + yum-utils.bash | 27 +++++++++++++++++++++++++++ + 1 files changed, 27 insertions(+), 0 deletions(-) + +diff --git a/yum-utils.bash b/yum-utils.bash +index 7df1b49..1ff3fbd 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -218,6 +218,33 @@ _yu_repoquery() + } && + complete -F _yu_repoquery -o filenames repoquery repoquery.py + ++# yumdb ++_yu_yumdb() ++{ ++ COMPREPLY=() ++ ++ case "$3" in ++ -h|--help|-version) ++ return 0 ++ ;; ++ -c|--config) ++ COMPREPLY=( $( compgen -f -o plusdirs -X '!*.conf' -- "$2" ) ) ++ return 0 ++ ;; ++ shell) ++ COMPREPLY=( $( compgen -f -o plusdirs -- "$2" ) ) ++ return 0 ++ ;; ++ esac ++ ++ if [ $COMP_CWORD -le 1 ] ; then ++ COMPREPLY=( $( compgen -W 'get set del rename rename-force search ++ exist unset info shell --version --help --noplugins --config' \ ++ -- "$2" ) ) ++ fi ++} && ++complete -F _yu_yumdb -o filenames yumdb yumdb.py ++ + # Local variables: + # mode: shell-script + # sh-basic-offset: 4 +-- +1.6.6.1 + + +From 421ba27da401618dd10d1a31801df01b89277585 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Fri, 26 Mar 2010 22:58:45 +0200 +Subject: [PATCH 11/24] Complete on repomanage.py, package-cleanup.py, and verifytree.py. + +--- + yum-utils.bash | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/yum-utils.bash b/yum-utils.bash +index 1ff3fbd..308d82b 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -23,7 +23,7 @@ _yu_repomanage() + + COMPREPLY=( $( compgen -d -- "$2" ) ) + } && +-complete -F _yu_repomanage -o filenames repomanage ++complete -F _yu_repomanage -o filenames repomanage repomanage.py + + # package-cleanup + _yu_package_cleanup() +@@ -49,7 +49,7 @@ _yu_package_cleanup() + --cleandupes --oldkernels --count --keepdevel -c --queryformat' \ + -- "$2" ) ) + } && +-complete -F _yu_package_cleanup -o filenames package-cleanup ++complete -F _yu_package_cleanup -o filenames package-cleanup package-cleanup.py + + # verifytree + _yu_verifytree() +@@ -70,7 +70,7 @@ _yu_verifytree() + + COMPREPLY=( $( compgen -d -- "$2" ) ) + } && +-complete -F _yu_verifytree -o filenames verifytree ++complete -F _yu_verifytree -o filenames verifytree verifytree.py + + # repo-graph + _yu_repo_graph() +-- +1.6.6.1 + + +From 25ceb993e0bda203804c3e8241df5d1942eab303 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Tue, 30 Mar 2010 23:04:44 +0300 +Subject: [PATCH 12/24] Use "in" instead of has_key. + +--- + package-cleanup.py | 2 +- + plugins/changelog/changelog.py | 4 ++-- + .../fastestmirror-asyncore.py | 2 +- + plugins/fedorakmod/fedorakmod.py | 9 +++++---- + plugins/fs-snapshot/fs-snapshot.py | 2 +- + .../post-transaction-actions.py | 2 +- + plugins/priorities/priorities.py | 10 +++++----- + plugins/protectbase/protectbase.py | 2 +- + plugins/remove-with-leaves/remove-with-leaves.py | 2 +- + plugins/upgrade-helper/upgrade-helper.py | 8 ++++---- + repo-graph.py | 4 ++-- + repo-rss.py | 2 +- + repoclosure.py | 6 +++--- + repodiff.py | 2 +- + repomanage.py | 4 ++-- + repoquery.py | 6 +++--- + reposync.py | 2 +- + repotrack.py | 5 ++--- + yum-debug-dump.py | 2 +- + 19 files changed, 38 insertions(+), 38 deletions(-) + +diff --git a/package-cleanup.py b/package-cleanup.py +index ca4aa9a..c796286 100755 +--- a/package-cleanup.py ++++ b/package-cleanup.py +@@ -129,7 +129,7 @@ class PackageCleanup(YumUtilBase): + for (req,flags,ver) in po.requires: + + if req.startswith('rpmlib'): continue # ignore rpmlib deps +- if not providers.has_key((req,flags,ver)): ++ if (req,flags,ver) not in providers: + resolve_sack = self.rpmdb.whatProvides(req,flags,ver) + else: + resolve_sack = providers[(req,flags,ver)] +diff --git a/plugins/changelog/changelog.py b/plugins/changelog/changelog.py +index 250326f..007ac6d 100644 +--- a/plugins/changelog/changelog.py ++++ b/plugins/changelog/changelog.py +@@ -58,7 +58,7 @@ def srpmname(pkg): + def _show_changes_changelog(conduit, srpms): + for name in sorted(srpms.keys()): + rpms = [] +- if origpkgs.has_key(name): ++ if name in origpkgs: + for rpm in srpms[name]: + rpms.append("%s" % rpm) + done = False +@@ -85,7 +85,7 @@ def show_changes(conduit, msg): + if not tsmem.updates: + continue + name = srpmname(tsmem.po) +- if srpms.has_key(name): ++ if name in srpms: + srpms[name].append(tsmem.po) + else: + srpms[name] = [tsmem.po] +diff --git a/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py b/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py +index 8129e2c..11c394f 100644 +--- a/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py ++++ b/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py +@@ -135,7 +135,7 @@ def postreposetup_hook(conduit): + repomirrors = {} + repos = conduit.getRepos() + for repo in repos.listEnabled(): +- if not repomirrors.has_key(str(repo)): ++ if str(repo) not in repomirrors: + repomirrors[str(repo)] = FastestMirror(repo.urls).get_mirrorlist() + if exclude: + for mirror in repomirrors[str(repo)]: +diff --git a/plugins/fedorakmod/fedorakmod.py b/plugins/fedorakmod/fedorakmod.py +index ab9f673..b3aed61 100644 +--- a/plugins/fedorakmod/fedorakmod.py ++++ b/plugins/fedorakmod/fedorakmod.py +@@ -140,7 +140,7 @@ def resolveVersions(packageList): + continue + po.kmodName = name[0] + +- if not pdict.has_key(kernel): ++ if kernel not in pdict: + pdict[kernel] = [po] + else: + sameName = None +@@ -208,7 +208,7 @@ def pinKernels(c, newKernels, installedKernels, modules): + str(runningKernel)) + + table = resolveVersions(modules) +- if not table.has_key(runningKernel): ++ if runningKernel not in table: + c.info(2, "Trying to mimic %s which has no kernel modules installed" \ + % str(runningKernel)) + return +@@ -217,7 +217,7 @@ def pinKernels(c, newKernels, installedKernels, modules): + c.info(2, "kmods in %s: %s" % (str(runningKernel), str(names))) + for kpo in newKernels: + prov = getKernelProvides(kpo)[0] +- if table.has_key(prov): ++ if prov in table: + kmods = [ po.kmodName for po in table[prov] ] + else: + kmods = [] +@@ -255,7 +255,8 @@ def installAllKmods(c, avaModules, modules, kernels): + table = resolveVersions(interesting + modules) + + for kernel in [ getKernelProvides(k)[0] for k in kernels ]: +- if not table.has_key(kernel): continue ++ if kernel not in table: ++ continue + for po in table[kernel]: + if po not in modules: + c.getTsInfo().addTrueInstall(po) +diff --git a/plugins/fs-snapshot/fs-snapshot.py b/plugins/fs-snapshot/fs-snapshot.py +index f0ce051..a83156d 100644 +--- a/plugins/fs-snapshot/fs-snapshot.py ++++ b/plugins/fs-snapshot/fs-snapshot.py +@@ -178,7 +178,7 @@ def _create_snapshot(conduit, snapshot_tag, volume): + """ + if volume["fstype"] == "btrfs": + return _create_btrfs_snapshot(conduit, snapshot_tag, volume) +- elif volume.has_key(lvm_key): ++ elif lvm_key in volume: + return _create_lvm_snapshot(conduit, snapshot_tag, volume) + + return 0 +diff --git a/plugins/post-transaction-actions/post-transaction-actions.py b/plugins/post-transaction-actions/post-transaction-actions.py +index 7b94b90..b4da1ce 100644 +--- a/plugins/post-transaction-actions/post-transaction-actions.py ++++ b/plugins/post-transaction-actions/post-transaction-actions.py +@@ -62,7 +62,7 @@ def parse_actions(ddir, conduit): + + def _get_installed_po(rpmdb, pkgtup): + (n,a,e,v,r) = pkgtup +- if _just_installed.has_key(pkgtup): ++ if pkgtup in _just_installed: + return _just_installed[pkgtup] + return rpmdb.searchNevra(name=n, arch=a, epoch=e, ver=v, rel=r)[0] + +diff --git a/plugins/priorities/priorities.py b/plugins/priorities/priorities.py +index 3650736..ddee1cb 100644 +--- a/plugins/priorities/priorities.py ++++ b/plugins/priorities/priorities.py +@@ -134,11 +134,11 @@ def exclude_hook(conduit): + + if only_samearch: + key = "%s.%s" % (po.name,po.arch) +- if pkg_priorities.has_key(key) and pkg_priorities[key] < repo.priority: ++ if key in pkg_priorities and pkg_priorities[key] < repo.priority: + delPackage = True + else: + key = "%s" % po.name +- if pkg_priorities_archless.has_key(key) and pkg_priorities_archless[key] < repo.priority: ++ if key in pkg_priorities_archless and pkg_priorities_archless[key] < repo.priority: + delPackage = True + + if delPackage: +@@ -150,11 +150,11 @@ def exclude_hook(conduit): + # one of the obsoleted packages is not available through + # a repo with a higher priority. If so, remove this package. + if check_obsoletes: +- if obsoletes.has_key(po.pkgtup): ++ if po.pkgtup in obsoletes: + obsolete_pkgs = obsoletes[po.pkgtup] + for obsolete_pkg in obsolete_pkgs: + pkg_name = obsolete_pkg[0] +- if pkg_priorities_archless.has_key(pkg_name) and pkg_priorities_archless[pkg_name] < repo.priority: ++ if pkg_name in pkg_priorities_archless and pkg_priorities_archless[pkg_name] < repo.priority: + conduit.delPackage(po) + cnt += 1 + conduit.info(3," --> %s from %s excluded (priority)" % (po,po.repoid)) +@@ -173,5 +173,5 @@ def _pkglist_to_dict(pl, priority, addArch = False): + + def _mergeprioritydicts(dict1, dict2): + for package in dict2.keys(): +- if not dict1.has_key(package) or dict2[package] < dict1[package]: ++ if package not in dict1 or dict2[package] < dict1[package]: + dict1[package] = dict2[package] +diff --git a/plugins/protectbase/protectbase.py b/plugins/protectbase/protectbase.py +index 441cdba..37a39dd 100644 +--- a/plugins/protectbase/protectbase.py ++++ b/plugins/protectbase/protectbase.py +@@ -55,7 +55,7 @@ def exclude_hook(conduit): + continue + + for po in conduit.getPackages(repo2): +- if repo1pkgs.has_key(po.name): ++ if po.name in repo1pkgs: + conduit.delPackage(po) + cnt += 1 + +diff --git a/plugins/remove-with-leaves/remove-with-leaves.py b/plugins/remove-with-leaves/remove-with-leaves.py +index 004472f..a808aef 100644 +--- a/plugins/remove-with-leaves/remove-with-leaves.py ++++ b/plugins/remove-with-leaves/remove-with-leaves.py +@@ -42,7 +42,7 @@ remove_always = False + + + def _requires_this_package(rpmdb, pkg): +- if _requires_cache.has_key(pkg): ++ if pkg in _requires_cache: + return _requires_cache[pkg] + + requirers = {} +diff --git a/plugins/upgrade-helper/upgrade-helper.py b/plugins/upgrade-helper/upgrade-helper.py +index fd76c4f..9aa05f0 100644 +--- a/plugins/upgrade-helper/upgrade-helper.py ++++ b/plugins/upgrade-helper/upgrade-helper.py +@@ -68,11 +68,11 @@ def parse_xml(xmlfile): + child_name = ns_cleanup(child.tag) + thisarch = myarch + if child_name == 'removespec': +- if child.attrib.has_key('on_arch'): ++ if 'on_arch' in child.attrib: + thisarch = child.attrib.get('on_arch') +- if child.attrib.has_key('pkgmatch'): ++ if 'pkgmatch' in child.attrib: + thismatch = child.attrib.get('pkgmatch') +- if results.has_key(thisarch): ++ if thisarch in results: + if thismatch not in results[thisarch]: + results[thisarch].append(thismatch) + else: +@@ -89,7 +89,7 @@ def stuff_to_remove(repos): + # return them as the toremove list + + for repo in repos.listEnabled(): +- if repo.repoXML.repoData.has_key('cleanup'): ++ if 'cleanup' in repo.repoXML.repoData: + trf = repo.retrieveMD('cleanup') + tr_dict = parse_xml(trf) + # prune out things like *, ?, *.*, *.*.*.*.* +diff --git a/repo-graph.py b/repo-graph.py +index e771874..bb901a8 100755 +--- a/repo-graph.py ++++ b/repo-graph.py +@@ -69,7 +69,7 @@ class yumQuiet(yum.YumBase): + for r in pkg.returnPrco('requires'): + reqname = r[0] + if reqname.startswith('rpmlib'): continue +- if prov.has_key(reqname): ++ if reqname in prov: + provider = prov[reqname] + cached += 1 + else: +@@ -83,7 +83,7 @@ class yumQuiet(yum.YumBase): + prov[reqname] = provider + if provider == pkg.name: + xx[provider] = None +- if xx.has_key(provider) or provider in skip: ++ if provider in xx or provider in skip: + continue + else: + xx[provider] = None +diff --git a/repo-rss.py b/repo-rss.py +index f395089..845c65e 100755 +--- a/repo-rss.py ++++ b/repo-rss.py +@@ -45,7 +45,7 @@ class YumQuiet(yum.YumBase): + for po in avail: + ftime = int(po.returnSimple('filetime')) + if ftime > recentlimit: +- if not ftimehash.has_key(ftime): ++ if ftime not in ftimehash: + ftimehash[ftime] = [po] + else: + ftimehash[ftime].append(po) +diff --git a/repoclosure.py b/repoclosure.py +index 9bfc007..d9a94d7 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -153,7 +153,7 @@ class RepoClosure(yum.YumBase): + if req.startswith('rpmlib'): continue # ignore rpmlib deps + + ver = self.evrTupletoVer((reqe, reqv, reqr)) +- if resolved.has_key((req,flags,ver)): ++ if (req,flags,ver) in resolved: + continue + try: + resolve_sack = self.whatProvides(req, flags, ver) +@@ -161,7 +161,7 @@ class RepoClosure(yum.YumBase): + pass + + if len(resolve_sack) < 1: +- if not unresolved.has_key(pkg): ++ if pkg not in unresolved: + unresolved[pkg] = [] + unresolved[pkg].append((req, flags, ver)) + continue +@@ -176,7 +176,7 @@ class RepoClosure(yum.YumBase): + if resolved_by_newest: + resolved[(req,flags,ver)] = 1 + else: +- if not unresolved.has_key(pkg): ++ if pkg not in unresolved: + unresolved[pkg] = [] + unresolved[pkg].append((req, flags, ver)) + +diff --git a/repodiff.py b/repodiff.py +index 5b547c0..ac1865e 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -184,7 +184,7 @@ def main(args): + if ygh.remove: + for pkg in sorted(ygh.remove): + print 'Removed package %s' % pkg.name +- if ygh.obsoleted.has_key(pkg): ++ if pkg in ygh.obsoleted: + print 'Obsoleted by %s' % ygh.obsoleted[pkg] + remove_sizechange += (int(pkg.size)) + +diff --git a/repomanage.py b/repomanage.py +index 759bf30..aeff9e5 100755 +--- a/repomanage.py ++++ b/repomanage.py +@@ -158,11 +158,11 @@ def main(args): + (n,a,e,v,r) = pkgtuple + del hdr + +- if not pkgdict.has_key((n,a)): ++ if (n,a) not in pkgdict: + pkgdict[(n,a)] = [] + pkgdict[(n,a)].append((e,v,r)) + +- if not verfile.has_key(pkgtuple): ++ if pkgtuple not in verfile: + verfile[pkgtuple] = [] + verfile[pkgtuple].append(pkg) + +diff --git a/repoquery.py b/repoquery.py +index eb524f3..76b1178 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -146,7 +146,7 @@ class pkgQuery: + if len(tmp) > 1: + item = tmp[0] + conv = tmp[1] +- if convertmap.has_key(conv): ++ if conv in convertmap: + convert = convertmap[conv] + else: + raise queryError("Invalid conversion: %s" % conv) +@@ -168,7 +168,7 @@ class pkgQuery: + return self.fmt_queryformat() + + def doQuery(self, method, *args, **kw): +- if std_qf.has_key(method): ++ if method in std_qf: + self.qf = std_qf[method] + return self.fmt_queryformat() + elif hasattr(self, "fmt_%s" % method): +@@ -295,7 +295,7 @@ class instPkgQuery(pkgQuery): + self.classname = 'installed pkg' + + def __getitem__(self, item): +- if self.tagmap.has_key(item): ++ if item in self.tagmap: + return self.pkg.tagByName(self.tagmap[item]) + else: + return pkgQuery.__getitem__(self, item) +diff --git a/reposync.py b/reposync.py +index 5c8ee32..b66e927 100755 +--- a/reposync.py ++++ b/reposync.py +@@ -222,7 +222,7 @@ def main(): + download_set[rpmname] = 1 + + for pkg in current_pkgs: +- if download_set.has_key(pkg): ++ if pkg in download_set: + continue + + if not opts.quiet: +diff --git a/repotrack.py b/repotrack.py +index 35b8375..1c7158a 100755 +--- a/repotrack.py ++++ b/repotrack.py +@@ -214,9 +214,8 @@ def main(): + del this_sack + + for res in pkg_list: +- if res is not None: +- if not unprocessed_pkgs.has_key(res.pkgtup): +- unprocessed_pkgs[res.pkgtup] = res ++ if res is not None and res.pkgtup not in unprocessed_pkgs: ++ unprocessed_pkgs[res.pkgtup] = res + + + +diff --git a/yum-debug-dump.py b/yum-debug-dump.py +index f280d61..0ef90b2 100644 +--- a/yum-debug-dump.py ++++ b/yum-debug-dump.py +@@ -128,7 +128,7 @@ class YumDebugDump(yum.YumBase): + if req.startswith('rpmlib'): + continue # ignore rpmlib deps + +- if not providers.has_key((req,rflags,ver)): ++ if (req,rflags,ver) not in providers: + resolve_sack = self.rpmdb.whatProvides(req,rflags,ver) + else: + resolve_sack = providers[(req,rflags,ver)] +-- +1.6.6.1 + + +From 39e3f286c7bb5d09f1440e2a50dd21d0c1603b49 Mon Sep 17 00:00:00 2001 +From: Dennis Gregorovic +Date: Wed, 31 Mar 2010 15:00:54 -0400 +Subject: [PATCH 13/24] Include all packages listed in the pkgonly arg + +--- + repoclosure.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/repoclosure.py b/repoclosure.py +index d9a94d7..4c8cfa6 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -146,7 +146,7 @@ class RepoClosure(yum.YumBase): + pkgs = filter(lambda x: x.arch == 'src', pkgs) + + if self.pkgonly: +- pkgs = filter(lambda x: x.name == self.pkgonly[0], pkgs) ++ pkgs = filter(lambda x: x.name in self.pkgonly, pkgs) + + for pkg in pkgs: + for (req, flags, (reqe, reqv, reqr)) in pkg.returnPrco('requires'): +-- +1.6.6.1 + + +From 267c33dd4c50ea9844f3720832c6c65a623d7b4c Mon Sep 17 00:00:00 2001 +From: Dennis Gregorovic +Date: Wed, 31 Mar 2010 15:18:35 -0400 +Subject: [PATCH 14/24] Add a --group flag to filter packages by comps group + +--- + repoclosure.py | 20 +++++++++++++++++--- + 1 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/repoclosure.py b/repoclosure.py +index 4c8cfa6..88a6adb 100755 +--- a/repoclosure.py ++++ b/repoclosure.py +@@ -63,6 +63,8 @@ def parseArgs(): + help="specify repoid & paths of additional repositories - unique repoid and path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") + parser.add_option("-p", "--pkg", action="append", + help="check closure for this package only") ++ parser.add_option("-g", "--group", action="append", ++ help="check closure for packages in this group only") + (opts, args) = parser.parse_args() + return (opts, args) + +@@ -70,13 +72,14 @@ def parseArgs(): + # so we have to do at least some API guarantee stuff. + class RepoClosure(yum.YumBase): + def __init__(self, arch=[], config="/etc/yum.conf", builddeps=False, pkgonly=None, +- basearch=None): ++ basearch=None, grouponly=None): + yum.YumBase.__init__(self) + if basearch: + self.preconf.arch = basearch + self.logger = logging.getLogger("yum.verbose.repoclosure") + self.builddeps = builddeps + self.pkgonly = pkgonly ++ self.grouponly = grouponly + self.doConfigSetup(fn = config,init_plugins=False) + self._rc_arches = arch + +@@ -145,8 +148,18 @@ class RepoClosure(yum.YumBase): + if self.builddeps: + pkgs = filter(lambda x: x.arch == 'src', pkgs) + +- if self.pkgonly: +- pkgs = filter(lambda x: x.name in self.pkgonly, pkgs) ++ pkglist = self.pkgonly ++ if self.grouponly: ++ if not pkglist: ++ pkglist = [] ++ for group in self.grouponly: ++ groupobj = self.comps.return_group(group) ++ if not groupobj: ++ continue ++ pkglist.extend(groupobj.packages) ++ ++ if pkglist: ++ pkgs = filter(lambda x: x.name in pkglist, pkgs) + + for pkg in pkgs: + for (req, flags, (reqe, reqv, reqr)) in pkg.returnPrco('requires'): +@@ -189,6 +202,7 @@ def main(): + config=opts.config, + builddeps=opts.builddeps, + pkgonly=opts.pkg, ++ grouponly=opts.group, + basearch=opts.basearch) + + if opts.repofrompath: +-- +1.6.6.1 + + +From 8361ec1ae233a507a05c214fa4966e1f232e7a92 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Thu, 1 Apr 2010 21:57:36 +0300 +Subject: [PATCH 15/24] Add repoclosure --group completion. + +--- + yum-utils.bash | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/yum-utils.bash b/yum-utils.bash +index 308d82b..d1f13c9 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -142,10 +142,14 @@ _yu_repoclosure() + type _yum_list &>/dev/null && _yum_list all "$2" + return 0 + ;; ++ -g|--group) ++ type _yum_grouplist &>/dev/null && _yum_grouplist "" "$2" ++ return 0 ++ ;; + esac + + COMPREPLY=( $( compgen -W '--help --config --arch --basearch --builddeps +- --repoid --tempcache --quiet --newest --repofrompath --pkg' \ ++ --repoid --tempcache --quiet --newest --repofrompath --pkg --group' \ + -- "$2" ) ) + } && + complete -F _yu_repoclosure -o filenames repoclosure repoclosure.py +-- +1.6.6.1 + + +From 08975b3f4d0f31fe7af7a12443c227bfcbc9f6de Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Fri, 2 Apr 2010 11:34:54 +0300 +Subject: [PATCH 16/24] Fix always_print_best_host conf setting. + +--- + plugins/fastestmirror/fastestmirror.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py +index 0701ef7..a8f1ee7 100644 +--- a/plugins/fastestmirror/fastestmirror.py ++++ b/plugins/fastestmirror/fastestmirror.py +@@ -90,7 +90,7 @@ def init_hook(conduit): + + """ + global verbose, socket_timeout, hostfilepath, maxhostfileage, loadcache +- global maxthreads, exclude, prefer, downgrade_ftp ++ global maxthreads, exclude, prefer, downgrade_ftp, always_print_best_host + if hasattr(conduit, 'registerPackageName'): + conduit.registerPackageName("yum-plugin-fastestmirror") + verbose = conduit.confBool('main', 'verbose', default=False) +-- +1.6.6.1 + + +From a33e328bd75f1c1828ee287df0582298f625fd93 Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Thu, 8 Apr 2010 15:58:48 -0400 +Subject: [PATCH 17/24] Add yumdb man page, and yumdb copy command + +--- + docs/Makefile | 2 +- + docs/yumdb.8 | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + yum-utils.spec | 1 + + yumdb.py | 14 ++++++ + 4 files changed, 142 insertions(+), 1 deletions(-) + create mode 100644 docs/yumdb.8 + +diff --git a/docs/Makefile b/docs/Makefile +index 7e81045..947498d 100644 +--- a/docs/Makefile ++++ b/docs/Makefile +@@ -2,7 +2,7 @@ DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changel + yum-list-data yum-filter-data yum-verify yum-utils yum-aliases yum-debug-dump yum-versionlock \ + yum-groups-manager debuginfo-install repodiff yum-fs-snapshot + DOCS5 = yum-changelog.conf yum-versionlock.conf yum-fs-snapshot.conf +-DOCS8 = yum-security yum-complete-transaction ++DOCS8 = yum-security yum-complete-transaction yumdb + + all: + echo "Nothing to do" +diff --git a/docs/yumdb.8 b/docs/yumdb.8 +new file mode 100644 +index 0000000..7c39459 +--- /dev/null ++++ b/docs/yumdb.8 +@@ -0,0 +1,126 @@ ++.\" yumdb command ++.TH "yumdb" "8" "8 April 2010" "James Antill" "" ++.SH "NAME" ++yumdb command ++.SH "SYNOPSIS" ++\fByumdb\fP [command] [packages ...] ++.SH "DESCRIPTION" ++.PP ++This command is used to query and alter the yum database, which is a simple ++key value store used in conjunction with the rpm database. Any installed package ++can have arbitrary data in the yum database, however the main use case is to ++store extra data about packages as they are installed. ++.PP ++yumdb \fIcommand\fPs are: ++.br ++.IP "\fByumdb get [pkg-wildcard]...\fP" ++.PP ++This command will get the value for the given key, limiting to any specified ++packages. ++.br ++.IP "\fByumdb set [pkg-wildcard]..." ++.PP ++This command will set the value for the given key, to the given value, limiting ++to any specified packages. ++.br ++.IP "\fByumdb del [pkg-wildcard]... ++.PP ++This command will delete the given key, limiting to any specified packages. ++.br ++.IP "\fByumdb rename [pkg-wildcard]... ++.PP ++This command will rename the given old-key, to the given new-key, limiting to ++any specified packages. If the old-key does not exist, nothing happens. ++.br ++.IP "\fByumdb rename-force [pkg-wildcard]... ++.PP ++This command will rename the given old-key, to the given new-key, limiting to ++any specified packages. If the old-key does not exist, new-key is deleted. ++.br ++.IP "\fByumdb copy [pkg-wildcard]... ++.PP ++This command will copy the given old-key, to the given new-key, limiting to ++any specified packages. If the old-key does not exist, nothing happens. ++.br ++.IP "\fByumdb search ... ++.PP ++This command will search all packages for the given key, against any of the ++given wildcard values. ++.br ++.IP "\fByumdb exist [pkg-wildcard]... ++.PP ++This command will print any packages which have the given key, limiting to any ++specified packages. ++.br ++.IP "\fByumdb unset [pkg-wildcard]... ++.PP ++This command will print any packages which do not have the given key, limiting ++to any specified packages. ++.br ++.IP "\fByumdb info [pkg-wildcard]... ++.PP ++This command will all the data stored in the yumdb, limiting to any specified ++packages. ++ ++.SH "EXAMPLES" ++.PP ++List all the packages which don't have a from_repo key/value: ++.IP ++yumdb unset from_repo ++.PP ++List all the packages which were installed as dependencies: ++.IP ++yumdb search reason dep ++ ++.SH "WELL KNOWN KEYS" ++.PP ++Note that there is no limit to the number of keys that can be created or what ++they may contain (for installed packages only). However this is a list of well ++known keys, and what they store. ++.nf ++.br ++.IP "\fBchecksum_data ++.IP "\fBchecksum_type ++.PP ++These keys store the createrepo checksum, and it's type, of the available ++package yum installed. Note that these are used by "yum version" to calculate ++the rpmdb version. ++.br ++.IP "\fBcommand_line ++.PP ++This key stores the entire command line, of the yum command (if it was called). ++.br ++.IP "\fBfrom_repo ++.IP "\fBfrom_repo_revision ++.IP "\fBfrom_repo_timestamp ++.PP ++These keys take values from the available package yum installed, and store the ++repo id, it's revision and timestamp. ++.br ++.IP "\fBreason ++.PP ++This key stores either "user" or "dep", currently. To mark if the user requested ++the package to be installed, or if it was brought in automatically as a ++dependency. Note that this is kept over updates. ++.br ++.IP "\fBreleasever ++.PP ++This key stores the value of releasever, when the package was installed. ++.br ++.IP "\fBinstallonly ++.PP ++If this attribute has the value "keep" then this package will not be ++removed automatically by the installonly process (and does not count towards ++the installonly_limit). ++ ++.SH "SEE ALSO" ++.nf ++.I yum (8) ++.I rpm (8) ++.fi ++ ++.SH "AUTHORS" ++.nf ++James Antill . ++.fi ++ +diff --git a/yum-utils.spec b/yum-utils.spec +index 307a4e8..2f0b955 100644 +--- a/yum-utils.spec ++++ b/yum-utils.spec +@@ -463,6 +463,7 @@ fi + %{_mandir}/man1/yum-debug-dump.1.* + %{_mandir}/man8/yum-complete-transaction.8.* + %{_mandir}/man1/yum-groups-manager.1.* ++%{_mandir}/man8/yumdb.8.* + %{_mandir}/man1/yumdownloader.1.* + + %files -n yum-updateonboot +diff --git a/yumdb.py b/yumdb.py +index 365006e..38ba561 100755 +--- a/yumdb.py ++++ b/yumdb.py +@@ -19,6 +19,7 @@ def setup_opts(): + del [pkg-wildcard]... + rename [pkg-wildcard]... + rename-force [pkg-wildcard]... ++ copy [pkg-wildcard]... + search ... + exist? [pkg-wildcard]... + unset? [pkg-wildcard]... +@@ -68,6 +69,19 @@ def run_cmd(yb, args, inshell=False): + print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) + else: + print " " * 4, ynkey, '' ++ elif args[0] == 'copy' and len(args) > 2: ++ args.pop(0) ++ yokey = args.pop(0) ++ ynkey = args.pop(0) ++ for pkg in sorted(yb.rpmdb.returnPackages(patterns=args)): ++ print pkg ++ if yokey in pkg.yumdb_info: ++ setattr(pkg.yumdb_info, ynkey, getattr(pkg.yumdb_info, yokey)) ++ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) ++ elif ynkey in pkg.yumdb_info: ++ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) ++ else: ++ print " " * 4, ynkey, '' + elif args[0] in ['rename-f', 'rename-force'] and len(args) > 2: + args.pop(0) + yokey = args.pop(0) +-- +1.6.6.1 + + +From b4c9ab9ecf7e602f78836ba34b1fc3994904e533 Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Thu, 8 Apr 2010 16:02:55 -0400 +Subject: [PATCH 18/24] Use the yum configured cachedir value, in fastestmirror + +--- + plugins/fastestmirror/fastestmirror.conf | 4 +++- + plugins/fastestmirror/fastestmirror.py | 6 ++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/plugins/fastestmirror/fastestmirror.conf b/plugins/fastestmirror/fastestmirror.conf +index 32ecec4..c6db0d8 100644 +--- a/plugins/fastestmirror/fastestmirror.conf ++++ b/plugins/fastestmirror/fastestmirror.conf +@@ -3,7 +3,9 @@ enabled=1 + verbose=0 + always_print_best_host = true + socket_timeout=3 +-hostfilepath=/var/cache/yum/timedhosts.txt ++# Relative paths are relative to the cachedir (and so works for users as well ++# as root). ++hostfilepath=timedhosts.txt + maxhostfileage=10 + maxthreads=15 + #exclude=.gov, facebook +diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py +index a8f1ee7..db2fede 100644 +--- a/plugins/fastestmirror/fastestmirror.py ++++ b/plugins/fastestmirror/fastestmirror.py +@@ -14,7 +14,7 @@ + # enabled=1 + # verbose=1 + # socket_timeout=3 +-# hostfilepath=/var/cache/yum/timedhosts ++# hostfilepath=timedhosts + # maxhostfileage=10 + # maxthreads=15 + # #exclude=.gov, facebook +@@ -98,7 +98,9 @@ def init_hook(conduit): + default=True) + socket_timeout = conduit.confInt('main', 'socket_timeout', default=3) + hostfilepath = conduit.confString('main', 'hostfilepath', +- default='/var/cache/yum/timedhosts') ++ default='timedhosts') ++ if hostfilepath and hostfilepath[0] != '/': ++ hostfilepath = conduit._base.conf.cachedir + '/' + hostfilepath + maxhostfileage = conduit.confInt('main', 'maxhostfileage', default=10) + maxthreads = conduit.confInt('main', 'maxthreads', default=10) + exclude = conduit.confString('main', 'exclude', default=None) +-- +1.6.6.1 + + +From 264a67e713827a086ceef13b163a46dc6f28acf4 Mon Sep 17 00:00:00 2001 +From: Seth Vidal +Date: Fri, 9 Apr 2010 17:01:16 -0400 +Subject: [PATCH 19/24] fixes https://bugzilla.redhat.com/show_bug.cgi?id=580343 + +when we are dealing with compressed comps files just fetch the group +not group_gz +--- + reposync.py | 45 +++++++++++++++++++++++---------------------- + 1 files changed, 23 insertions(+), 22 deletions(-) + +diff --git a/reposync.py b/reposync.py +index b66e927..4d70e30 100755 +--- a/reposync.py ++++ b/reposync.py +@@ -110,7 +110,7 @@ def parseArgs(): + parser.add_option("-p", "--download_path", dest='destdir', + default=os.getcwd(), help="Path to download packages to: defaults to current dir") + parser.add_option("--norepopath", dest='norepopath', default=False, action="store_true", +- help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)") ++ help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)") + parser.add_option("-g", "--gpgcheck", default=False, action="store_true", + help="Remove packages that fail GPG signature checking after downloading") + parser.add_option("-u", "--urls", default=False, action="store_true", +@@ -176,7 +176,7 @@ def main(): + # enable the ones we like + for repo in myrepos: + repo.enable() +- ++ + # --norepopath can only be sensibly used with a single repository: + if len(my.repos.listEnabled()) > 1 and opts.norepopath: + print >> sys.stderr, "Error: Can't use --norepopath with multiple repositories" +@@ -238,29 +238,30 @@ def main(): + my.logger.error("Could not make repo subdir: %s" % e) + my.closeRpmDB() + sys.exit(1) +- try: # download random other metadata +- if opts.downloadcomps: +- compsfile = repo.getGroups() +- shutil.copyfile(compsfile,"%s/%s" % (local_repo_path,'comps.xml')) +- except yum.Errors.RepoMDError,e : +- if not opts.quiet: +- my.logger.error("Unable to fetch metadata: %s" % e) + ++ if opts.downloadcomps: ++ wanted_types = ['group'] ++ + if opts.downloadmd: +- for ftype in repo.repoXML.fileTypes(): +- if ftype in ['primary', 'primary_db', 'filelists', +- 'filelists_db', 'other', 'other_db']: +- continue +- if opts.downloadcomps and ftype == 'group': +- continue +- try: +- resultfile = repo.retrieveMD(ftype) +- basename = os.path.basename(resultfile) +- shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename)) +- except yum.Errors.RepoMDError,e : +- if not opts.quiet: +- my.logger.error("Unable to fetch metadata: %s" % e) ++ wanted_types = repo.repoXML.fileTypes.keys() ++ ++ for ftype in repo.repoXML.fileTypes(): ++ if ftype in ['primary', 'primary_db', 'filelists', ++ 'filelists_db', 'other', 'other_db']: ++ continue ++ if ftype not in wanted_types: ++ continue + ++ try: ++ resultfile = repo.retrieveMD(ftype) ++ basename = os.path.basename(resultfile) ++ if ftype == 'group' and opts.downloadcomps: # for compat with how --downloadcomps saved the comps file always as comps.xml ++ basename = 'comps.xml' ++ shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename)) ++ except yum.Errors.RepoMDError,e : ++ if not opts.quiet: ++ my.logger.error("Unable to fetch metadata: %s" % e) ++ + remote_size = 0 + local_size = 0 + if not opts.urls: +-- +1.6.6.1 + + +From 4f7fa956098ec985727c5d12e694ccb259a6f037 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Skytt=C3=A4?= +Date: Sat, 10 Apr 2010 00:21:57 +0300 +Subject: [PATCH 20/24] Add copy to yumdb completions. + +--- + yum-utils.bash | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/yum-utils.bash b/yum-utils.bash +index d1f13c9..54c9ef8 100644 +--- a/yum-utils.bash ++++ b/yum-utils.bash +@@ -242,7 +242,7 @@ _yu_yumdb() + esac + + if [ $COMP_CWORD -le 1 ] ; then +- COMPREPLY=( $( compgen -W 'get set del rename rename-force search ++ COMPREPLY=( $( compgen -W 'get set del rename rename-force copy search + exist unset info shell --version --help --noplugins --config' \ + -- "$2" ) ) + fi +-- +1.6.6.1 + + +From 2e5b45d9c4e743f88b085587984a19cc009d282e Mon Sep 17 00:00:00 2001 +From: Michael Schwendt +Date: Tue, 13 Apr 2010 16:19:19 -0400 +Subject: [PATCH 21/24] Get the newer "same day" changelog entries in repodiff. + +Tided by by James. +--- + repodiff.py | 21 ++++++++++++++------- + 1 files changed, 14 insertions(+), 7 deletions(-) + +diff --git a/repodiff.py b/repodiff.py +index ac1865e..ff67fe4 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -198,15 +198,22 @@ def main(args): + # for any newer clog in pkg + # print it + oldlogs = oldpkg.changelog +- oldlogs.sort() +- oldlogs.reverse() + if len(oldlogs): +- oldtime = oldlogs[0][0] +- clogdelta = [] ++ # Don't sort as that can screw the order up when time is the ++ # same. ++ oldtime = oldlogs[-1][0] ++ oldauth = oldlogs[-1][2] ++ oldcontent = oldlogs[-1][2] + for (t, author, content) in pkg.changelog: +- if t > oldtime: +- msg += "* %s %s\n%s\n\n" % (datetime.date.fromtimestamp(int(t)).strftime("%a %b %d %Y"), +- to_unicode(author), to_unicode(content)) ++ if t < oldtime: ++ break ++ if ((t == oldtime) and (author == auth) and ++ (content == oldcontent)): ++ break ++ tm = datetime.date.fromtimestamp(int(t)) ++ tm = tm.strftime("%a %b %d %Y") ++ msg += "* %s %s\n%s\n\n" % (tm, to_unicode(author), ++ to_unicode(content)) + if opts.size: + sizechange = int(pkg.size) - int(oldpkg.size) + total_sizechange += sizechange +-- +1.6.6.1 + + +From 9afba990529f7b2381f907b5341a45a4e9eac08d Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Tue, 13 Apr 2010 16:44:06 -0400 +Subject: [PATCH 22/24] Stupid typo fix + +--- + repodiff.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/repodiff.py b/repodiff.py +index ff67fe4..5f3d5b1 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -207,7 +207,7 @@ def main(args): + for (t, author, content) in pkg.changelog: + if t < oldtime: + break +- if ((t == oldtime) and (author == auth) and ++ if ((t == oldtime) and (author == oldauth) and + (content == oldcontent)): + break + tm = datetime.date.fromtimestamp(int(t)) +-- +1.6.6.1 + + +From cb745dcbca766c7b1a185b938e8eff9792a1317a Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Tue, 13 Apr 2010 18:05:05 -0400 +Subject: [PATCH 23/24] Fix obsoletes processing in repodiff, also giant speedup. Compared output + both before and after and it was identical: + +1. Original with 3.2.27: 8 minutes 27 seconds + +2. Original with returnNewestByName() speedup: 1 minute 50 seconds. + +3. New repodiff with 3.2.27: 11 seconds. + +...tested with Updates/11 vs. Updates/12 on 2010-04-13. +--- + repodiff.py | 74 ++++++++++++++++++++++++++++++++++++---------------------- + 1 files changed, 46 insertions(+), 28 deletions(-) + +diff --git a/repodiff.py b/repodiff.py +index 5f3d5b1..475f599 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -20,6 +20,7 @@ import datetime + import os + import locale + from yum.i18n import to_unicode ++import time + + from optparse import OptionParser + +@@ -59,42 +60,59 @@ class DiffYum(yum.YumBase): + remove = [] + modified = [] + obsoleted = {} # obsoleted = by +- newsack = yum.packageSack.ListPackageSack() +- for repoid in self.dy_repos['new']: +- newsack.addList(self.pkgSack.returnPackages(repoid=repoid)) +- +- oldsack = yum.packageSack.ListPackageSack() +- for repoid in self.dy_repos['old']: +- oldsack.addList(self.pkgSack.returnPackages(repoid=repoid)) +- +- for pkg in newsack.returnNewestByName(): +- tot = self.pkgSack.searchNevra(name=pkg.name) +- if len(tot) == 1: # it's only in new +- add.append(pkg) +- if len(tot) > 1: +- if oldsack.contains(name=pkg.name): +- newest_old = oldsack.returnNewestByName(name=pkg.name)[0] +- if newest_old.EVR != pkg.EVR: +- modified.append((pkg, newest_old)) ++ ++ # Originally we did this by setting up old and new repos. ... but as ++ # a faster way, we can just go through all the pkgs once getting the ++ # newest pkg with a repoid prefix of "old", dito. "new", and then ++ # compare those directly. ++ def _next_old_new(pkgs): ++ """ Returns latest pair of (oldpkg, newpkg) for each package ++ name. If that name doesn't exist, then it returns None for ++ that package. """ ++ lastname = None ++ npkg = opkg = None ++ for pkg in sorted(pkgs): ++ if lastname is None: ++ lastname = pkg.name ++ if lastname != pkg.name: ++ yield opkg, npkg ++ opkg = npkg = None ++ lastname = pkg.name ++ ++ if pkg.repo.id.startswith('old'): ++ opkg = pkg + else: +- add.append(pkg) ++ assert pkg.repo.id.startswith('new') ++ npkg = pkg ++ if opkg is not None or npkg is not None: ++ yield opkg, npkg + +- for pkg in oldsack.returnNewestByName(): +- if len(newsack.searchNevra(name=pkg.name)) == 0: +- remove.append(pkg) ++ for opkg, npkg in _next_old_new(self.pkgSack.returnPackages()): ++ if opkg is None: ++ add.append(npkg) ++ elif npkg is None: ++ remove.append(opkg) ++ elif not npkg.verEQ(opkg): ++ modified.append((npkg, opkg)) + ++ ao = [] ++ for pkg in add: ++ if not pkg.obsoletes: ++ continue ++ ao.append(pkg) + ++ # Note that this _only_ shows something when you have an additional ++ # package obsoleting a removed package. If the obsoleted package is ++ # still there (somewhat "common") or the obsoleter is an update (dito) ++ # you get get hits here. + for po in remove: +- for newpo in add: +- foundit = 0 +- for obs in newpo.obsoletes: +- if po.inPrcoRange('provides', obs): +- foundit = 1 +- obsoleted[po] = newpo +- break +- if foundit: ++ # Remember: Obsoletes are for package names only. ++ poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release)) ++ for newpo in ao: ++ if po.inPrcoRange('obsoletes', poprovtup): ++ obsoleted[po] = newpo + break +- ++ + ygh = yum.misc.GenericHolder() + ygh.add = add + ygh.remove = remove +-- +1.6.6.1 + + +From 99cbe8d6dad9ca8543dedcc5c12bc0f9fdde200e Mon Sep 17 00:00:00 2001 +From: James Antill +Date: Tue, 13 Apr 2010 18:16:03 -0400 +Subject: [PATCH 24/24] Add message about archlist usage, to stop people being confused. + +--- + docs/repodiff.1 | 2 ++ + repodiff.py | 4 ++++ + 2 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/docs/repodiff.1 b/docs/repodiff.1 +index e1ffc3b..640b023 100644 +--- a/docs/repodiff.1 ++++ b/docs/repodiff.1 +@@ -16,6 +16,8 @@ Add a repo. as an old repo. + Add a repo. as an new repo. + .IP "\fB\-\-archlist, -a\fP" + Add architectures to change the default from just comparing source packages. ++Note that if you want the same as a native ++"x86_64" architecture machine you need: x86_64,athlon,i686,i586,i486,i386,noarch + .IP "\fB\-\-size, -s\fP" + Ouput additional data about the size of the changes. + .SH "EXAMPLES" +diff --git a/repodiff.py b/repodiff.py +index 475f599..0a1c42f 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -239,6 +239,10 @@ def main(args): + + print msg + ++ if (not ygh.add and not ygh.remove and not ygh.modified and ++ not my.pkgSack.searchNevra(arch='src')): ++ print "** No 'src' pkgs in any repo. maybe see docs. on --archlist?" ++ + print 'Summary:' + print 'Added Packages: %s' % len(ygh.add) + print 'Removed Packages: %s' % len(ygh.remove) +-- +1.6.6.1 + +commit 9c647a75528566c0abf7bf4d0ed8c8c03e6223a5 +Author: James Antill +Date: Thu Apr 15 00:54:03 2010 -0400 + + Fix typo on obsoletes check, in repodiff + +diff --git a/repodiff.py b/repodiff.py +index 0a1c42f..2810108 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -109,7 +109,7 @@ class DiffYum(yum.YumBase): + # Remember: Obsoletes are for package names only. + poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release)) + for newpo in ao: +- if po.inPrcoRange('obsoletes', poprovtup): ++ if newpo.inPrcoRange('obsoletes', poprovtup): + obsoleted[po] = newpo + break + +commit 007bf5d4fd3147b51390d7124e64b3e431c831a9 +Author: James Antill +Date: Fri Apr 16 14:50:27 2010 -0400 + + Use the newest old changelog entry, not the oldest ... *sigh* + +diff --git a/repodiff.py b/repodiff.py +index 2810108..bc2cbf7 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -219,9 +219,9 @@ def main(args): + if len(oldlogs): + # Don't sort as that can screw the order up when time is the + # same. +- oldtime = oldlogs[-1][0] +- oldauth = oldlogs[-1][2] +- oldcontent = oldlogs[-1][2] ++ oldtime = oldlogs[0][0] ++ oldauth = oldlogs[0][2] ++ oldcontent = oldlogs[0][2] + for (t, author, content) in pkg.changelog: + if t < oldtime: + break +commit d4722ce74fe655888fa9d5b02090a56f6e137ce0 +Author: James Antill +Date: Sun Apr 18 02:08:39 2010 -0400 + + Fix the actual bug in repodiff, comparison + +diff --git a/repodiff.py b/repodiff.py +index bc2cbf7..7ef7c50 100755 +--- a/repodiff.py ++++ b/repodiff.py +@@ -220,7 +220,7 @@ def main(args): + # Don't sort as that can screw the order up when time is the + # same. + oldtime = oldlogs[0][0] +- oldauth = oldlogs[0][2] ++ oldauth = oldlogs[0][1] + oldcontent = oldlogs[0][2] + for (t, author, content) in pkg.changelog: + if t < oldtime: diff --git a/yum-utils.spec b/yum-utils.spec index 307a4e8..a81b308 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,10 +1,11 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.26 -Release: 1%{?dist} +Release: 7%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz +Patch0: yum-utils-HEAD.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -365,6 +366,8 @@ filesystem that is touched by the packages in a yum update or yum remove. %prep %setup -q +%patch0 -p1 + %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -463,6 +466,7 @@ fi %{_mandir}/man1/yum-debug-dump.1.* %{_mandir}/man8/yum-complete-transaction.8.* %{_mandir}/man1/yum-groups-manager.1.* +%{_mandir}/man8/yumdb.8.* %{_mandir}/man1/yumdownloader.1.* %files -n yum-updateonboot @@ -619,6 +623,19 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog +* Sat Apr 17 2010 James Antill - 1.1.26-7 +- Fix the changelog entry time comparison in repodiff, again. + +* Fri Apr 16 2010 James Antill - 1.1.26-4 +- Fix the changelog entry time comparison in repodiff. + +* Wed Apr 14 2010 James Antill - 1.1.26-3 +- Get lots of fixes from latest HEAD. Also: +- --alldeps default in repoquery. +- repoquery will now do a full provides version check. +- Add repoclosure --group. +- Big repodiff speedup. + * Wed Feb 10 2010 Tim Lauridsen - mark as 1.1.26 From 4c9887cadcfca3a9a0f9e2524d286536655784e4 Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Sun, 6 Jun 2010 13:24:20 +0000 Subject: [PATCH 09/86] Release 1.1.27-1 --- .cvsignore | 2 +- sources | 2 +- yum-utils-HEAD.patch | 1679 ------------------------------------------ yum-utils.spec | 54 +- 4 files changed, 13 insertions(+), 1724 deletions(-) delete mode 100644 yum-utils-HEAD.patch diff --git a/.cvsignore b/.cvsignore index f577c2f..0a39cad 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -yum-utils-1.1.26.tar.gz +yum-utils-1.1.27.tar.gz diff --git a/sources b/sources index b5d78a8..4695520 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cdf0b2e65a57485ec37ea09a8b1e36b9 yum-utils-1.1.26.tar.gz +e5bf013b43cd898ef5483798e64317f9 yum-utils-1.1.27.tar.gz diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch deleted file mode 100644 index 7f1000a..0000000 --- a/yum-utils-HEAD.patch +++ /dev/null @@ -1,1679 +0,0 @@ -From bc3d026acd1c8f332d024bf9a9918da6451c8c07 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Tue, 9 Feb 2010 21:35:15 +0200 -Subject: [PATCH 01/24] Make --alldeps the default in repoquery. - ---alldeps is what people really almost always want, but fail to -specify for some reason. --exactdeps can be used to get the previous -default of exact matching. ---- - docs/repoquery.1 | 10 +++++++--- - repoquery.py | 6 ++++-- - yum-utils.bash | 2 +- - 3 files changed, 12 insertions(+), 6 deletions(-) - -diff --git a/docs/repoquery.1 b/docs/repoquery.1 -index 1056c80..e5ed8b7 100644 ---- a/docs/repoquery.1 -+++ b/docs/repoquery.1 -@@ -107,8 +107,12 @@ Query all packages that provide CAPABILITY. - .IP "\fB\-\-whatrequires CAPABILITY\fP" - Query all packages that require CAPABILITY. - .IP "\fB\-\-alldeps\fP" --When used with --whatrequires, use both automatic and manual dependencies --for the query. -+When used with --whatrequires, look for non-explicit dependencies in -+addition to explicit ones (e.g. files and Provides in addition to -+package names). This is the default. -+.IP "\fB\-\-exactdeps\fP" -+When used with --whatrequires, search for dependencies only exactly as given. -+This is effectively the opposite of --alldeps. - .IP "\fB\-\-recursive\fP" - When used with --whatrequires, query packages recursively. - .IP "\fB\-\-archlist=ARCH1[,ARCH2...]\fP" -@@ -147,7 +151,7 @@ Query groups instead of packages. - .IP "List all packages whose name contains 'perl':" - \fBrepoquery '*perl*'\fP - .IP "List all packages depending on openssl:" --\fBrepoquery --whatrequires --alldeps openssl\fP -+\fBrepoquery --whatrequires openssl\fP - .IP "List all package names and the repository they come from, nicely formatted:" - \fBrepoquery -a --qf "%-20{repoid} %{name}"\fP - .IP "List name and summary of all available updates (if any), nicely formatted:" -diff --git a/repoquery.py b/repoquery.py -index 2e3004b..3e2c18a 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -647,8 +647,10 @@ def main(args): - help="operate on corresponding source RPM") - parser.add_option("--resolve", action="store_true", - help="resolve capabilities to originating package(s)") -- parser.add_option("--alldeps", action="store_true", -- help="check non-explicit dependencies (files and Provides:) as well") -+ parser.add_option("--alldeps", action="store_true", default=True, -+ help="check non-explicit dependencies (files and Provides:) as well, defaults to on") -+ parser.add_option("--exactdeps", dest="alldeps", action="store_false", -+ help="check dependencies exactly as given, opposite of --alldeps") - parser.add_option("--recursive", action="store_true", - help="recursively query for packages (for whatrequires)") - parser.add_option("--whatprovides", action="store_true", -diff --git a/yum-utils.bash b/yum-utils.bash -index d8ca1dd..7df1b49 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -210,7 +210,7 @@ _yu_repoquery() - COMPREPLY=( $( compgen -W '--version --help --list --info --file - --queryformat --groupmember --all --requires --provides --obsoletes - --conflicts --changelog --location --nevra --envra --nvr --source -- --srpm --resolve --alldeps --recursive --whatprovides --whatrequires -+ --srpm --resolve --exactdeps --recursive --whatprovides --whatrequires - --whatobsoletes --whatconflicts --group --grouppkgs --archlist - --pkgnarrow --show-duplicates --repoid --enablerepo --disablerepo - --repofrompath --plugins --quiet --verbose --cache --tempcache --- -1.6.6.1 - - -From efc35f8de0475db1bfe27eb04a93f571a23ce8b7 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Mon, 15 Feb 2010 22:01:50 -0500 -Subject: [PATCH 02/24] make repoquery pass in the whole string not just split for names - ---- - repoquery.py | 5 +---- - 1 files changed, 1 insertions(+), 4 deletions(-) - -diff --git a/repoquery.py b/repoquery.py -index 2e3004b..c2b8c03 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -554,10 +554,7 @@ class YumBaseQuery(yum.YumBase): - provs.extend(pkg.files()) - - for prov in provs: -- # Only look at the providing name, not the whole version. This -- # might occasionally give some false positives but that's -- # better than missing ones which it had previously -- for pkg in self.pkgSack.searchRequires(prov.split()[0]): -+ for pkg in self.pkgSack.searchRequires(prov): - pkgs[pkg.pkgtup] = pkg - if self.options.recursive: - require_recursive(pkg.name) --- -1.6.6.1 - - -From 493450d26d04e3f61470e21f7db717e7d98e3d57 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Thu, 25 Feb 2010 12:58:35 -0500 -Subject: [PATCH 03/24] move around where we query for pkgs from sackops/prcos and what happens if no special output format - is specified in repoquery. - -makes: -repoquery -qfi /bin/bash output -qi output rather than -q output. ---- - repoquery.py | 19 +++++++++++-------- - 1 files changed, 11 insertions(+), 8 deletions(-) - -diff --git a/repoquery.py b/repoquery.py -index 0a56430..225a4cb 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -504,10 +504,21 @@ class YumBaseQuery(yum.YumBase): - else: - if self.options.srpm: - pkgs = self.matchSrcPkgs(items) -+ - else: - pkgs = self.matchPkgs(items) -+ for prco in items: -+ for oper in self.sackops: -+ try: -+ for p in self.doQuery(oper, prco): -+ if p: -+ pkgs.append(p) -+ except queryError, e: -+ self.logger.error( e.msg) - - for pkg in pkgs: -+ if not self.pkgops: -+ print to_unicode(pkg) - for oper in self.pkgops: - try: - out = pkg.doQuery(oper) -@@ -515,14 +526,6 @@ class YumBaseQuery(yum.YumBase): - print to_unicode(out) - except queryError, e: - self.logger.error( e.msg) -- for prco in items: -- for oper in self.sackops: -- try: -- for p in self.doQuery(oper, prco): -- if p: -- print p -- except queryError, e: -- self.logger.error( e.msg) - - def doQuery(self, method, *args, **kw): - return getattr(self, "fmt_%s" % method)(*args, **kw) --- -1.6.6.1 - - -From f0bee60c3fc81325e547d0f8bf42591368d18ee4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Sat, 27 Feb 2010 14:21:02 +0200 -Subject: [PATCH 04/24] Fix --releasever. - ---- - repoquery.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/repoquery.py b/repoquery.py -index 225a4cb..eb524f3 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -774,7 +774,7 @@ def main(args): - - # silence initialisation junk from modules etc unless verbose mode - initnoise = (not opts.quiet) * 2 -- repoq.releasever = opts.releasever -+ repoq.preconf.releasever = opts.releasever - if opts.conffile: - repoq.doConfigSetup(fn=opts.conffile, debuglevel=initnoise, init_plugins=opts.plugins) - else: --- -1.6.6.1 - - -From b15cb0760c864cadc5029474d07cc38882ec1815 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Mon, 1 Mar 2010 14:58:27 -0500 -Subject: [PATCH 05/24] catch all yum errors and valueError (which is coming from yum.config.py :() - generally this just means we'll get less ABRT errors and more reports from users - -(I hope) ---- - repoclosure.py | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - -diff --git a/repoclosure.py b/repoclosure.py -index 5076fe8..8c27cdd 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -273,5 +273,10 @@ def main(): - my.logger.info(' %s' % req) - - if __name__ == "__main__": -- main() -+ try: -+ main() -+ except (yum.Errors.YumBaseError, ValueError), e: -+ print >> sys.stderr, str(e) -+ sys.exit(1) -+ - --- -1.6.6.1 - - -From 30e58c85e07abe939ff3c9af017f8355f81a4f32 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Mon, 1 Mar 2010 15:27:57 -0500 -Subject: [PATCH 06/24] setup some repo features that make sense for the debug repos to - inherit from the non-debug repos when we add them - ---- - debuginfo-install.py | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) - -diff --git a/debuginfo-install.py b/debuginfo-install.py -index 242be65..dc41b5f 100755 ---- a/debuginfo-install.py -+++ b/debuginfo-install.py -@@ -90,6 +90,11 @@ class DebugInfoInstall(YumUtilBase): - r.enable() - try: - self.doRepoSetup(thisrepo=r.id) -+ for opt in ['repo_gpgcheck', 'gpgcheck', 'cost', -+ 'skip_if_unavailable']: -+ if hasattr(r, opt): -+ setattr(r, opt, getattr(repo, opt)) -+ - except yum.Errors.RepoError, e: - self.logger.critical("Could not access repo %s error was: %s" % - (r.id, to_unicode(str(e)))) --- -1.6.6.1 - - -From c65516666fdca02f6f1500134d8a6832176320c7 Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Mon, 1 Mar 2010 22:57:07 -0500 -Subject: [PATCH 07/24] Add yum-utils to the run_with_packages when running y-c-t - ---- - yum-complete-transaction.py | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/yum-complete-transaction.py b/yum-complete-transaction.py -index ba41a51..0a9f5df 100755 ---- a/yum-complete-transaction.py -+++ b/yum-complete-transaction.py -@@ -161,6 +161,7 @@ class YumCompleteTransaction(YumUtilBase): - # populate the ts - # run it - -+ self.run_with_package_names.add('yum-utils') - times = [] - for thistime in find_unfinished_transactions(self.conf.persistdir): - if thistime.endswith('disabled'): --- -1.6.6.1 - - -From 37454f631436624cfeda72496757c6206420cc78 Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Mon, 1 Mar 2010 22:58:53 -0500 -Subject: [PATCH 08/24] Add yum-utils to the run_with_packages when running pkg-cleanup - ---- - package-cleanup.py | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/package-cleanup.py b/package-cleanup.py -index 3f5507f..ca4aa9a 100755 ---- a/package-cleanup.py -+++ b/package-cleanup.py -@@ -335,6 +335,7 @@ class PackageCleanup(YumUtilBase): - sys.exit(100) - - self._remove_old_kernels(opts.kernelcount, opts.keepdevel) -+ self.run_with_package_names.add('yum-utils') - self.buildTransaction() - if len(self.tsInfo) < 1: - print 'No old kernels to remove' -@@ -371,6 +372,7 @@ class PackageCleanup(YumUtilBase): - if opts.noscripts: - self.conf.tsflags.append('noscripts') - self._remove_old_dupes() -+ self.run_with_package_names.add('yum-utils') - self.buildTransaction() - if len(self.tsInfo) < 1: - print 'No duplicates to remove' --- -1.6.6.1 - - -From 94b52cb5499b47cb4e2b64c8a2e4e7863b2e965e Mon Sep 17 00:00:00 2001 -From: Tim Lauridsen -Date: Tue, 2 Mar 2010 12:18:31 +0100 -Subject: [PATCH 09/24] Make repoclosure work with relative paths, like ./myrepo or just . - ---- - repoclosure.py | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/repoclosure.py b/repoclosure.py -index 8c27cdd..9bfc007 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -60,7 +60,7 @@ def parseArgs(): - parser.add_option("-n", "--newest", default=0, action="store_true", - help="check only the newest packages in the repos") - parser.add_option("--repofrompath", action="append", -- help="specify repoid & paths of additional repositories - unique repoid and complete path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") -+ help="specify repoid & paths of additional repositories - unique repoid and path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") - parser.add_option("-p", "--pkg", action="append", - help="check closure for this package only") - (opts, args) = parser.parse_args() -@@ -195,12 +195,12 @@ def main(): - # setup the fake repos - for repo in opts.repofrompath: - repoid,repopath = tuple(repo.split(',')) -+ repopath = os.path.abspath(repopath) - if repopath[0] == '/': - baseurl = 'file://' + repopath - else: - baseurl = repopath - -- repopath = os.path.normpath(repopath) - newrepo = yum.yumRepo.YumRepository(repoid) - newrepo.name = repopath - newrepo.baseurl = baseurl --- -1.6.6.1 - - -From 7cece362ea4c2f9c6619339775adb5975e022275 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Wed, 10 Mar 2010 21:13:00 +0200 -Subject: [PATCH 10/24] Add bash completion for yumdb. - ---- - yum-utils.bash | 27 +++++++++++++++++++++++++++ - 1 files changed, 27 insertions(+), 0 deletions(-) - -diff --git a/yum-utils.bash b/yum-utils.bash -index 7df1b49..1ff3fbd 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -218,6 +218,33 @@ _yu_repoquery() - } && - complete -F _yu_repoquery -o filenames repoquery repoquery.py - -+# yumdb -+_yu_yumdb() -+{ -+ COMPREPLY=() -+ -+ case "$3" in -+ -h|--help|-version) -+ return 0 -+ ;; -+ -c|--config) -+ COMPREPLY=( $( compgen -f -o plusdirs -X '!*.conf' -- "$2" ) ) -+ return 0 -+ ;; -+ shell) -+ COMPREPLY=( $( compgen -f -o plusdirs -- "$2" ) ) -+ return 0 -+ ;; -+ esac -+ -+ if [ $COMP_CWORD -le 1 ] ; then -+ COMPREPLY=( $( compgen -W 'get set del rename rename-force search -+ exist unset info shell --version --help --noplugins --config' \ -+ -- "$2" ) ) -+ fi -+} && -+complete -F _yu_yumdb -o filenames yumdb yumdb.py -+ - # Local variables: - # mode: shell-script - # sh-basic-offset: 4 --- -1.6.6.1 - - -From 421ba27da401618dd10d1a31801df01b89277585 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Fri, 26 Mar 2010 22:58:45 +0200 -Subject: [PATCH 11/24] Complete on repomanage.py, package-cleanup.py, and verifytree.py. - ---- - yum-utils.bash | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/yum-utils.bash b/yum-utils.bash -index 1ff3fbd..308d82b 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -23,7 +23,7 @@ _yu_repomanage() - - COMPREPLY=( $( compgen -d -- "$2" ) ) - } && --complete -F _yu_repomanage -o filenames repomanage -+complete -F _yu_repomanage -o filenames repomanage repomanage.py - - # package-cleanup - _yu_package_cleanup() -@@ -49,7 +49,7 @@ _yu_package_cleanup() - --cleandupes --oldkernels --count --keepdevel -c --queryformat' \ - -- "$2" ) ) - } && --complete -F _yu_package_cleanup -o filenames package-cleanup -+complete -F _yu_package_cleanup -o filenames package-cleanup package-cleanup.py - - # verifytree - _yu_verifytree() -@@ -70,7 +70,7 @@ _yu_verifytree() - - COMPREPLY=( $( compgen -d -- "$2" ) ) - } && --complete -F _yu_verifytree -o filenames verifytree -+complete -F _yu_verifytree -o filenames verifytree verifytree.py - - # repo-graph - _yu_repo_graph() --- -1.6.6.1 - - -From 25ceb993e0bda203804c3e8241df5d1942eab303 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Tue, 30 Mar 2010 23:04:44 +0300 -Subject: [PATCH 12/24] Use "in" instead of has_key. - ---- - package-cleanup.py | 2 +- - plugins/changelog/changelog.py | 4 ++-- - .../fastestmirror-asyncore.py | 2 +- - plugins/fedorakmod/fedorakmod.py | 9 +++++---- - plugins/fs-snapshot/fs-snapshot.py | 2 +- - .../post-transaction-actions.py | 2 +- - plugins/priorities/priorities.py | 10 +++++----- - plugins/protectbase/protectbase.py | 2 +- - plugins/remove-with-leaves/remove-with-leaves.py | 2 +- - plugins/upgrade-helper/upgrade-helper.py | 8 ++++---- - repo-graph.py | 4 ++-- - repo-rss.py | 2 +- - repoclosure.py | 6 +++--- - repodiff.py | 2 +- - repomanage.py | 4 ++-- - repoquery.py | 6 +++--- - reposync.py | 2 +- - repotrack.py | 5 ++--- - yum-debug-dump.py | 2 +- - 19 files changed, 38 insertions(+), 38 deletions(-) - -diff --git a/package-cleanup.py b/package-cleanup.py -index ca4aa9a..c796286 100755 ---- a/package-cleanup.py -+++ b/package-cleanup.py -@@ -129,7 +129,7 @@ class PackageCleanup(YumUtilBase): - for (req,flags,ver) in po.requires: - - if req.startswith('rpmlib'): continue # ignore rpmlib deps -- if not providers.has_key((req,flags,ver)): -+ if (req,flags,ver) not in providers: - resolve_sack = self.rpmdb.whatProvides(req,flags,ver) - else: - resolve_sack = providers[(req,flags,ver)] -diff --git a/plugins/changelog/changelog.py b/plugins/changelog/changelog.py -index 250326f..007ac6d 100644 ---- a/plugins/changelog/changelog.py -+++ b/plugins/changelog/changelog.py -@@ -58,7 +58,7 @@ def srpmname(pkg): - def _show_changes_changelog(conduit, srpms): - for name in sorted(srpms.keys()): - rpms = [] -- if origpkgs.has_key(name): -+ if name in origpkgs: - for rpm in srpms[name]: - rpms.append("%s" % rpm) - done = False -@@ -85,7 +85,7 @@ def show_changes(conduit, msg): - if not tsmem.updates: - continue - name = srpmname(tsmem.po) -- if srpms.has_key(name): -+ if name in srpms: - srpms[name].append(tsmem.po) - else: - srpms[name] = [tsmem.po] -diff --git a/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py b/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py -index 8129e2c..11c394f 100644 ---- a/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py -+++ b/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py -@@ -135,7 +135,7 @@ def postreposetup_hook(conduit): - repomirrors = {} - repos = conduit.getRepos() - for repo in repos.listEnabled(): -- if not repomirrors.has_key(str(repo)): -+ if str(repo) not in repomirrors: - repomirrors[str(repo)] = FastestMirror(repo.urls).get_mirrorlist() - if exclude: - for mirror in repomirrors[str(repo)]: -diff --git a/plugins/fedorakmod/fedorakmod.py b/plugins/fedorakmod/fedorakmod.py -index ab9f673..b3aed61 100644 ---- a/plugins/fedorakmod/fedorakmod.py -+++ b/plugins/fedorakmod/fedorakmod.py -@@ -140,7 +140,7 @@ def resolveVersions(packageList): - continue - po.kmodName = name[0] - -- if not pdict.has_key(kernel): -+ if kernel not in pdict: - pdict[kernel] = [po] - else: - sameName = None -@@ -208,7 +208,7 @@ def pinKernels(c, newKernels, installedKernels, modules): - str(runningKernel)) - - table = resolveVersions(modules) -- if not table.has_key(runningKernel): -+ if runningKernel not in table: - c.info(2, "Trying to mimic %s which has no kernel modules installed" \ - % str(runningKernel)) - return -@@ -217,7 +217,7 @@ def pinKernels(c, newKernels, installedKernels, modules): - c.info(2, "kmods in %s: %s" % (str(runningKernel), str(names))) - for kpo in newKernels: - prov = getKernelProvides(kpo)[0] -- if table.has_key(prov): -+ if prov in table: - kmods = [ po.kmodName for po in table[prov] ] - else: - kmods = [] -@@ -255,7 +255,8 @@ def installAllKmods(c, avaModules, modules, kernels): - table = resolveVersions(interesting + modules) - - for kernel in [ getKernelProvides(k)[0] for k in kernels ]: -- if not table.has_key(kernel): continue -+ if kernel not in table: -+ continue - for po in table[kernel]: - if po not in modules: - c.getTsInfo().addTrueInstall(po) -diff --git a/plugins/fs-snapshot/fs-snapshot.py b/plugins/fs-snapshot/fs-snapshot.py -index f0ce051..a83156d 100644 ---- a/plugins/fs-snapshot/fs-snapshot.py -+++ b/plugins/fs-snapshot/fs-snapshot.py -@@ -178,7 +178,7 @@ def _create_snapshot(conduit, snapshot_tag, volume): - """ - if volume["fstype"] == "btrfs": - return _create_btrfs_snapshot(conduit, snapshot_tag, volume) -- elif volume.has_key(lvm_key): -+ elif lvm_key in volume: - return _create_lvm_snapshot(conduit, snapshot_tag, volume) - - return 0 -diff --git a/plugins/post-transaction-actions/post-transaction-actions.py b/plugins/post-transaction-actions/post-transaction-actions.py -index 7b94b90..b4da1ce 100644 ---- a/plugins/post-transaction-actions/post-transaction-actions.py -+++ b/plugins/post-transaction-actions/post-transaction-actions.py -@@ -62,7 +62,7 @@ def parse_actions(ddir, conduit): - - def _get_installed_po(rpmdb, pkgtup): - (n,a,e,v,r) = pkgtup -- if _just_installed.has_key(pkgtup): -+ if pkgtup in _just_installed: - return _just_installed[pkgtup] - return rpmdb.searchNevra(name=n, arch=a, epoch=e, ver=v, rel=r)[0] - -diff --git a/plugins/priorities/priorities.py b/plugins/priorities/priorities.py -index 3650736..ddee1cb 100644 ---- a/plugins/priorities/priorities.py -+++ b/plugins/priorities/priorities.py -@@ -134,11 +134,11 @@ def exclude_hook(conduit): - - if only_samearch: - key = "%s.%s" % (po.name,po.arch) -- if pkg_priorities.has_key(key) and pkg_priorities[key] < repo.priority: -+ if key in pkg_priorities and pkg_priorities[key] < repo.priority: - delPackage = True - else: - key = "%s" % po.name -- if pkg_priorities_archless.has_key(key) and pkg_priorities_archless[key] < repo.priority: -+ if key in pkg_priorities_archless and pkg_priorities_archless[key] < repo.priority: - delPackage = True - - if delPackage: -@@ -150,11 +150,11 @@ def exclude_hook(conduit): - # one of the obsoleted packages is not available through - # a repo with a higher priority. If so, remove this package. - if check_obsoletes: -- if obsoletes.has_key(po.pkgtup): -+ if po.pkgtup in obsoletes: - obsolete_pkgs = obsoletes[po.pkgtup] - for obsolete_pkg in obsolete_pkgs: - pkg_name = obsolete_pkg[0] -- if pkg_priorities_archless.has_key(pkg_name) and pkg_priorities_archless[pkg_name] < repo.priority: -+ if pkg_name in pkg_priorities_archless and pkg_priorities_archless[pkg_name] < repo.priority: - conduit.delPackage(po) - cnt += 1 - conduit.info(3," --> %s from %s excluded (priority)" % (po,po.repoid)) -@@ -173,5 +173,5 @@ def _pkglist_to_dict(pl, priority, addArch = False): - - def _mergeprioritydicts(dict1, dict2): - for package in dict2.keys(): -- if not dict1.has_key(package) or dict2[package] < dict1[package]: -+ if package not in dict1 or dict2[package] < dict1[package]: - dict1[package] = dict2[package] -diff --git a/plugins/protectbase/protectbase.py b/plugins/protectbase/protectbase.py -index 441cdba..37a39dd 100644 ---- a/plugins/protectbase/protectbase.py -+++ b/plugins/protectbase/protectbase.py -@@ -55,7 +55,7 @@ def exclude_hook(conduit): - continue - - for po in conduit.getPackages(repo2): -- if repo1pkgs.has_key(po.name): -+ if po.name in repo1pkgs: - conduit.delPackage(po) - cnt += 1 - -diff --git a/plugins/remove-with-leaves/remove-with-leaves.py b/plugins/remove-with-leaves/remove-with-leaves.py -index 004472f..a808aef 100644 ---- a/plugins/remove-with-leaves/remove-with-leaves.py -+++ b/plugins/remove-with-leaves/remove-with-leaves.py -@@ -42,7 +42,7 @@ remove_always = False - - - def _requires_this_package(rpmdb, pkg): -- if _requires_cache.has_key(pkg): -+ if pkg in _requires_cache: - return _requires_cache[pkg] - - requirers = {} -diff --git a/plugins/upgrade-helper/upgrade-helper.py b/plugins/upgrade-helper/upgrade-helper.py -index fd76c4f..9aa05f0 100644 ---- a/plugins/upgrade-helper/upgrade-helper.py -+++ b/plugins/upgrade-helper/upgrade-helper.py -@@ -68,11 +68,11 @@ def parse_xml(xmlfile): - child_name = ns_cleanup(child.tag) - thisarch = myarch - if child_name == 'removespec': -- if child.attrib.has_key('on_arch'): -+ if 'on_arch' in child.attrib: - thisarch = child.attrib.get('on_arch') -- if child.attrib.has_key('pkgmatch'): -+ if 'pkgmatch' in child.attrib: - thismatch = child.attrib.get('pkgmatch') -- if results.has_key(thisarch): -+ if thisarch in results: - if thismatch not in results[thisarch]: - results[thisarch].append(thismatch) - else: -@@ -89,7 +89,7 @@ def stuff_to_remove(repos): - # return them as the toremove list - - for repo in repos.listEnabled(): -- if repo.repoXML.repoData.has_key('cleanup'): -+ if 'cleanup' in repo.repoXML.repoData: - trf = repo.retrieveMD('cleanup') - tr_dict = parse_xml(trf) - # prune out things like *, ?, *.*, *.*.*.*.* -diff --git a/repo-graph.py b/repo-graph.py -index e771874..bb901a8 100755 ---- a/repo-graph.py -+++ b/repo-graph.py -@@ -69,7 +69,7 @@ class yumQuiet(yum.YumBase): - for r in pkg.returnPrco('requires'): - reqname = r[0] - if reqname.startswith('rpmlib'): continue -- if prov.has_key(reqname): -+ if reqname in prov: - provider = prov[reqname] - cached += 1 - else: -@@ -83,7 +83,7 @@ class yumQuiet(yum.YumBase): - prov[reqname] = provider - if provider == pkg.name: - xx[provider] = None -- if xx.has_key(provider) or provider in skip: -+ if provider in xx or provider in skip: - continue - else: - xx[provider] = None -diff --git a/repo-rss.py b/repo-rss.py -index f395089..845c65e 100755 ---- a/repo-rss.py -+++ b/repo-rss.py -@@ -45,7 +45,7 @@ class YumQuiet(yum.YumBase): - for po in avail: - ftime = int(po.returnSimple('filetime')) - if ftime > recentlimit: -- if not ftimehash.has_key(ftime): -+ if ftime not in ftimehash: - ftimehash[ftime] = [po] - else: - ftimehash[ftime].append(po) -diff --git a/repoclosure.py b/repoclosure.py -index 9bfc007..d9a94d7 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -153,7 +153,7 @@ class RepoClosure(yum.YumBase): - if req.startswith('rpmlib'): continue # ignore rpmlib deps - - ver = self.evrTupletoVer((reqe, reqv, reqr)) -- if resolved.has_key((req,flags,ver)): -+ if (req,flags,ver) in resolved: - continue - try: - resolve_sack = self.whatProvides(req, flags, ver) -@@ -161,7 +161,7 @@ class RepoClosure(yum.YumBase): - pass - - if len(resolve_sack) < 1: -- if not unresolved.has_key(pkg): -+ if pkg not in unresolved: - unresolved[pkg] = [] - unresolved[pkg].append((req, flags, ver)) - continue -@@ -176,7 +176,7 @@ class RepoClosure(yum.YumBase): - if resolved_by_newest: - resolved[(req,flags,ver)] = 1 - else: -- if not unresolved.has_key(pkg): -+ if pkg not in unresolved: - unresolved[pkg] = [] - unresolved[pkg].append((req, flags, ver)) - -diff --git a/repodiff.py b/repodiff.py -index 5b547c0..ac1865e 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -184,7 +184,7 @@ def main(args): - if ygh.remove: - for pkg in sorted(ygh.remove): - print 'Removed package %s' % pkg.name -- if ygh.obsoleted.has_key(pkg): -+ if pkg in ygh.obsoleted: - print 'Obsoleted by %s' % ygh.obsoleted[pkg] - remove_sizechange += (int(pkg.size)) - -diff --git a/repomanage.py b/repomanage.py -index 759bf30..aeff9e5 100755 ---- a/repomanage.py -+++ b/repomanage.py -@@ -158,11 +158,11 @@ def main(args): - (n,a,e,v,r) = pkgtuple - del hdr - -- if not pkgdict.has_key((n,a)): -+ if (n,a) not in pkgdict: - pkgdict[(n,a)] = [] - pkgdict[(n,a)].append((e,v,r)) - -- if not verfile.has_key(pkgtuple): -+ if pkgtuple not in verfile: - verfile[pkgtuple] = [] - verfile[pkgtuple].append(pkg) - -diff --git a/repoquery.py b/repoquery.py -index eb524f3..76b1178 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -146,7 +146,7 @@ class pkgQuery: - if len(tmp) > 1: - item = tmp[0] - conv = tmp[1] -- if convertmap.has_key(conv): -+ if conv in convertmap: - convert = convertmap[conv] - else: - raise queryError("Invalid conversion: %s" % conv) -@@ -168,7 +168,7 @@ class pkgQuery: - return self.fmt_queryformat() - - def doQuery(self, method, *args, **kw): -- if std_qf.has_key(method): -+ if method in std_qf: - self.qf = std_qf[method] - return self.fmt_queryformat() - elif hasattr(self, "fmt_%s" % method): -@@ -295,7 +295,7 @@ class instPkgQuery(pkgQuery): - self.classname = 'installed pkg' - - def __getitem__(self, item): -- if self.tagmap.has_key(item): -+ if item in self.tagmap: - return self.pkg.tagByName(self.tagmap[item]) - else: - return pkgQuery.__getitem__(self, item) -diff --git a/reposync.py b/reposync.py -index 5c8ee32..b66e927 100755 ---- a/reposync.py -+++ b/reposync.py -@@ -222,7 +222,7 @@ def main(): - download_set[rpmname] = 1 - - for pkg in current_pkgs: -- if download_set.has_key(pkg): -+ if pkg in download_set: - continue - - if not opts.quiet: -diff --git a/repotrack.py b/repotrack.py -index 35b8375..1c7158a 100755 ---- a/repotrack.py -+++ b/repotrack.py -@@ -214,9 +214,8 @@ def main(): - del this_sack - - for res in pkg_list: -- if res is not None: -- if not unprocessed_pkgs.has_key(res.pkgtup): -- unprocessed_pkgs[res.pkgtup] = res -+ if res is not None and res.pkgtup not in unprocessed_pkgs: -+ unprocessed_pkgs[res.pkgtup] = res - - - -diff --git a/yum-debug-dump.py b/yum-debug-dump.py -index f280d61..0ef90b2 100644 ---- a/yum-debug-dump.py -+++ b/yum-debug-dump.py -@@ -128,7 +128,7 @@ class YumDebugDump(yum.YumBase): - if req.startswith('rpmlib'): - continue # ignore rpmlib deps - -- if not providers.has_key((req,rflags,ver)): -+ if (req,rflags,ver) not in providers: - resolve_sack = self.rpmdb.whatProvides(req,rflags,ver) - else: - resolve_sack = providers[(req,rflags,ver)] --- -1.6.6.1 - - -From 39e3f286c7bb5d09f1440e2a50dd21d0c1603b49 Mon Sep 17 00:00:00 2001 -From: Dennis Gregorovic -Date: Wed, 31 Mar 2010 15:00:54 -0400 -Subject: [PATCH 13/24] Include all packages listed in the pkgonly arg - ---- - repoclosure.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/repoclosure.py b/repoclosure.py -index d9a94d7..4c8cfa6 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -146,7 +146,7 @@ class RepoClosure(yum.YumBase): - pkgs = filter(lambda x: x.arch == 'src', pkgs) - - if self.pkgonly: -- pkgs = filter(lambda x: x.name == self.pkgonly[0], pkgs) -+ pkgs = filter(lambda x: x.name in self.pkgonly, pkgs) - - for pkg in pkgs: - for (req, flags, (reqe, reqv, reqr)) in pkg.returnPrco('requires'): --- -1.6.6.1 - - -From 267c33dd4c50ea9844f3720832c6c65a623d7b4c Mon Sep 17 00:00:00 2001 -From: Dennis Gregorovic -Date: Wed, 31 Mar 2010 15:18:35 -0400 -Subject: [PATCH 14/24] Add a --group flag to filter packages by comps group - ---- - repoclosure.py | 20 +++++++++++++++++--- - 1 files changed, 17 insertions(+), 3 deletions(-) - -diff --git a/repoclosure.py b/repoclosure.py -index 4c8cfa6..88a6adb 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -63,6 +63,8 @@ def parseArgs(): - help="specify repoid & paths of additional repositories - unique repoid and path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") - parser.add_option("-p", "--pkg", action="append", - help="check closure for this package only") -+ parser.add_option("-g", "--group", action="append", -+ help="check closure for packages in this group only") - (opts, args) = parser.parse_args() - return (opts, args) - -@@ -70,13 +72,14 @@ def parseArgs(): - # so we have to do at least some API guarantee stuff. - class RepoClosure(yum.YumBase): - def __init__(self, arch=[], config="/etc/yum.conf", builddeps=False, pkgonly=None, -- basearch=None): -+ basearch=None, grouponly=None): - yum.YumBase.__init__(self) - if basearch: - self.preconf.arch = basearch - self.logger = logging.getLogger("yum.verbose.repoclosure") - self.builddeps = builddeps - self.pkgonly = pkgonly -+ self.grouponly = grouponly - self.doConfigSetup(fn = config,init_plugins=False) - self._rc_arches = arch - -@@ -145,8 +148,18 @@ class RepoClosure(yum.YumBase): - if self.builddeps: - pkgs = filter(lambda x: x.arch == 'src', pkgs) - -- if self.pkgonly: -- pkgs = filter(lambda x: x.name in self.pkgonly, pkgs) -+ pkglist = self.pkgonly -+ if self.grouponly: -+ if not pkglist: -+ pkglist = [] -+ for group in self.grouponly: -+ groupobj = self.comps.return_group(group) -+ if not groupobj: -+ continue -+ pkglist.extend(groupobj.packages) -+ -+ if pkglist: -+ pkgs = filter(lambda x: x.name in pkglist, pkgs) - - for pkg in pkgs: - for (req, flags, (reqe, reqv, reqr)) in pkg.returnPrco('requires'): -@@ -189,6 +202,7 @@ def main(): - config=opts.config, - builddeps=opts.builddeps, - pkgonly=opts.pkg, -+ grouponly=opts.group, - basearch=opts.basearch) - - if opts.repofrompath: --- -1.6.6.1 - - -From 8361ec1ae233a507a05c214fa4966e1f232e7a92 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Thu, 1 Apr 2010 21:57:36 +0300 -Subject: [PATCH 15/24] Add repoclosure --group completion. - ---- - yum-utils.bash | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) - -diff --git a/yum-utils.bash b/yum-utils.bash -index 308d82b..d1f13c9 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -142,10 +142,14 @@ _yu_repoclosure() - type _yum_list &>/dev/null && _yum_list all "$2" - return 0 - ;; -+ -g|--group) -+ type _yum_grouplist &>/dev/null && _yum_grouplist "" "$2" -+ return 0 -+ ;; - esac - - COMPREPLY=( $( compgen -W '--help --config --arch --basearch --builddeps -- --repoid --tempcache --quiet --newest --repofrompath --pkg' \ -+ --repoid --tempcache --quiet --newest --repofrompath --pkg --group' \ - -- "$2" ) ) - } && - complete -F _yu_repoclosure -o filenames repoclosure repoclosure.py --- -1.6.6.1 - - -From 08975b3f4d0f31fe7af7a12443c227bfcbc9f6de Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Fri, 2 Apr 2010 11:34:54 +0300 -Subject: [PATCH 16/24] Fix always_print_best_host conf setting. - ---- - plugins/fastestmirror/fastestmirror.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py -index 0701ef7..a8f1ee7 100644 ---- a/plugins/fastestmirror/fastestmirror.py -+++ b/plugins/fastestmirror/fastestmirror.py -@@ -90,7 +90,7 @@ def init_hook(conduit): - - """ - global verbose, socket_timeout, hostfilepath, maxhostfileage, loadcache -- global maxthreads, exclude, prefer, downgrade_ftp -+ global maxthreads, exclude, prefer, downgrade_ftp, always_print_best_host - if hasattr(conduit, 'registerPackageName'): - conduit.registerPackageName("yum-plugin-fastestmirror") - verbose = conduit.confBool('main', 'verbose', default=False) --- -1.6.6.1 - - -From a33e328bd75f1c1828ee287df0582298f625fd93 Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Thu, 8 Apr 2010 15:58:48 -0400 -Subject: [PATCH 17/24] Add yumdb man page, and yumdb copy command - ---- - docs/Makefile | 2 +- - docs/yumdb.8 | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - yum-utils.spec | 1 + - yumdb.py | 14 ++++++ - 4 files changed, 142 insertions(+), 1 deletions(-) - create mode 100644 docs/yumdb.8 - -diff --git a/docs/Makefile b/docs/Makefile -index 7e81045..947498d 100644 ---- a/docs/Makefile -+++ b/docs/Makefile -@@ -2,7 +2,7 @@ DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changel - yum-list-data yum-filter-data yum-verify yum-utils yum-aliases yum-debug-dump yum-versionlock \ - yum-groups-manager debuginfo-install repodiff yum-fs-snapshot - DOCS5 = yum-changelog.conf yum-versionlock.conf yum-fs-snapshot.conf --DOCS8 = yum-security yum-complete-transaction -+DOCS8 = yum-security yum-complete-transaction yumdb - - all: - echo "Nothing to do" -diff --git a/docs/yumdb.8 b/docs/yumdb.8 -new file mode 100644 -index 0000000..7c39459 ---- /dev/null -+++ b/docs/yumdb.8 -@@ -0,0 +1,126 @@ -+.\" yumdb command -+.TH "yumdb" "8" "8 April 2010" "James Antill" "" -+.SH "NAME" -+yumdb command -+.SH "SYNOPSIS" -+\fByumdb\fP [command] [packages ...] -+.SH "DESCRIPTION" -+.PP -+This command is used to query and alter the yum database, which is a simple -+key value store used in conjunction with the rpm database. Any installed package -+can have arbitrary data in the yum database, however the main use case is to -+store extra data about packages as they are installed. -+.PP -+yumdb \fIcommand\fPs are: -+.br -+.IP "\fByumdb get [pkg-wildcard]...\fP" -+.PP -+This command will get the value for the given key, limiting to any specified -+packages. -+.br -+.IP "\fByumdb set [pkg-wildcard]..." -+.PP -+This command will set the value for the given key, to the given value, limiting -+to any specified packages. -+.br -+.IP "\fByumdb del [pkg-wildcard]... -+.PP -+This command will delete the given key, limiting to any specified packages. -+.br -+.IP "\fByumdb rename [pkg-wildcard]... -+.PP -+This command will rename the given old-key, to the given new-key, limiting to -+any specified packages. If the old-key does not exist, nothing happens. -+.br -+.IP "\fByumdb rename-force [pkg-wildcard]... -+.PP -+This command will rename the given old-key, to the given new-key, limiting to -+any specified packages. If the old-key does not exist, new-key is deleted. -+.br -+.IP "\fByumdb copy [pkg-wildcard]... -+.PP -+This command will copy the given old-key, to the given new-key, limiting to -+any specified packages. If the old-key does not exist, nothing happens. -+.br -+.IP "\fByumdb search ... -+.PP -+This command will search all packages for the given key, against any of the -+given wildcard values. -+.br -+.IP "\fByumdb exist [pkg-wildcard]... -+.PP -+This command will print any packages which have the given key, limiting to any -+specified packages. -+.br -+.IP "\fByumdb unset [pkg-wildcard]... -+.PP -+This command will print any packages which do not have the given key, limiting -+to any specified packages. -+.br -+.IP "\fByumdb info [pkg-wildcard]... -+.PP -+This command will all the data stored in the yumdb, limiting to any specified -+packages. -+ -+.SH "EXAMPLES" -+.PP -+List all the packages which don't have a from_repo key/value: -+.IP -+yumdb unset from_repo -+.PP -+List all the packages which were installed as dependencies: -+.IP -+yumdb search reason dep -+ -+.SH "WELL KNOWN KEYS" -+.PP -+Note that there is no limit to the number of keys that can be created or what -+they may contain (for installed packages only). However this is a list of well -+known keys, and what they store. -+.nf -+.br -+.IP "\fBchecksum_data -+.IP "\fBchecksum_type -+.PP -+These keys store the createrepo checksum, and it's type, of the available -+package yum installed. Note that these are used by "yum version" to calculate -+the rpmdb version. -+.br -+.IP "\fBcommand_line -+.PP -+This key stores the entire command line, of the yum command (if it was called). -+.br -+.IP "\fBfrom_repo -+.IP "\fBfrom_repo_revision -+.IP "\fBfrom_repo_timestamp -+.PP -+These keys take values from the available package yum installed, and store the -+repo id, it's revision and timestamp. -+.br -+.IP "\fBreason -+.PP -+This key stores either "user" or "dep", currently. To mark if the user requested -+the package to be installed, or if it was brought in automatically as a -+dependency. Note that this is kept over updates. -+.br -+.IP "\fBreleasever -+.PP -+This key stores the value of releasever, when the package was installed. -+.br -+.IP "\fBinstallonly -+.PP -+If this attribute has the value "keep" then this package will not be -+removed automatically by the installonly process (and does not count towards -+the installonly_limit). -+ -+.SH "SEE ALSO" -+.nf -+.I yum (8) -+.I rpm (8) -+.fi -+ -+.SH "AUTHORS" -+.nf -+James Antill . -+.fi -+ -diff --git a/yum-utils.spec b/yum-utils.spec -index 307a4e8..2f0b955 100644 ---- a/yum-utils.spec -+++ b/yum-utils.spec -@@ -463,6 +463,7 @@ fi - %{_mandir}/man1/yum-debug-dump.1.* - %{_mandir}/man8/yum-complete-transaction.8.* - %{_mandir}/man1/yum-groups-manager.1.* -+%{_mandir}/man8/yumdb.8.* - %{_mandir}/man1/yumdownloader.1.* - - %files -n yum-updateonboot -diff --git a/yumdb.py b/yumdb.py -index 365006e..38ba561 100755 ---- a/yumdb.py -+++ b/yumdb.py -@@ -19,6 +19,7 @@ def setup_opts(): - del [pkg-wildcard]... - rename [pkg-wildcard]... - rename-force [pkg-wildcard]... -+ copy [pkg-wildcard]... - search ... - exist? [pkg-wildcard]... - unset? [pkg-wildcard]... -@@ -68,6 +69,19 @@ def run_cmd(yb, args, inshell=False): - print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) - else: - print " " * 4, ynkey, '' -+ elif args[0] == 'copy' and len(args) > 2: -+ args.pop(0) -+ yokey = args.pop(0) -+ ynkey = args.pop(0) -+ for pkg in sorted(yb.rpmdb.returnPackages(patterns=args)): -+ print pkg -+ if yokey in pkg.yumdb_info: -+ setattr(pkg.yumdb_info, ynkey, getattr(pkg.yumdb_info, yokey)) -+ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) -+ elif ynkey in pkg.yumdb_info: -+ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) -+ else: -+ print " " * 4, ynkey, '' - elif args[0] in ['rename-f', 'rename-force'] and len(args) > 2: - args.pop(0) - yokey = args.pop(0) --- -1.6.6.1 - - -From b4c9ab9ecf7e602f78836ba34b1fc3994904e533 Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Thu, 8 Apr 2010 16:02:55 -0400 -Subject: [PATCH 18/24] Use the yum configured cachedir value, in fastestmirror - ---- - plugins/fastestmirror/fastestmirror.conf | 4 +++- - plugins/fastestmirror/fastestmirror.py | 6 ++++-- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/plugins/fastestmirror/fastestmirror.conf b/plugins/fastestmirror/fastestmirror.conf -index 32ecec4..c6db0d8 100644 ---- a/plugins/fastestmirror/fastestmirror.conf -+++ b/plugins/fastestmirror/fastestmirror.conf -@@ -3,7 +3,9 @@ enabled=1 - verbose=0 - always_print_best_host = true - socket_timeout=3 --hostfilepath=/var/cache/yum/timedhosts.txt -+# Relative paths are relative to the cachedir (and so works for users as well -+# as root). -+hostfilepath=timedhosts.txt - maxhostfileage=10 - maxthreads=15 - #exclude=.gov, facebook -diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py -index a8f1ee7..db2fede 100644 ---- a/plugins/fastestmirror/fastestmirror.py -+++ b/plugins/fastestmirror/fastestmirror.py -@@ -14,7 +14,7 @@ - # enabled=1 - # verbose=1 - # socket_timeout=3 --# hostfilepath=/var/cache/yum/timedhosts -+# hostfilepath=timedhosts - # maxhostfileage=10 - # maxthreads=15 - # #exclude=.gov, facebook -@@ -98,7 +98,9 @@ def init_hook(conduit): - default=True) - socket_timeout = conduit.confInt('main', 'socket_timeout', default=3) - hostfilepath = conduit.confString('main', 'hostfilepath', -- default='/var/cache/yum/timedhosts') -+ default='timedhosts') -+ if hostfilepath and hostfilepath[0] != '/': -+ hostfilepath = conduit._base.conf.cachedir + '/' + hostfilepath - maxhostfileage = conduit.confInt('main', 'maxhostfileage', default=10) - maxthreads = conduit.confInt('main', 'maxthreads', default=10) - exclude = conduit.confString('main', 'exclude', default=None) --- -1.6.6.1 - - -From 264a67e713827a086ceef13b163a46dc6f28acf4 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Fri, 9 Apr 2010 17:01:16 -0400 -Subject: [PATCH 19/24] fixes https://bugzilla.redhat.com/show_bug.cgi?id=580343 - -when we are dealing with compressed comps files just fetch the group -not group_gz ---- - reposync.py | 45 +++++++++++++++++++++++---------------------- - 1 files changed, 23 insertions(+), 22 deletions(-) - -diff --git a/reposync.py b/reposync.py -index b66e927..4d70e30 100755 ---- a/reposync.py -+++ b/reposync.py -@@ -110,7 +110,7 @@ def parseArgs(): - parser.add_option("-p", "--download_path", dest='destdir', - default=os.getcwd(), help="Path to download packages to: defaults to current dir") - parser.add_option("--norepopath", dest='norepopath', default=False, action="store_true", -- help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)") -+ help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)") - parser.add_option("-g", "--gpgcheck", default=False, action="store_true", - help="Remove packages that fail GPG signature checking after downloading") - parser.add_option("-u", "--urls", default=False, action="store_true", -@@ -176,7 +176,7 @@ def main(): - # enable the ones we like - for repo in myrepos: - repo.enable() -- -+ - # --norepopath can only be sensibly used with a single repository: - if len(my.repos.listEnabled()) > 1 and opts.norepopath: - print >> sys.stderr, "Error: Can't use --norepopath with multiple repositories" -@@ -238,29 +238,30 @@ def main(): - my.logger.error("Could not make repo subdir: %s" % e) - my.closeRpmDB() - sys.exit(1) -- try: # download random other metadata -- if opts.downloadcomps: -- compsfile = repo.getGroups() -- shutil.copyfile(compsfile,"%s/%s" % (local_repo_path,'comps.xml')) -- except yum.Errors.RepoMDError,e : -- if not opts.quiet: -- my.logger.error("Unable to fetch metadata: %s" % e) - -+ if opts.downloadcomps: -+ wanted_types = ['group'] -+ - if opts.downloadmd: -- for ftype in repo.repoXML.fileTypes(): -- if ftype in ['primary', 'primary_db', 'filelists', -- 'filelists_db', 'other', 'other_db']: -- continue -- if opts.downloadcomps and ftype == 'group': -- continue -- try: -- resultfile = repo.retrieveMD(ftype) -- basename = os.path.basename(resultfile) -- shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename)) -- except yum.Errors.RepoMDError,e : -- if not opts.quiet: -- my.logger.error("Unable to fetch metadata: %s" % e) -+ wanted_types = repo.repoXML.fileTypes.keys() -+ -+ for ftype in repo.repoXML.fileTypes(): -+ if ftype in ['primary', 'primary_db', 'filelists', -+ 'filelists_db', 'other', 'other_db']: -+ continue -+ if ftype not in wanted_types: -+ continue - -+ try: -+ resultfile = repo.retrieveMD(ftype) -+ basename = os.path.basename(resultfile) -+ if ftype == 'group' and opts.downloadcomps: # for compat with how --downloadcomps saved the comps file always as comps.xml -+ basename = 'comps.xml' -+ shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename)) -+ except yum.Errors.RepoMDError,e : -+ if not opts.quiet: -+ my.logger.error("Unable to fetch metadata: %s" % e) -+ - remote_size = 0 - local_size = 0 - if not opts.urls: --- -1.6.6.1 - - -From 4f7fa956098ec985727c5d12e694ccb259a6f037 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Sat, 10 Apr 2010 00:21:57 +0300 -Subject: [PATCH 20/24] Add copy to yumdb completions. - ---- - yum-utils.bash | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/yum-utils.bash b/yum-utils.bash -index d1f13c9..54c9ef8 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -242,7 +242,7 @@ _yu_yumdb() - esac - - if [ $COMP_CWORD -le 1 ] ; then -- COMPREPLY=( $( compgen -W 'get set del rename rename-force search -+ COMPREPLY=( $( compgen -W 'get set del rename rename-force copy search - exist unset info shell --version --help --noplugins --config' \ - -- "$2" ) ) - fi --- -1.6.6.1 - - -From 2e5b45d9c4e743f88b085587984a19cc009d282e Mon Sep 17 00:00:00 2001 -From: Michael Schwendt -Date: Tue, 13 Apr 2010 16:19:19 -0400 -Subject: [PATCH 21/24] Get the newer "same day" changelog entries in repodiff. - -Tided by by James. ---- - repodiff.py | 21 ++++++++++++++------- - 1 files changed, 14 insertions(+), 7 deletions(-) - -diff --git a/repodiff.py b/repodiff.py -index ac1865e..ff67fe4 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -198,15 +198,22 @@ def main(args): - # for any newer clog in pkg - # print it - oldlogs = oldpkg.changelog -- oldlogs.sort() -- oldlogs.reverse() - if len(oldlogs): -- oldtime = oldlogs[0][0] -- clogdelta = [] -+ # Don't sort as that can screw the order up when time is the -+ # same. -+ oldtime = oldlogs[-1][0] -+ oldauth = oldlogs[-1][2] -+ oldcontent = oldlogs[-1][2] - for (t, author, content) in pkg.changelog: -- if t > oldtime: -- msg += "* %s %s\n%s\n\n" % (datetime.date.fromtimestamp(int(t)).strftime("%a %b %d %Y"), -- to_unicode(author), to_unicode(content)) -+ if t < oldtime: -+ break -+ if ((t == oldtime) and (author == auth) and -+ (content == oldcontent)): -+ break -+ tm = datetime.date.fromtimestamp(int(t)) -+ tm = tm.strftime("%a %b %d %Y") -+ msg += "* %s %s\n%s\n\n" % (tm, to_unicode(author), -+ to_unicode(content)) - if opts.size: - sizechange = int(pkg.size) - int(oldpkg.size) - total_sizechange += sizechange --- -1.6.6.1 - - -From 9afba990529f7b2381f907b5341a45a4e9eac08d Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Tue, 13 Apr 2010 16:44:06 -0400 -Subject: [PATCH 22/24] Stupid typo fix - ---- - repodiff.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/repodiff.py b/repodiff.py -index ff67fe4..5f3d5b1 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -207,7 +207,7 @@ def main(args): - for (t, author, content) in pkg.changelog: - if t < oldtime: - break -- if ((t == oldtime) and (author == auth) and -+ if ((t == oldtime) and (author == oldauth) and - (content == oldcontent)): - break - tm = datetime.date.fromtimestamp(int(t)) --- -1.6.6.1 - - -From cb745dcbca766c7b1a185b938e8eff9792a1317a Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Tue, 13 Apr 2010 18:05:05 -0400 -Subject: [PATCH 23/24] Fix obsoletes processing in repodiff, also giant speedup. Compared output - both before and after and it was identical: - -1. Original with 3.2.27: 8 minutes 27 seconds - -2. Original with returnNewestByName() speedup: 1 minute 50 seconds. - -3. New repodiff with 3.2.27: 11 seconds. - -...tested with Updates/11 vs. Updates/12 on 2010-04-13. ---- - repodiff.py | 74 ++++++++++++++++++++++++++++++++++++---------------------- - 1 files changed, 46 insertions(+), 28 deletions(-) - -diff --git a/repodiff.py b/repodiff.py -index 5f3d5b1..475f599 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -20,6 +20,7 @@ import datetime - import os - import locale - from yum.i18n import to_unicode -+import time - - from optparse import OptionParser - -@@ -59,42 +60,59 @@ class DiffYum(yum.YumBase): - remove = [] - modified = [] - obsoleted = {} # obsoleted = by -- newsack = yum.packageSack.ListPackageSack() -- for repoid in self.dy_repos['new']: -- newsack.addList(self.pkgSack.returnPackages(repoid=repoid)) -- -- oldsack = yum.packageSack.ListPackageSack() -- for repoid in self.dy_repos['old']: -- oldsack.addList(self.pkgSack.returnPackages(repoid=repoid)) -- -- for pkg in newsack.returnNewestByName(): -- tot = self.pkgSack.searchNevra(name=pkg.name) -- if len(tot) == 1: # it's only in new -- add.append(pkg) -- if len(tot) > 1: -- if oldsack.contains(name=pkg.name): -- newest_old = oldsack.returnNewestByName(name=pkg.name)[0] -- if newest_old.EVR != pkg.EVR: -- modified.append((pkg, newest_old)) -+ -+ # Originally we did this by setting up old and new repos. ... but as -+ # a faster way, we can just go through all the pkgs once getting the -+ # newest pkg with a repoid prefix of "old", dito. "new", and then -+ # compare those directly. -+ def _next_old_new(pkgs): -+ """ Returns latest pair of (oldpkg, newpkg) for each package -+ name. If that name doesn't exist, then it returns None for -+ that package. """ -+ lastname = None -+ npkg = opkg = None -+ for pkg in sorted(pkgs): -+ if lastname is None: -+ lastname = pkg.name -+ if lastname != pkg.name: -+ yield opkg, npkg -+ opkg = npkg = None -+ lastname = pkg.name -+ -+ if pkg.repo.id.startswith('old'): -+ opkg = pkg - else: -- add.append(pkg) -+ assert pkg.repo.id.startswith('new') -+ npkg = pkg -+ if opkg is not None or npkg is not None: -+ yield opkg, npkg - -- for pkg in oldsack.returnNewestByName(): -- if len(newsack.searchNevra(name=pkg.name)) == 0: -- remove.append(pkg) -+ for opkg, npkg in _next_old_new(self.pkgSack.returnPackages()): -+ if opkg is None: -+ add.append(npkg) -+ elif npkg is None: -+ remove.append(opkg) -+ elif not npkg.verEQ(opkg): -+ modified.append((npkg, opkg)) - -+ ao = [] -+ for pkg in add: -+ if not pkg.obsoletes: -+ continue -+ ao.append(pkg) - -+ # Note that this _only_ shows something when you have an additional -+ # package obsoleting a removed package. If the obsoleted package is -+ # still there (somewhat "common") or the obsoleter is an update (dito) -+ # you get get hits here. - for po in remove: -- for newpo in add: -- foundit = 0 -- for obs in newpo.obsoletes: -- if po.inPrcoRange('provides', obs): -- foundit = 1 -- obsoleted[po] = newpo -- break -- if foundit: -+ # Remember: Obsoletes are for package names only. -+ poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release)) -+ for newpo in ao: -+ if po.inPrcoRange('obsoletes', poprovtup): -+ obsoleted[po] = newpo - break -- -+ - ygh = yum.misc.GenericHolder() - ygh.add = add - ygh.remove = remove --- -1.6.6.1 - - -From 99cbe8d6dad9ca8543dedcc5c12bc0f9fdde200e Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Tue, 13 Apr 2010 18:16:03 -0400 -Subject: [PATCH 24/24] Add message about archlist usage, to stop people being confused. - ---- - docs/repodiff.1 | 2 ++ - repodiff.py | 4 ++++ - 2 files changed, 6 insertions(+), 0 deletions(-) - -diff --git a/docs/repodiff.1 b/docs/repodiff.1 -index e1ffc3b..640b023 100644 ---- a/docs/repodiff.1 -+++ b/docs/repodiff.1 -@@ -16,6 +16,8 @@ Add a repo. as an old repo. - Add a repo. as an new repo. - .IP "\fB\-\-archlist, -a\fP" - Add architectures to change the default from just comparing source packages. -+Note that if you want the same as a native -+"x86_64" architecture machine you need: x86_64,athlon,i686,i586,i486,i386,noarch - .IP "\fB\-\-size, -s\fP" - Ouput additional data about the size of the changes. - .SH "EXAMPLES" -diff --git a/repodiff.py b/repodiff.py -index 475f599..0a1c42f 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -239,6 +239,10 @@ def main(args): - - print msg - -+ if (not ygh.add and not ygh.remove and not ygh.modified and -+ not my.pkgSack.searchNevra(arch='src')): -+ print "** No 'src' pkgs in any repo. maybe see docs. on --archlist?" -+ - print 'Summary:' - print 'Added Packages: %s' % len(ygh.add) - print 'Removed Packages: %s' % len(ygh.remove) --- -1.6.6.1 - -commit 9c647a75528566c0abf7bf4d0ed8c8c03e6223a5 -Author: James Antill -Date: Thu Apr 15 00:54:03 2010 -0400 - - Fix typo on obsoletes check, in repodiff - -diff --git a/repodiff.py b/repodiff.py -index 0a1c42f..2810108 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -109,7 +109,7 @@ class DiffYum(yum.YumBase): - # Remember: Obsoletes are for package names only. - poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release)) - for newpo in ao: -- if po.inPrcoRange('obsoletes', poprovtup): -+ if newpo.inPrcoRange('obsoletes', poprovtup): - obsoleted[po] = newpo - break - -commit 007bf5d4fd3147b51390d7124e64b3e431c831a9 -Author: James Antill -Date: Fri Apr 16 14:50:27 2010 -0400 - - Use the newest old changelog entry, not the oldest ... *sigh* - -diff --git a/repodiff.py b/repodiff.py -index 2810108..bc2cbf7 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -219,9 +219,9 @@ def main(args): - if len(oldlogs): - # Don't sort as that can screw the order up when time is the - # same. -- oldtime = oldlogs[-1][0] -- oldauth = oldlogs[-1][2] -- oldcontent = oldlogs[-1][2] -+ oldtime = oldlogs[0][0] -+ oldauth = oldlogs[0][2] -+ oldcontent = oldlogs[0][2] - for (t, author, content) in pkg.changelog: - if t < oldtime: - break -commit d4722ce74fe655888fa9d5b02090a56f6e137ce0 -Author: James Antill -Date: Sun Apr 18 02:08:39 2010 -0400 - - Fix the actual bug in repodiff, comparison - -diff --git a/repodiff.py b/repodiff.py -index bc2cbf7..7ef7c50 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -220,7 +220,7 @@ def main(args): - # Don't sort as that can screw the order up when time is the - # same. - oldtime = oldlogs[0][0] -- oldauth = oldlogs[0][2] -+ oldauth = oldlogs[0][1] - oldcontent = oldlogs[0][2] - for (t, author, content) in pkg.changelog: - if t < oldtime: diff --git a/yum-utils.spec b/yum-utils.spec index a81b308..056c8e8 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,24 +1,24 @@ Summary: Utilities based around the yum package manager Name: yum-utils -Version: 1.1.26 -Release: 7%{?dist} +Version: 1.1.27 +Release: 1%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz -Patch0: yum-utils-HEAD.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Requires: python >= 2.4 , yum >= 3.2.24 +Requires: python >= 2.4 , yum >= 3.2.27 BuildRequires: python >= 2.4 %description yum-utils is a collection of utilities and examples for the yum package manager. It includes utilities by different authors that make yum easier and -more powerful to use. These tools include: debuginfo-install, package-cleanup, -repoclosure, repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync, -repotrack, verifytree, yum-builddep, yum-complete-transaction, yumdownloader, -yum-debug-dump, yum-debug-restore and yum-groups-manager. +more powerful to use. These tools include: debuginfo-install, +find-repos-of-install, needs-restarting, package-cleanup, repoclosure, +repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync, +repotrack, verifytree, yumdownloader, yum-builddep, yum-complete-transaction, +yum-config-manager, yum-debug-dump, yum-debug-restore and yum-groups-manager. %package -n yum-updateonboot Summary: Run yum update on system boot @@ -163,21 +163,6 @@ to yum and the list-security and info-security commands. The options make it possible to limit list/upgrade of packages to specific security relevant ones. The commands give you the security information. -%package -n yum-plugin-protect-packages -Summary: Yum plugin to prevents Yum from removing itself and other protected packages -Group: System Environment/Base -Provides: yum-protect-packages = %{version}-%{release} -Obsoletes: yum-protect-packages < 1.1.20-0 -Conflicts: yum-protect-packages < 1.1.20-0 -Requires: yum >= 3.0 - -%description -n yum-plugin-protect-packages -this plugin prevents Yum from removing itself and other protected packages. -By default, yum is the only package protected, but by extension this -automatically protects everything on which yum depends (rpm, python, glibc, -and so on).Therefore, the plugin functions well even without -compiling careful lists of all important packages. - %package -n yum-plugin-upgrade-helper Summary: Yum plugin to help upgrades to the next distribution version Group: System Environment/Base @@ -366,8 +351,6 @@ filesystem that is touched by the packages in a yum update or yum remove. %prep %setup -q -%patch0 -p1 - %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -385,7 +368,6 @@ plugins="\ refresh-updatesd \ merge-conf \ security \ - protect-packages \ upgrade-helper \ aliases \ list-data \ @@ -450,6 +432,7 @@ fi %{_bindir}/verifytree %{_bindir}/yumdownloader %{_bindir}/yum-builddep +%{_bindir}/yum-config-manager %{_bindir}/yum-debug-dump %{_bindir}/yum-groups-manager %{_bindir}/yum-debug-restore @@ -532,11 +515,6 @@ fi /usr/lib/yum-plugins/security.* %{_mandir}/man8/yum-security.8.* -%files -n yum-plugin-protect-packages -%defattr(-, root, root) -%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protect-packages.conf -/usr/lib/yum-plugins/protect-packages.* - %files -n yum-plugin-upgrade-helper %defattr(-, root, root) %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/upgrade-helper.conf @@ -623,18 +601,8 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog -* Sat Apr 17 2010 James Antill - 1.1.26-7 -- Fix the changelog entry time comparison in repodiff, again. - -* Fri Apr 16 2010 James Antill - 1.1.26-4 -- Fix the changelog entry time comparison in repodiff. - -* Wed Apr 14 2010 James Antill - 1.1.26-3 -- Get lots of fixes from latest HEAD. Also: -- --alldeps default in repoquery. -- repoquery will now do a full provides version check. -- Add repoclosure --group. -- Big repodiff speedup. +* Sun Jun 6 2010 Tim Lauridsen +- mark as 1.1.27 * Wed Feb 10 2010 Tim Lauridsen - mark as 1.1.26 From 9cc606d16f039683cdf1362d9dccd1caff4f26bb Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Sun, 6 Jun 2010 13:34:36 +0000 Subject: [PATCH 10/86] Release 1.1.27-1 --- sources | 2 +- yum-utils-HEAD.patch | 1679 ------------------------------------------ yum-utils.spec | 54 +- 3 files changed, 12 insertions(+), 1723 deletions(-) delete mode 100644 yum-utils-HEAD.patch diff --git a/sources b/sources index b5d78a8..4695520 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cdf0b2e65a57485ec37ea09a8b1e36b9 yum-utils-1.1.26.tar.gz +e5bf013b43cd898ef5483798e64317f9 yum-utils-1.1.27.tar.gz diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch deleted file mode 100644 index 7f1000a..0000000 --- a/yum-utils-HEAD.patch +++ /dev/null @@ -1,1679 +0,0 @@ -From bc3d026acd1c8f332d024bf9a9918da6451c8c07 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Tue, 9 Feb 2010 21:35:15 +0200 -Subject: [PATCH 01/24] Make --alldeps the default in repoquery. - ---alldeps is what people really almost always want, but fail to -specify for some reason. --exactdeps can be used to get the previous -default of exact matching. ---- - docs/repoquery.1 | 10 +++++++--- - repoquery.py | 6 ++++-- - yum-utils.bash | 2 +- - 3 files changed, 12 insertions(+), 6 deletions(-) - -diff --git a/docs/repoquery.1 b/docs/repoquery.1 -index 1056c80..e5ed8b7 100644 ---- a/docs/repoquery.1 -+++ b/docs/repoquery.1 -@@ -107,8 +107,12 @@ Query all packages that provide CAPABILITY. - .IP "\fB\-\-whatrequires CAPABILITY\fP" - Query all packages that require CAPABILITY. - .IP "\fB\-\-alldeps\fP" --When used with --whatrequires, use both automatic and manual dependencies --for the query. -+When used with --whatrequires, look for non-explicit dependencies in -+addition to explicit ones (e.g. files and Provides in addition to -+package names). This is the default. -+.IP "\fB\-\-exactdeps\fP" -+When used with --whatrequires, search for dependencies only exactly as given. -+This is effectively the opposite of --alldeps. - .IP "\fB\-\-recursive\fP" - When used with --whatrequires, query packages recursively. - .IP "\fB\-\-archlist=ARCH1[,ARCH2...]\fP" -@@ -147,7 +151,7 @@ Query groups instead of packages. - .IP "List all packages whose name contains 'perl':" - \fBrepoquery '*perl*'\fP - .IP "List all packages depending on openssl:" --\fBrepoquery --whatrequires --alldeps openssl\fP -+\fBrepoquery --whatrequires openssl\fP - .IP "List all package names and the repository they come from, nicely formatted:" - \fBrepoquery -a --qf "%-20{repoid} %{name}"\fP - .IP "List name and summary of all available updates (if any), nicely formatted:" -diff --git a/repoquery.py b/repoquery.py -index 2e3004b..3e2c18a 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -647,8 +647,10 @@ def main(args): - help="operate on corresponding source RPM") - parser.add_option("--resolve", action="store_true", - help="resolve capabilities to originating package(s)") -- parser.add_option("--alldeps", action="store_true", -- help="check non-explicit dependencies (files and Provides:) as well") -+ parser.add_option("--alldeps", action="store_true", default=True, -+ help="check non-explicit dependencies (files and Provides:) as well, defaults to on") -+ parser.add_option("--exactdeps", dest="alldeps", action="store_false", -+ help="check dependencies exactly as given, opposite of --alldeps") - parser.add_option("--recursive", action="store_true", - help="recursively query for packages (for whatrequires)") - parser.add_option("--whatprovides", action="store_true", -diff --git a/yum-utils.bash b/yum-utils.bash -index d8ca1dd..7df1b49 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -210,7 +210,7 @@ _yu_repoquery() - COMPREPLY=( $( compgen -W '--version --help --list --info --file - --queryformat --groupmember --all --requires --provides --obsoletes - --conflicts --changelog --location --nevra --envra --nvr --source -- --srpm --resolve --alldeps --recursive --whatprovides --whatrequires -+ --srpm --resolve --exactdeps --recursive --whatprovides --whatrequires - --whatobsoletes --whatconflicts --group --grouppkgs --archlist - --pkgnarrow --show-duplicates --repoid --enablerepo --disablerepo - --repofrompath --plugins --quiet --verbose --cache --tempcache --- -1.6.6.1 - - -From efc35f8de0475db1bfe27eb04a93f571a23ce8b7 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Mon, 15 Feb 2010 22:01:50 -0500 -Subject: [PATCH 02/24] make repoquery pass in the whole string not just split for names - ---- - repoquery.py | 5 +---- - 1 files changed, 1 insertions(+), 4 deletions(-) - -diff --git a/repoquery.py b/repoquery.py -index 2e3004b..c2b8c03 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -554,10 +554,7 @@ class YumBaseQuery(yum.YumBase): - provs.extend(pkg.files()) - - for prov in provs: -- # Only look at the providing name, not the whole version. This -- # might occasionally give some false positives but that's -- # better than missing ones which it had previously -- for pkg in self.pkgSack.searchRequires(prov.split()[0]): -+ for pkg in self.pkgSack.searchRequires(prov): - pkgs[pkg.pkgtup] = pkg - if self.options.recursive: - require_recursive(pkg.name) --- -1.6.6.1 - - -From 493450d26d04e3f61470e21f7db717e7d98e3d57 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Thu, 25 Feb 2010 12:58:35 -0500 -Subject: [PATCH 03/24] move around where we query for pkgs from sackops/prcos and what happens if no special output format - is specified in repoquery. - -makes: -repoquery -qfi /bin/bash output -qi output rather than -q output. ---- - repoquery.py | 19 +++++++++++-------- - 1 files changed, 11 insertions(+), 8 deletions(-) - -diff --git a/repoquery.py b/repoquery.py -index 0a56430..225a4cb 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -504,10 +504,21 @@ class YumBaseQuery(yum.YumBase): - else: - if self.options.srpm: - pkgs = self.matchSrcPkgs(items) -+ - else: - pkgs = self.matchPkgs(items) -+ for prco in items: -+ for oper in self.sackops: -+ try: -+ for p in self.doQuery(oper, prco): -+ if p: -+ pkgs.append(p) -+ except queryError, e: -+ self.logger.error( e.msg) - - for pkg in pkgs: -+ if not self.pkgops: -+ print to_unicode(pkg) - for oper in self.pkgops: - try: - out = pkg.doQuery(oper) -@@ -515,14 +526,6 @@ class YumBaseQuery(yum.YumBase): - print to_unicode(out) - except queryError, e: - self.logger.error( e.msg) -- for prco in items: -- for oper in self.sackops: -- try: -- for p in self.doQuery(oper, prco): -- if p: -- print p -- except queryError, e: -- self.logger.error( e.msg) - - def doQuery(self, method, *args, **kw): - return getattr(self, "fmt_%s" % method)(*args, **kw) --- -1.6.6.1 - - -From f0bee60c3fc81325e547d0f8bf42591368d18ee4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Sat, 27 Feb 2010 14:21:02 +0200 -Subject: [PATCH 04/24] Fix --releasever. - ---- - repoquery.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/repoquery.py b/repoquery.py -index 225a4cb..eb524f3 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -774,7 +774,7 @@ def main(args): - - # silence initialisation junk from modules etc unless verbose mode - initnoise = (not opts.quiet) * 2 -- repoq.releasever = opts.releasever -+ repoq.preconf.releasever = opts.releasever - if opts.conffile: - repoq.doConfigSetup(fn=opts.conffile, debuglevel=initnoise, init_plugins=opts.plugins) - else: --- -1.6.6.1 - - -From b15cb0760c864cadc5029474d07cc38882ec1815 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Mon, 1 Mar 2010 14:58:27 -0500 -Subject: [PATCH 05/24] catch all yum errors and valueError (which is coming from yum.config.py :() - generally this just means we'll get less ABRT errors and more reports from users - -(I hope) ---- - repoclosure.py | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) - -diff --git a/repoclosure.py b/repoclosure.py -index 5076fe8..8c27cdd 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -273,5 +273,10 @@ def main(): - my.logger.info(' %s' % req) - - if __name__ == "__main__": -- main() -+ try: -+ main() -+ except (yum.Errors.YumBaseError, ValueError), e: -+ print >> sys.stderr, str(e) -+ sys.exit(1) -+ - --- -1.6.6.1 - - -From 30e58c85e07abe939ff3c9af017f8355f81a4f32 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Mon, 1 Mar 2010 15:27:57 -0500 -Subject: [PATCH 06/24] setup some repo features that make sense for the debug repos to - inherit from the non-debug repos when we add them - ---- - debuginfo-install.py | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) - -diff --git a/debuginfo-install.py b/debuginfo-install.py -index 242be65..dc41b5f 100755 ---- a/debuginfo-install.py -+++ b/debuginfo-install.py -@@ -90,6 +90,11 @@ class DebugInfoInstall(YumUtilBase): - r.enable() - try: - self.doRepoSetup(thisrepo=r.id) -+ for opt in ['repo_gpgcheck', 'gpgcheck', 'cost', -+ 'skip_if_unavailable']: -+ if hasattr(r, opt): -+ setattr(r, opt, getattr(repo, opt)) -+ - except yum.Errors.RepoError, e: - self.logger.critical("Could not access repo %s error was: %s" % - (r.id, to_unicode(str(e)))) --- -1.6.6.1 - - -From c65516666fdca02f6f1500134d8a6832176320c7 Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Mon, 1 Mar 2010 22:57:07 -0500 -Subject: [PATCH 07/24] Add yum-utils to the run_with_packages when running y-c-t - ---- - yum-complete-transaction.py | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/yum-complete-transaction.py b/yum-complete-transaction.py -index ba41a51..0a9f5df 100755 ---- a/yum-complete-transaction.py -+++ b/yum-complete-transaction.py -@@ -161,6 +161,7 @@ class YumCompleteTransaction(YumUtilBase): - # populate the ts - # run it - -+ self.run_with_package_names.add('yum-utils') - times = [] - for thistime in find_unfinished_transactions(self.conf.persistdir): - if thistime.endswith('disabled'): --- -1.6.6.1 - - -From 37454f631436624cfeda72496757c6206420cc78 Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Mon, 1 Mar 2010 22:58:53 -0500 -Subject: [PATCH 08/24] Add yum-utils to the run_with_packages when running pkg-cleanup - ---- - package-cleanup.py | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/package-cleanup.py b/package-cleanup.py -index 3f5507f..ca4aa9a 100755 ---- a/package-cleanup.py -+++ b/package-cleanup.py -@@ -335,6 +335,7 @@ class PackageCleanup(YumUtilBase): - sys.exit(100) - - self._remove_old_kernels(opts.kernelcount, opts.keepdevel) -+ self.run_with_package_names.add('yum-utils') - self.buildTransaction() - if len(self.tsInfo) < 1: - print 'No old kernels to remove' -@@ -371,6 +372,7 @@ class PackageCleanup(YumUtilBase): - if opts.noscripts: - self.conf.tsflags.append('noscripts') - self._remove_old_dupes() -+ self.run_with_package_names.add('yum-utils') - self.buildTransaction() - if len(self.tsInfo) < 1: - print 'No duplicates to remove' --- -1.6.6.1 - - -From 94b52cb5499b47cb4e2b64c8a2e4e7863b2e965e Mon Sep 17 00:00:00 2001 -From: Tim Lauridsen -Date: Tue, 2 Mar 2010 12:18:31 +0100 -Subject: [PATCH 09/24] Make repoclosure work with relative paths, like ./myrepo or just . - ---- - repoclosure.py | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/repoclosure.py b/repoclosure.py -index 8c27cdd..9bfc007 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -60,7 +60,7 @@ def parseArgs(): - parser.add_option("-n", "--newest", default=0, action="store_true", - help="check only the newest packages in the repos") - parser.add_option("--repofrompath", action="append", -- help="specify repoid & paths of additional repositories - unique repoid and complete path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") -+ help="specify repoid & paths of additional repositories - unique repoid and path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") - parser.add_option("-p", "--pkg", action="append", - help="check closure for this package only") - (opts, args) = parser.parse_args() -@@ -195,12 +195,12 @@ def main(): - # setup the fake repos - for repo in opts.repofrompath: - repoid,repopath = tuple(repo.split(',')) -+ repopath = os.path.abspath(repopath) - if repopath[0] == '/': - baseurl = 'file://' + repopath - else: - baseurl = repopath - -- repopath = os.path.normpath(repopath) - newrepo = yum.yumRepo.YumRepository(repoid) - newrepo.name = repopath - newrepo.baseurl = baseurl --- -1.6.6.1 - - -From 7cece362ea4c2f9c6619339775adb5975e022275 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Wed, 10 Mar 2010 21:13:00 +0200 -Subject: [PATCH 10/24] Add bash completion for yumdb. - ---- - yum-utils.bash | 27 +++++++++++++++++++++++++++ - 1 files changed, 27 insertions(+), 0 deletions(-) - -diff --git a/yum-utils.bash b/yum-utils.bash -index 7df1b49..1ff3fbd 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -218,6 +218,33 @@ _yu_repoquery() - } && - complete -F _yu_repoquery -o filenames repoquery repoquery.py - -+# yumdb -+_yu_yumdb() -+{ -+ COMPREPLY=() -+ -+ case "$3" in -+ -h|--help|-version) -+ return 0 -+ ;; -+ -c|--config) -+ COMPREPLY=( $( compgen -f -o plusdirs -X '!*.conf' -- "$2" ) ) -+ return 0 -+ ;; -+ shell) -+ COMPREPLY=( $( compgen -f -o plusdirs -- "$2" ) ) -+ return 0 -+ ;; -+ esac -+ -+ if [ $COMP_CWORD -le 1 ] ; then -+ COMPREPLY=( $( compgen -W 'get set del rename rename-force search -+ exist unset info shell --version --help --noplugins --config' \ -+ -- "$2" ) ) -+ fi -+} && -+complete -F _yu_yumdb -o filenames yumdb yumdb.py -+ - # Local variables: - # mode: shell-script - # sh-basic-offset: 4 --- -1.6.6.1 - - -From 421ba27da401618dd10d1a31801df01b89277585 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Fri, 26 Mar 2010 22:58:45 +0200 -Subject: [PATCH 11/24] Complete on repomanage.py, package-cleanup.py, and verifytree.py. - ---- - yum-utils.bash | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/yum-utils.bash b/yum-utils.bash -index 1ff3fbd..308d82b 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -23,7 +23,7 @@ _yu_repomanage() - - COMPREPLY=( $( compgen -d -- "$2" ) ) - } && --complete -F _yu_repomanage -o filenames repomanage -+complete -F _yu_repomanage -o filenames repomanage repomanage.py - - # package-cleanup - _yu_package_cleanup() -@@ -49,7 +49,7 @@ _yu_package_cleanup() - --cleandupes --oldkernels --count --keepdevel -c --queryformat' \ - -- "$2" ) ) - } && --complete -F _yu_package_cleanup -o filenames package-cleanup -+complete -F _yu_package_cleanup -o filenames package-cleanup package-cleanup.py - - # verifytree - _yu_verifytree() -@@ -70,7 +70,7 @@ _yu_verifytree() - - COMPREPLY=( $( compgen -d -- "$2" ) ) - } && --complete -F _yu_verifytree -o filenames verifytree -+complete -F _yu_verifytree -o filenames verifytree verifytree.py - - # repo-graph - _yu_repo_graph() --- -1.6.6.1 - - -From 25ceb993e0bda203804c3e8241df5d1942eab303 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Tue, 30 Mar 2010 23:04:44 +0300 -Subject: [PATCH 12/24] Use "in" instead of has_key. - ---- - package-cleanup.py | 2 +- - plugins/changelog/changelog.py | 4 ++-- - .../fastestmirror-asyncore.py | 2 +- - plugins/fedorakmod/fedorakmod.py | 9 +++++---- - plugins/fs-snapshot/fs-snapshot.py | 2 +- - .../post-transaction-actions.py | 2 +- - plugins/priorities/priorities.py | 10 +++++----- - plugins/protectbase/protectbase.py | 2 +- - plugins/remove-with-leaves/remove-with-leaves.py | 2 +- - plugins/upgrade-helper/upgrade-helper.py | 8 ++++---- - repo-graph.py | 4 ++-- - repo-rss.py | 2 +- - repoclosure.py | 6 +++--- - repodiff.py | 2 +- - repomanage.py | 4 ++-- - repoquery.py | 6 +++--- - reposync.py | 2 +- - repotrack.py | 5 ++--- - yum-debug-dump.py | 2 +- - 19 files changed, 38 insertions(+), 38 deletions(-) - -diff --git a/package-cleanup.py b/package-cleanup.py -index ca4aa9a..c796286 100755 ---- a/package-cleanup.py -+++ b/package-cleanup.py -@@ -129,7 +129,7 @@ class PackageCleanup(YumUtilBase): - for (req,flags,ver) in po.requires: - - if req.startswith('rpmlib'): continue # ignore rpmlib deps -- if not providers.has_key((req,flags,ver)): -+ if (req,flags,ver) not in providers: - resolve_sack = self.rpmdb.whatProvides(req,flags,ver) - else: - resolve_sack = providers[(req,flags,ver)] -diff --git a/plugins/changelog/changelog.py b/plugins/changelog/changelog.py -index 250326f..007ac6d 100644 ---- a/plugins/changelog/changelog.py -+++ b/plugins/changelog/changelog.py -@@ -58,7 +58,7 @@ def srpmname(pkg): - def _show_changes_changelog(conduit, srpms): - for name in sorted(srpms.keys()): - rpms = [] -- if origpkgs.has_key(name): -+ if name in origpkgs: - for rpm in srpms[name]: - rpms.append("%s" % rpm) - done = False -@@ -85,7 +85,7 @@ def show_changes(conduit, msg): - if not tsmem.updates: - continue - name = srpmname(tsmem.po) -- if srpms.has_key(name): -+ if name in srpms: - srpms[name].append(tsmem.po) - else: - srpms[name] = [tsmem.po] -diff --git a/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py b/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py -index 8129e2c..11c394f 100644 ---- a/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py -+++ b/plugins/fastestmirror/fastestmirror-asyncore/fastestmirror-asyncore.py -@@ -135,7 +135,7 @@ def postreposetup_hook(conduit): - repomirrors = {} - repos = conduit.getRepos() - for repo in repos.listEnabled(): -- if not repomirrors.has_key(str(repo)): -+ if str(repo) not in repomirrors: - repomirrors[str(repo)] = FastestMirror(repo.urls).get_mirrorlist() - if exclude: - for mirror in repomirrors[str(repo)]: -diff --git a/plugins/fedorakmod/fedorakmod.py b/plugins/fedorakmod/fedorakmod.py -index ab9f673..b3aed61 100644 ---- a/plugins/fedorakmod/fedorakmod.py -+++ b/plugins/fedorakmod/fedorakmod.py -@@ -140,7 +140,7 @@ def resolveVersions(packageList): - continue - po.kmodName = name[0] - -- if not pdict.has_key(kernel): -+ if kernel not in pdict: - pdict[kernel] = [po] - else: - sameName = None -@@ -208,7 +208,7 @@ def pinKernels(c, newKernels, installedKernels, modules): - str(runningKernel)) - - table = resolveVersions(modules) -- if not table.has_key(runningKernel): -+ if runningKernel not in table: - c.info(2, "Trying to mimic %s which has no kernel modules installed" \ - % str(runningKernel)) - return -@@ -217,7 +217,7 @@ def pinKernels(c, newKernels, installedKernels, modules): - c.info(2, "kmods in %s: %s" % (str(runningKernel), str(names))) - for kpo in newKernels: - prov = getKernelProvides(kpo)[0] -- if table.has_key(prov): -+ if prov in table: - kmods = [ po.kmodName for po in table[prov] ] - else: - kmods = [] -@@ -255,7 +255,8 @@ def installAllKmods(c, avaModules, modules, kernels): - table = resolveVersions(interesting + modules) - - for kernel in [ getKernelProvides(k)[0] for k in kernels ]: -- if not table.has_key(kernel): continue -+ if kernel not in table: -+ continue - for po in table[kernel]: - if po not in modules: - c.getTsInfo().addTrueInstall(po) -diff --git a/plugins/fs-snapshot/fs-snapshot.py b/plugins/fs-snapshot/fs-snapshot.py -index f0ce051..a83156d 100644 ---- a/plugins/fs-snapshot/fs-snapshot.py -+++ b/plugins/fs-snapshot/fs-snapshot.py -@@ -178,7 +178,7 @@ def _create_snapshot(conduit, snapshot_tag, volume): - """ - if volume["fstype"] == "btrfs": - return _create_btrfs_snapshot(conduit, snapshot_tag, volume) -- elif volume.has_key(lvm_key): -+ elif lvm_key in volume: - return _create_lvm_snapshot(conduit, snapshot_tag, volume) - - return 0 -diff --git a/plugins/post-transaction-actions/post-transaction-actions.py b/plugins/post-transaction-actions/post-transaction-actions.py -index 7b94b90..b4da1ce 100644 ---- a/plugins/post-transaction-actions/post-transaction-actions.py -+++ b/plugins/post-transaction-actions/post-transaction-actions.py -@@ -62,7 +62,7 @@ def parse_actions(ddir, conduit): - - def _get_installed_po(rpmdb, pkgtup): - (n,a,e,v,r) = pkgtup -- if _just_installed.has_key(pkgtup): -+ if pkgtup in _just_installed: - return _just_installed[pkgtup] - return rpmdb.searchNevra(name=n, arch=a, epoch=e, ver=v, rel=r)[0] - -diff --git a/plugins/priorities/priorities.py b/plugins/priorities/priorities.py -index 3650736..ddee1cb 100644 ---- a/plugins/priorities/priorities.py -+++ b/plugins/priorities/priorities.py -@@ -134,11 +134,11 @@ def exclude_hook(conduit): - - if only_samearch: - key = "%s.%s" % (po.name,po.arch) -- if pkg_priorities.has_key(key) and pkg_priorities[key] < repo.priority: -+ if key in pkg_priorities and pkg_priorities[key] < repo.priority: - delPackage = True - else: - key = "%s" % po.name -- if pkg_priorities_archless.has_key(key) and pkg_priorities_archless[key] < repo.priority: -+ if key in pkg_priorities_archless and pkg_priorities_archless[key] < repo.priority: - delPackage = True - - if delPackage: -@@ -150,11 +150,11 @@ def exclude_hook(conduit): - # one of the obsoleted packages is not available through - # a repo with a higher priority. If so, remove this package. - if check_obsoletes: -- if obsoletes.has_key(po.pkgtup): -+ if po.pkgtup in obsoletes: - obsolete_pkgs = obsoletes[po.pkgtup] - for obsolete_pkg in obsolete_pkgs: - pkg_name = obsolete_pkg[0] -- if pkg_priorities_archless.has_key(pkg_name) and pkg_priorities_archless[pkg_name] < repo.priority: -+ if pkg_name in pkg_priorities_archless and pkg_priorities_archless[pkg_name] < repo.priority: - conduit.delPackage(po) - cnt += 1 - conduit.info(3," --> %s from %s excluded (priority)" % (po,po.repoid)) -@@ -173,5 +173,5 @@ def _pkglist_to_dict(pl, priority, addArch = False): - - def _mergeprioritydicts(dict1, dict2): - for package in dict2.keys(): -- if not dict1.has_key(package) or dict2[package] < dict1[package]: -+ if package not in dict1 or dict2[package] < dict1[package]: - dict1[package] = dict2[package] -diff --git a/plugins/protectbase/protectbase.py b/plugins/protectbase/protectbase.py -index 441cdba..37a39dd 100644 ---- a/plugins/protectbase/protectbase.py -+++ b/plugins/protectbase/protectbase.py -@@ -55,7 +55,7 @@ def exclude_hook(conduit): - continue - - for po in conduit.getPackages(repo2): -- if repo1pkgs.has_key(po.name): -+ if po.name in repo1pkgs: - conduit.delPackage(po) - cnt += 1 - -diff --git a/plugins/remove-with-leaves/remove-with-leaves.py b/plugins/remove-with-leaves/remove-with-leaves.py -index 004472f..a808aef 100644 ---- a/plugins/remove-with-leaves/remove-with-leaves.py -+++ b/plugins/remove-with-leaves/remove-with-leaves.py -@@ -42,7 +42,7 @@ remove_always = False - - - def _requires_this_package(rpmdb, pkg): -- if _requires_cache.has_key(pkg): -+ if pkg in _requires_cache: - return _requires_cache[pkg] - - requirers = {} -diff --git a/plugins/upgrade-helper/upgrade-helper.py b/plugins/upgrade-helper/upgrade-helper.py -index fd76c4f..9aa05f0 100644 ---- a/plugins/upgrade-helper/upgrade-helper.py -+++ b/plugins/upgrade-helper/upgrade-helper.py -@@ -68,11 +68,11 @@ def parse_xml(xmlfile): - child_name = ns_cleanup(child.tag) - thisarch = myarch - if child_name == 'removespec': -- if child.attrib.has_key('on_arch'): -+ if 'on_arch' in child.attrib: - thisarch = child.attrib.get('on_arch') -- if child.attrib.has_key('pkgmatch'): -+ if 'pkgmatch' in child.attrib: - thismatch = child.attrib.get('pkgmatch') -- if results.has_key(thisarch): -+ if thisarch in results: - if thismatch not in results[thisarch]: - results[thisarch].append(thismatch) - else: -@@ -89,7 +89,7 @@ def stuff_to_remove(repos): - # return them as the toremove list - - for repo in repos.listEnabled(): -- if repo.repoXML.repoData.has_key('cleanup'): -+ if 'cleanup' in repo.repoXML.repoData: - trf = repo.retrieveMD('cleanup') - tr_dict = parse_xml(trf) - # prune out things like *, ?, *.*, *.*.*.*.* -diff --git a/repo-graph.py b/repo-graph.py -index e771874..bb901a8 100755 ---- a/repo-graph.py -+++ b/repo-graph.py -@@ -69,7 +69,7 @@ class yumQuiet(yum.YumBase): - for r in pkg.returnPrco('requires'): - reqname = r[0] - if reqname.startswith('rpmlib'): continue -- if prov.has_key(reqname): -+ if reqname in prov: - provider = prov[reqname] - cached += 1 - else: -@@ -83,7 +83,7 @@ class yumQuiet(yum.YumBase): - prov[reqname] = provider - if provider == pkg.name: - xx[provider] = None -- if xx.has_key(provider) or provider in skip: -+ if provider in xx or provider in skip: - continue - else: - xx[provider] = None -diff --git a/repo-rss.py b/repo-rss.py -index f395089..845c65e 100755 ---- a/repo-rss.py -+++ b/repo-rss.py -@@ -45,7 +45,7 @@ class YumQuiet(yum.YumBase): - for po in avail: - ftime = int(po.returnSimple('filetime')) - if ftime > recentlimit: -- if not ftimehash.has_key(ftime): -+ if ftime not in ftimehash: - ftimehash[ftime] = [po] - else: - ftimehash[ftime].append(po) -diff --git a/repoclosure.py b/repoclosure.py -index 9bfc007..d9a94d7 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -153,7 +153,7 @@ class RepoClosure(yum.YumBase): - if req.startswith('rpmlib'): continue # ignore rpmlib deps - - ver = self.evrTupletoVer((reqe, reqv, reqr)) -- if resolved.has_key((req,flags,ver)): -+ if (req,flags,ver) in resolved: - continue - try: - resolve_sack = self.whatProvides(req, flags, ver) -@@ -161,7 +161,7 @@ class RepoClosure(yum.YumBase): - pass - - if len(resolve_sack) < 1: -- if not unresolved.has_key(pkg): -+ if pkg not in unresolved: - unresolved[pkg] = [] - unresolved[pkg].append((req, flags, ver)) - continue -@@ -176,7 +176,7 @@ class RepoClosure(yum.YumBase): - if resolved_by_newest: - resolved[(req,flags,ver)] = 1 - else: -- if not unresolved.has_key(pkg): -+ if pkg not in unresolved: - unresolved[pkg] = [] - unresolved[pkg].append((req, flags, ver)) - -diff --git a/repodiff.py b/repodiff.py -index 5b547c0..ac1865e 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -184,7 +184,7 @@ def main(args): - if ygh.remove: - for pkg in sorted(ygh.remove): - print 'Removed package %s' % pkg.name -- if ygh.obsoleted.has_key(pkg): -+ if pkg in ygh.obsoleted: - print 'Obsoleted by %s' % ygh.obsoleted[pkg] - remove_sizechange += (int(pkg.size)) - -diff --git a/repomanage.py b/repomanage.py -index 759bf30..aeff9e5 100755 ---- a/repomanage.py -+++ b/repomanage.py -@@ -158,11 +158,11 @@ def main(args): - (n,a,e,v,r) = pkgtuple - del hdr - -- if not pkgdict.has_key((n,a)): -+ if (n,a) not in pkgdict: - pkgdict[(n,a)] = [] - pkgdict[(n,a)].append((e,v,r)) - -- if not verfile.has_key(pkgtuple): -+ if pkgtuple not in verfile: - verfile[pkgtuple] = [] - verfile[pkgtuple].append(pkg) - -diff --git a/repoquery.py b/repoquery.py -index eb524f3..76b1178 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -146,7 +146,7 @@ class pkgQuery: - if len(tmp) > 1: - item = tmp[0] - conv = tmp[1] -- if convertmap.has_key(conv): -+ if conv in convertmap: - convert = convertmap[conv] - else: - raise queryError("Invalid conversion: %s" % conv) -@@ -168,7 +168,7 @@ class pkgQuery: - return self.fmt_queryformat() - - def doQuery(self, method, *args, **kw): -- if std_qf.has_key(method): -+ if method in std_qf: - self.qf = std_qf[method] - return self.fmt_queryformat() - elif hasattr(self, "fmt_%s" % method): -@@ -295,7 +295,7 @@ class instPkgQuery(pkgQuery): - self.classname = 'installed pkg' - - def __getitem__(self, item): -- if self.tagmap.has_key(item): -+ if item in self.tagmap: - return self.pkg.tagByName(self.tagmap[item]) - else: - return pkgQuery.__getitem__(self, item) -diff --git a/reposync.py b/reposync.py -index 5c8ee32..b66e927 100755 ---- a/reposync.py -+++ b/reposync.py -@@ -222,7 +222,7 @@ def main(): - download_set[rpmname] = 1 - - for pkg in current_pkgs: -- if download_set.has_key(pkg): -+ if pkg in download_set: - continue - - if not opts.quiet: -diff --git a/repotrack.py b/repotrack.py -index 35b8375..1c7158a 100755 ---- a/repotrack.py -+++ b/repotrack.py -@@ -214,9 +214,8 @@ def main(): - del this_sack - - for res in pkg_list: -- if res is not None: -- if not unprocessed_pkgs.has_key(res.pkgtup): -- unprocessed_pkgs[res.pkgtup] = res -+ if res is not None and res.pkgtup not in unprocessed_pkgs: -+ unprocessed_pkgs[res.pkgtup] = res - - - -diff --git a/yum-debug-dump.py b/yum-debug-dump.py -index f280d61..0ef90b2 100644 ---- a/yum-debug-dump.py -+++ b/yum-debug-dump.py -@@ -128,7 +128,7 @@ class YumDebugDump(yum.YumBase): - if req.startswith('rpmlib'): - continue # ignore rpmlib deps - -- if not providers.has_key((req,rflags,ver)): -+ if (req,rflags,ver) not in providers: - resolve_sack = self.rpmdb.whatProvides(req,rflags,ver) - else: - resolve_sack = providers[(req,rflags,ver)] --- -1.6.6.1 - - -From 39e3f286c7bb5d09f1440e2a50dd21d0c1603b49 Mon Sep 17 00:00:00 2001 -From: Dennis Gregorovic -Date: Wed, 31 Mar 2010 15:00:54 -0400 -Subject: [PATCH 13/24] Include all packages listed in the pkgonly arg - ---- - repoclosure.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/repoclosure.py b/repoclosure.py -index d9a94d7..4c8cfa6 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -146,7 +146,7 @@ class RepoClosure(yum.YumBase): - pkgs = filter(lambda x: x.arch == 'src', pkgs) - - if self.pkgonly: -- pkgs = filter(lambda x: x.name == self.pkgonly[0], pkgs) -+ pkgs = filter(lambda x: x.name in self.pkgonly, pkgs) - - for pkg in pkgs: - for (req, flags, (reqe, reqv, reqr)) in pkg.returnPrco('requires'): --- -1.6.6.1 - - -From 267c33dd4c50ea9844f3720832c6c65a623d7b4c Mon Sep 17 00:00:00 2001 -From: Dennis Gregorovic -Date: Wed, 31 Mar 2010 15:18:35 -0400 -Subject: [PATCH 14/24] Add a --group flag to filter packages by comps group - ---- - repoclosure.py | 20 +++++++++++++++++--- - 1 files changed, 17 insertions(+), 3 deletions(-) - -diff --git a/repoclosure.py b/repoclosure.py -index 4c8cfa6..88a6adb 100755 ---- a/repoclosure.py -+++ b/repoclosure.py -@@ -63,6 +63,8 @@ def parseArgs(): - help="specify repoid & paths of additional repositories - unique repoid and path required, can be specified multiple times. Example. --repofrompath=myrepo,/path/to/repo") - parser.add_option("-p", "--pkg", action="append", - help="check closure for this package only") -+ parser.add_option("-g", "--group", action="append", -+ help="check closure for packages in this group only") - (opts, args) = parser.parse_args() - return (opts, args) - -@@ -70,13 +72,14 @@ def parseArgs(): - # so we have to do at least some API guarantee stuff. - class RepoClosure(yum.YumBase): - def __init__(self, arch=[], config="/etc/yum.conf", builddeps=False, pkgonly=None, -- basearch=None): -+ basearch=None, grouponly=None): - yum.YumBase.__init__(self) - if basearch: - self.preconf.arch = basearch - self.logger = logging.getLogger("yum.verbose.repoclosure") - self.builddeps = builddeps - self.pkgonly = pkgonly -+ self.grouponly = grouponly - self.doConfigSetup(fn = config,init_plugins=False) - self._rc_arches = arch - -@@ -145,8 +148,18 @@ class RepoClosure(yum.YumBase): - if self.builddeps: - pkgs = filter(lambda x: x.arch == 'src', pkgs) - -- if self.pkgonly: -- pkgs = filter(lambda x: x.name in self.pkgonly, pkgs) -+ pkglist = self.pkgonly -+ if self.grouponly: -+ if not pkglist: -+ pkglist = [] -+ for group in self.grouponly: -+ groupobj = self.comps.return_group(group) -+ if not groupobj: -+ continue -+ pkglist.extend(groupobj.packages) -+ -+ if pkglist: -+ pkgs = filter(lambda x: x.name in pkglist, pkgs) - - for pkg in pkgs: - for (req, flags, (reqe, reqv, reqr)) in pkg.returnPrco('requires'): -@@ -189,6 +202,7 @@ def main(): - config=opts.config, - builddeps=opts.builddeps, - pkgonly=opts.pkg, -+ grouponly=opts.group, - basearch=opts.basearch) - - if opts.repofrompath: --- -1.6.6.1 - - -From 8361ec1ae233a507a05c214fa4966e1f232e7a92 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Thu, 1 Apr 2010 21:57:36 +0300 -Subject: [PATCH 15/24] Add repoclosure --group completion. - ---- - yum-utils.bash | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) - -diff --git a/yum-utils.bash b/yum-utils.bash -index 308d82b..d1f13c9 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -142,10 +142,14 @@ _yu_repoclosure() - type _yum_list &>/dev/null && _yum_list all "$2" - return 0 - ;; -+ -g|--group) -+ type _yum_grouplist &>/dev/null && _yum_grouplist "" "$2" -+ return 0 -+ ;; - esac - - COMPREPLY=( $( compgen -W '--help --config --arch --basearch --builddeps -- --repoid --tempcache --quiet --newest --repofrompath --pkg' \ -+ --repoid --tempcache --quiet --newest --repofrompath --pkg --group' \ - -- "$2" ) ) - } && - complete -F _yu_repoclosure -o filenames repoclosure repoclosure.py --- -1.6.6.1 - - -From 08975b3f4d0f31fe7af7a12443c227bfcbc9f6de Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Fri, 2 Apr 2010 11:34:54 +0300 -Subject: [PATCH 16/24] Fix always_print_best_host conf setting. - ---- - plugins/fastestmirror/fastestmirror.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py -index 0701ef7..a8f1ee7 100644 ---- a/plugins/fastestmirror/fastestmirror.py -+++ b/plugins/fastestmirror/fastestmirror.py -@@ -90,7 +90,7 @@ def init_hook(conduit): - - """ - global verbose, socket_timeout, hostfilepath, maxhostfileage, loadcache -- global maxthreads, exclude, prefer, downgrade_ftp -+ global maxthreads, exclude, prefer, downgrade_ftp, always_print_best_host - if hasattr(conduit, 'registerPackageName'): - conduit.registerPackageName("yum-plugin-fastestmirror") - verbose = conduit.confBool('main', 'verbose', default=False) --- -1.6.6.1 - - -From a33e328bd75f1c1828ee287df0582298f625fd93 Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Thu, 8 Apr 2010 15:58:48 -0400 -Subject: [PATCH 17/24] Add yumdb man page, and yumdb copy command - ---- - docs/Makefile | 2 +- - docs/yumdb.8 | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - yum-utils.spec | 1 + - yumdb.py | 14 ++++++ - 4 files changed, 142 insertions(+), 1 deletions(-) - create mode 100644 docs/yumdb.8 - -diff --git a/docs/Makefile b/docs/Makefile -index 7e81045..947498d 100644 ---- a/docs/Makefile -+++ b/docs/Makefile -@@ -2,7 +2,7 @@ DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changel - yum-list-data yum-filter-data yum-verify yum-utils yum-aliases yum-debug-dump yum-versionlock \ - yum-groups-manager debuginfo-install repodiff yum-fs-snapshot - DOCS5 = yum-changelog.conf yum-versionlock.conf yum-fs-snapshot.conf --DOCS8 = yum-security yum-complete-transaction -+DOCS8 = yum-security yum-complete-transaction yumdb - - all: - echo "Nothing to do" -diff --git a/docs/yumdb.8 b/docs/yumdb.8 -new file mode 100644 -index 0000000..7c39459 ---- /dev/null -+++ b/docs/yumdb.8 -@@ -0,0 +1,126 @@ -+.\" yumdb command -+.TH "yumdb" "8" "8 April 2010" "James Antill" "" -+.SH "NAME" -+yumdb command -+.SH "SYNOPSIS" -+\fByumdb\fP [command] [packages ...] -+.SH "DESCRIPTION" -+.PP -+This command is used to query and alter the yum database, which is a simple -+key value store used in conjunction with the rpm database. Any installed package -+can have arbitrary data in the yum database, however the main use case is to -+store extra data about packages as they are installed. -+.PP -+yumdb \fIcommand\fPs are: -+.br -+.IP "\fByumdb get [pkg-wildcard]...\fP" -+.PP -+This command will get the value for the given key, limiting to any specified -+packages. -+.br -+.IP "\fByumdb set [pkg-wildcard]..." -+.PP -+This command will set the value for the given key, to the given value, limiting -+to any specified packages. -+.br -+.IP "\fByumdb del [pkg-wildcard]... -+.PP -+This command will delete the given key, limiting to any specified packages. -+.br -+.IP "\fByumdb rename [pkg-wildcard]... -+.PP -+This command will rename the given old-key, to the given new-key, limiting to -+any specified packages. If the old-key does not exist, nothing happens. -+.br -+.IP "\fByumdb rename-force [pkg-wildcard]... -+.PP -+This command will rename the given old-key, to the given new-key, limiting to -+any specified packages. If the old-key does not exist, new-key is deleted. -+.br -+.IP "\fByumdb copy [pkg-wildcard]... -+.PP -+This command will copy the given old-key, to the given new-key, limiting to -+any specified packages. If the old-key does not exist, nothing happens. -+.br -+.IP "\fByumdb search ... -+.PP -+This command will search all packages for the given key, against any of the -+given wildcard values. -+.br -+.IP "\fByumdb exist [pkg-wildcard]... -+.PP -+This command will print any packages which have the given key, limiting to any -+specified packages. -+.br -+.IP "\fByumdb unset [pkg-wildcard]... -+.PP -+This command will print any packages which do not have the given key, limiting -+to any specified packages. -+.br -+.IP "\fByumdb info [pkg-wildcard]... -+.PP -+This command will all the data stored in the yumdb, limiting to any specified -+packages. -+ -+.SH "EXAMPLES" -+.PP -+List all the packages which don't have a from_repo key/value: -+.IP -+yumdb unset from_repo -+.PP -+List all the packages which were installed as dependencies: -+.IP -+yumdb search reason dep -+ -+.SH "WELL KNOWN KEYS" -+.PP -+Note that there is no limit to the number of keys that can be created or what -+they may contain (for installed packages only). However this is a list of well -+known keys, and what they store. -+.nf -+.br -+.IP "\fBchecksum_data -+.IP "\fBchecksum_type -+.PP -+These keys store the createrepo checksum, and it's type, of the available -+package yum installed. Note that these are used by "yum version" to calculate -+the rpmdb version. -+.br -+.IP "\fBcommand_line -+.PP -+This key stores the entire command line, of the yum command (if it was called). -+.br -+.IP "\fBfrom_repo -+.IP "\fBfrom_repo_revision -+.IP "\fBfrom_repo_timestamp -+.PP -+These keys take values from the available package yum installed, and store the -+repo id, it's revision and timestamp. -+.br -+.IP "\fBreason -+.PP -+This key stores either "user" or "dep", currently. To mark if the user requested -+the package to be installed, or if it was brought in automatically as a -+dependency. Note that this is kept over updates. -+.br -+.IP "\fBreleasever -+.PP -+This key stores the value of releasever, when the package was installed. -+.br -+.IP "\fBinstallonly -+.PP -+If this attribute has the value "keep" then this package will not be -+removed automatically by the installonly process (and does not count towards -+the installonly_limit). -+ -+.SH "SEE ALSO" -+.nf -+.I yum (8) -+.I rpm (8) -+.fi -+ -+.SH "AUTHORS" -+.nf -+James Antill . -+.fi -+ -diff --git a/yum-utils.spec b/yum-utils.spec -index 307a4e8..2f0b955 100644 ---- a/yum-utils.spec -+++ b/yum-utils.spec -@@ -463,6 +463,7 @@ fi - %{_mandir}/man1/yum-debug-dump.1.* - %{_mandir}/man8/yum-complete-transaction.8.* - %{_mandir}/man1/yum-groups-manager.1.* -+%{_mandir}/man8/yumdb.8.* - %{_mandir}/man1/yumdownloader.1.* - - %files -n yum-updateonboot -diff --git a/yumdb.py b/yumdb.py -index 365006e..38ba561 100755 ---- a/yumdb.py -+++ b/yumdb.py -@@ -19,6 +19,7 @@ def setup_opts(): - del [pkg-wildcard]... - rename [pkg-wildcard]... - rename-force [pkg-wildcard]... -+ copy [pkg-wildcard]... - search ... - exist? [pkg-wildcard]... - unset? [pkg-wildcard]... -@@ -68,6 +69,19 @@ def run_cmd(yb, args, inshell=False): - print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) - else: - print " " * 4, ynkey, '' -+ elif args[0] == 'copy' and len(args) > 2: -+ args.pop(0) -+ yokey = args.pop(0) -+ ynkey = args.pop(0) -+ for pkg in sorted(yb.rpmdb.returnPackages(patterns=args)): -+ print pkg -+ if yokey in pkg.yumdb_info: -+ setattr(pkg.yumdb_info, ynkey, getattr(pkg.yumdb_info, yokey)) -+ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) -+ elif ynkey in pkg.yumdb_info: -+ print " " * 4, ynkey, '=', getattr(pkg.yumdb_info, ynkey) -+ else: -+ print " " * 4, ynkey, '' - elif args[0] in ['rename-f', 'rename-force'] and len(args) > 2: - args.pop(0) - yokey = args.pop(0) --- -1.6.6.1 - - -From b4c9ab9ecf7e602f78836ba34b1fc3994904e533 Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Thu, 8 Apr 2010 16:02:55 -0400 -Subject: [PATCH 18/24] Use the yum configured cachedir value, in fastestmirror - ---- - plugins/fastestmirror/fastestmirror.conf | 4 +++- - plugins/fastestmirror/fastestmirror.py | 6 ++++-- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/plugins/fastestmirror/fastestmirror.conf b/plugins/fastestmirror/fastestmirror.conf -index 32ecec4..c6db0d8 100644 ---- a/plugins/fastestmirror/fastestmirror.conf -+++ b/plugins/fastestmirror/fastestmirror.conf -@@ -3,7 +3,9 @@ enabled=1 - verbose=0 - always_print_best_host = true - socket_timeout=3 --hostfilepath=/var/cache/yum/timedhosts.txt -+# Relative paths are relative to the cachedir (and so works for users as well -+# as root). -+hostfilepath=timedhosts.txt - maxhostfileage=10 - maxthreads=15 - #exclude=.gov, facebook -diff --git a/plugins/fastestmirror/fastestmirror.py b/plugins/fastestmirror/fastestmirror.py -index a8f1ee7..db2fede 100644 ---- a/plugins/fastestmirror/fastestmirror.py -+++ b/plugins/fastestmirror/fastestmirror.py -@@ -14,7 +14,7 @@ - # enabled=1 - # verbose=1 - # socket_timeout=3 --# hostfilepath=/var/cache/yum/timedhosts -+# hostfilepath=timedhosts - # maxhostfileage=10 - # maxthreads=15 - # #exclude=.gov, facebook -@@ -98,7 +98,9 @@ def init_hook(conduit): - default=True) - socket_timeout = conduit.confInt('main', 'socket_timeout', default=3) - hostfilepath = conduit.confString('main', 'hostfilepath', -- default='/var/cache/yum/timedhosts') -+ default='timedhosts') -+ if hostfilepath and hostfilepath[0] != '/': -+ hostfilepath = conduit._base.conf.cachedir + '/' + hostfilepath - maxhostfileage = conduit.confInt('main', 'maxhostfileage', default=10) - maxthreads = conduit.confInt('main', 'maxthreads', default=10) - exclude = conduit.confString('main', 'exclude', default=None) --- -1.6.6.1 - - -From 264a67e713827a086ceef13b163a46dc6f28acf4 Mon Sep 17 00:00:00 2001 -From: Seth Vidal -Date: Fri, 9 Apr 2010 17:01:16 -0400 -Subject: [PATCH 19/24] fixes https://bugzilla.redhat.com/show_bug.cgi?id=580343 - -when we are dealing with compressed comps files just fetch the group -not group_gz ---- - reposync.py | 45 +++++++++++++++++++++++---------------------- - 1 files changed, 23 insertions(+), 22 deletions(-) - -diff --git a/reposync.py b/reposync.py -index b66e927..4d70e30 100755 ---- a/reposync.py -+++ b/reposync.py -@@ -110,7 +110,7 @@ def parseArgs(): - parser.add_option("-p", "--download_path", dest='destdir', - default=os.getcwd(), help="Path to download packages to: defaults to current dir") - parser.add_option("--norepopath", dest='norepopath', default=False, action="store_true", -- help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)") -+ help="Don't add the reponame to the download path. Can only be used when syncing a single repository (default is to add the reponame)") - parser.add_option("-g", "--gpgcheck", default=False, action="store_true", - help="Remove packages that fail GPG signature checking after downloading") - parser.add_option("-u", "--urls", default=False, action="store_true", -@@ -176,7 +176,7 @@ def main(): - # enable the ones we like - for repo in myrepos: - repo.enable() -- -+ - # --norepopath can only be sensibly used with a single repository: - if len(my.repos.listEnabled()) > 1 and opts.norepopath: - print >> sys.stderr, "Error: Can't use --norepopath with multiple repositories" -@@ -238,29 +238,30 @@ def main(): - my.logger.error("Could not make repo subdir: %s" % e) - my.closeRpmDB() - sys.exit(1) -- try: # download random other metadata -- if opts.downloadcomps: -- compsfile = repo.getGroups() -- shutil.copyfile(compsfile,"%s/%s" % (local_repo_path,'comps.xml')) -- except yum.Errors.RepoMDError,e : -- if not opts.quiet: -- my.logger.error("Unable to fetch metadata: %s" % e) - -+ if opts.downloadcomps: -+ wanted_types = ['group'] -+ - if opts.downloadmd: -- for ftype in repo.repoXML.fileTypes(): -- if ftype in ['primary', 'primary_db', 'filelists', -- 'filelists_db', 'other', 'other_db']: -- continue -- if opts.downloadcomps and ftype == 'group': -- continue -- try: -- resultfile = repo.retrieveMD(ftype) -- basename = os.path.basename(resultfile) -- shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename)) -- except yum.Errors.RepoMDError,e : -- if not opts.quiet: -- my.logger.error("Unable to fetch metadata: %s" % e) -+ wanted_types = repo.repoXML.fileTypes.keys() -+ -+ for ftype in repo.repoXML.fileTypes(): -+ if ftype in ['primary', 'primary_db', 'filelists', -+ 'filelists_db', 'other', 'other_db']: -+ continue -+ if ftype not in wanted_types: -+ continue - -+ try: -+ resultfile = repo.retrieveMD(ftype) -+ basename = os.path.basename(resultfile) -+ if ftype == 'group' and opts.downloadcomps: # for compat with how --downloadcomps saved the comps file always as comps.xml -+ basename = 'comps.xml' -+ shutil.copyfile(resultfile, "%s/%s" % (local_repo_path, basename)) -+ except yum.Errors.RepoMDError,e : -+ if not opts.quiet: -+ my.logger.error("Unable to fetch metadata: %s" % e) -+ - remote_size = 0 - local_size = 0 - if not opts.urls: --- -1.6.6.1 - - -From 4f7fa956098ec985727c5d12e694ccb259a6f037 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ville=20Skytt=C3=A4?= -Date: Sat, 10 Apr 2010 00:21:57 +0300 -Subject: [PATCH 20/24] Add copy to yumdb completions. - ---- - yum-utils.bash | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/yum-utils.bash b/yum-utils.bash -index d1f13c9..54c9ef8 100644 ---- a/yum-utils.bash -+++ b/yum-utils.bash -@@ -242,7 +242,7 @@ _yu_yumdb() - esac - - if [ $COMP_CWORD -le 1 ] ; then -- COMPREPLY=( $( compgen -W 'get set del rename rename-force search -+ COMPREPLY=( $( compgen -W 'get set del rename rename-force copy search - exist unset info shell --version --help --noplugins --config' \ - -- "$2" ) ) - fi --- -1.6.6.1 - - -From 2e5b45d9c4e743f88b085587984a19cc009d282e Mon Sep 17 00:00:00 2001 -From: Michael Schwendt -Date: Tue, 13 Apr 2010 16:19:19 -0400 -Subject: [PATCH 21/24] Get the newer "same day" changelog entries in repodiff. - -Tided by by James. ---- - repodiff.py | 21 ++++++++++++++------- - 1 files changed, 14 insertions(+), 7 deletions(-) - -diff --git a/repodiff.py b/repodiff.py -index ac1865e..ff67fe4 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -198,15 +198,22 @@ def main(args): - # for any newer clog in pkg - # print it - oldlogs = oldpkg.changelog -- oldlogs.sort() -- oldlogs.reverse() - if len(oldlogs): -- oldtime = oldlogs[0][0] -- clogdelta = [] -+ # Don't sort as that can screw the order up when time is the -+ # same. -+ oldtime = oldlogs[-1][0] -+ oldauth = oldlogs[-1][2] -+ oldcontent = oldlogs[-1][2] - for (t, author, content) in pkg.changelog: -- if t > oldtime: -- msg += "* %s %s\n%s\n\n" % (datetime.date.fromtimestamp(int(t)).strftime("%a %b %d %Y"), -- to_unicode(author), to_unicode(content)) -+ if t < oldtime: -+ break -+ if ((t == oldtime) and (author == auth) and -+ (content == oldcontent)): -+ break -+ tm = datetime.date.fromtimestamp(int(t)) -+ tm = tm.strftime("%a %b %d %Y") -+ msg += "* %s %s\n%s\n\n" % (tm, to_unicode(author), -+ to_unicode(content)) - if opts.size: - sizechange = int(pkg.size) - int(oldpkg.size) - total_sizechange += sizechange --- -1.6.6.1 - - -From 9afba990529f7b2381f907b5341a45a4e9eac08d Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Tue, 13 Apr 2010 16:44:06 -0400 -Subject: [PATCH 22/24] Stupid typo fix - ---- - repodiff.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/repodiff.py b/repodiff.py -index ff67fe4..5f3d5b1 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -207,7 +207,7 @@ def main(args): - for (t, author, content) in pkg.changelog: - if t < oldtime: - break -- if ((t == oldtime) and (author == auth) and -+ if ((t == oldtime) and (author == oldauth) and - (content == oldcontent)): - break - tm = datetime.date.fromtimestamp(int(t)) --- -1.6.6.1 - - -From cb745dcbca766c7b1a185b938e8eff9792a1317a Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Tue, 13 Apr 2010 18:05:05 -0400 -Subject: [PATCH 23/24] Fix obsoletes processing in repodiff, also giant speedup. Compared output - both before and after and it was identical: - -1. Original with 3.2.27: 8 minutes 27 seconds - -2. Original with returnNewestByName() speedup: 1 minute 50 seconds. - -3. New repodiff with 3.2.27: 11 seconds. - -...tested with Updates/11 vs. Updates/12 on 2010-04-13. ---- - repodiff.py | 74 ++++++++++++++++++++++++++++++++++++---------------------- - 1 files changed, 46 insertions(+), 28 deletions(-) - -diff --git a/repodiff.py b/repodiff.py -index 5f3d5b1..475f599 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -20,6 +20,7 @@ import datetime - import os - import locale - from yum.i18n import to_unicode -+import time - - from optparse import OptionParser - -@@ -59,42 +60,59 @@ class DiffYum(yum.YumBase): - remove = [] - modified = [] - obsoleted = {} # obsoleted = by -- newsack = yum.packageSack.ListPackageSack() -- for repoid in self.dy_repos['new']: -- newsack.addList(self.pkgSack.returnPackages(repoid=repoid)) -- -- oldsack = yum.packageSack.ListPackageSack() -- for repoid in self.dy_repos['old']: -- oldsack.addList(self.pkgSack.returnPackages(repoid=repoid)) -- -- for pkg in newsack.returnNewestByName(): -- tot = self.pkgSack.searchNevra(name=pkg.name) -- if len(tot) == 1: # it's only in new -- add.append(pkg) -- if len(tot) > 1: -- if oldsack.contains(name=pkg.name): -- newest_old = oldsack.returnNewestByName(name=pkg.name)[0] -- if newest_old.EVR != pkg.EVR: -- modified.append((pkg, newest_old)) -+ -+ # Originally we did this by setting up old and new repos. ... but as -+ # a faster way, we can just go through all the pkgs once getting the -+ # newest pkg with a repoid prefix of "old", dito. "new", and then -+ # compare those directly. -+ def _next_old_new(pkgs): -+ """ Returns latest pair of (oldpkg, newpkg) for each package -+ name. If that name doesn't exist, then it returns None for -+ that package. """ -+ lastname = None -+ npkg = opkg = None -+ for pkg in sorted(pkgs): -+ if lastname is None: -+ lastname = pkg.name -+ if lastname != pkg.name: -+ yield opkg, npkg -+ opkg = npkg = None -+ lastname = pkg.name -+ -+ if pkg.repo.id.startswith('old'): -+ opkg = pkg - else: -- add.append(pkg) -+ assert pkg.repo.id.startswith('new') -+ npkg = pkg -+ if opkg is not None or npkg is not None: -+ yield opkg, npkg - -- for pkg in oldsack.returnNewestByName(): -- if len(newsack.searchNevra(name=pkg.name)) == 0: -- remove.append(pkg) -+ for opkg, npkg in _next_old_new(self.pkgSack.returnPackages()): -+ if opkg is None: -+ add.append(npkg) -+ elif npkg is None: -+ remove.append(opkg) -+ elif not npkg.verEQ(opkg): -+ modified.append((npkg, opkg)) - -+ ao = [] -+ for pkg in add: -+ if not pkg.obsoletes: -+ continue -+ ao.append(pkg) - -+ # Note that this _only_ shows something when you have an additional -+ # package obsoleting a removed package. If the obsoleted package is -+ # still there (somewhat "common") or the obsoleter is an update (dito) -+ # you get get hits here. - for po in remove: -- for newpo in add: -- foundit = 0 -- for obs in newpo.obsoletes: -- if po.inPrcoRange('provides', obs): -- foundit = 1 -- obsoleted[po] = newpo -- break -- if foundit: -+ # Remember: Obsoletes are for package names only. -+ poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release)) -+ for newpo in ao: -+ if po.inPrcoRange('obsoletes', poprovtup): -+ obsoleted[po] = newpo - break -- -+ - ygh = yum.misc.GenericHolder() - ygh.add = add - ygh.remove = remove --- -1.6.6.1 - - -From 99cbe8d6dad9ca8543dedcc5c12bc0f9fdde200e Mon Sep 17 00:00:00 2001 -From: James Antill -Date: Tue, 13 Apr 2010 18:16:03 -0400 -Subject: [PATCH 24/24] Add message about archlist usage, to stop people being confused. - ---- - docs/repodiff.1 | 2 ++ - repodiff.py | 4 ++++ - 2 files changed, 6 insertions(+), 0 deletions(-) - -diff --git a/docs/repodiff.1 b/docs/repodiff.1 -index e1ffc3b..640b023 100644 ---- a/docs/repodiff.1 -+++ b/docs/repodiff.1 -@@ -16,6 +16,8 @@ Add a repo. as an old repo. - Add a repo. as an new repo. - .IP "\fB\-\-archlist, -a\fP" - Add architectures to change the default from just comparing source packages. -+Note that if you want the same as a native -+"x86_64" architecture machine you need: x86_64,athlon,i686,i586,i486,i386,noarch - .IP "\fB\-\-size, -s\fP" - Ouput additional data about the size of the changes. - .SH "EXAMPLES" -diff --git a/repodiff.py b/repodiff.py -index 475f599..0a1c42f 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -239,6 +239,10 @@ def main(args): - - print msg - -+ if (not ygh.add and not ygh.remove and not ygh.modified and -+ not my.pkgSack.searchNevra(arch='src')): -+ print "** No 'src' pkgs in any repo. maybe see docs. on --archlist?" -+ - print 'Summary:' - print 'Added Packages: %s' % len(ygh.add) - print 'Removed Packages: %s' % len(ygh.remove) --- -1.6.6.1 - -commit 9c647a75528566c0abf7bf4d0ed8c8c03e6223a5 -Author: James Antill -Date: Thu Apr 15 00:54:03 2010 -0400 - - Fix typo on obsoletes check, in repodiff - -diff --git a/repodiff.py b/repodiff.py -index 0a1c42f..2810108 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -109,7 +109,7 @@ class DiffYum(yum.YumBase): - # Remember: Obsoletes are for package names only. - poprovtup = (po.name, 'EQ', (po.epoch, po.ver, po.release)) - for newpo in ao: -- if po.inPrcoRange('obsoletes', poprovtup): -+ if newpo.inPrcoRange('obsoletes', poprovtup): - obsoleted[po] = newpo - break - -commit 007bf5d4fd3147b51390d7124e64b3e431c831a9 -Author: James Antill -Date: Fri Apr 16 14:50:27 2010 -0400 - - Use the newest old changelog entry, not the oldest ... *sigh* - -diff --git a/repodiff.py b/repodiff.py -index 2810108..bc2cbf7 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -219,9 +219,9 @@ def main(args): - if len(oldlogs): - # Don't sort as that can screw the order up when time is the - # same. -- oldtime = oldlogs[-1][0] -- oldauth = oldlogs[-1][2] -- oldcontent = oldlogs[-1][2] -+ oldtime = oldlogs[0][0] -+ oldauth = oldlogs[0][2] -+ oldcontent = oldlogs[0][2] - for (t, author, content) in pkg.changelog: - if t < oldtime: - break -commit d4722ce74fe655888fa9d5b02090a56f6e137ce0 -Author: James Antill -Date: Sun Apr 18 02:08:39 2010 -0400 - - Fix the actual bug in repodiff, comparison - -diff --git a/repodiff.py b/repodiff.py -index bc2cbf7..7ef7c50 100755 ---- a/repodiff.py -+++ b/repodiff.py -@@ -220,7 +220,7 @@ def main(args): - # Don't sort as that can screw the order up when time is the - # same. - oldtime = oldlogs[0][0] -- oldauth = oldlogs[0][2] -+ oldauth = oldlogs[0][1] - oldcontent = oldlogs[0][2] - for (t, author, content) in pkg.changelog: - if t < oldtime: diff --git a/yum-utils.spec b/yum-utils.spec index a81b308..056c8e8 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,24 +1,24 @@ Summary: Utilities based around the yum package manager Name: yum-utils -Version: 1.1.26 -Release: 7%{?dist} +Version: 1.1.27 +Release: 1%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz -Patch0: yum-utils-HEAD.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Requires: python >= 2.4 , yum >= 3.2.24 +Requires: python >= 2.4 , yum >= 3.2.27 BuildRequires: python >= 2.4 %description yum-utils is a collection of utilities and examples for the yum package manager. It includes utilities by different authors that make yum easier and -more powerful to use. These tools include: debuginfo-install, package-cleanup, -repoclosure, repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync, -repotrack, verifytree, yum-builddep, yum-complete-transaction, yumdownloader, -yum-debug-dump, yum-debug-restore and yum-groups-manager. +more powerful to use. These tools include: debuginfo-install, +find-repos-of-install, needs-restarting, package-cleanup, repoclosure, +repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync, +repotrack, verifytree, yumdownloader, yum-builddep, yum-complete-transaction, +yum-config-manager, yum-debug-dump, yum-debug-restore and yum-groups-manager. %package -n yum-updateonboot Summary: Run yum update on system boot @@ -163,21 +163,6 @@ to yum and the list-security and info-security commands. The options make it possible to limit list/upgrade of packages to specific security relevant ones. The commands give you the security information. -%package -n yum-plugin-protect-packages -Summary: Yum plugin to prevents Yum from removing itself and other protected packages -Group: System Environment/Base -Provides: yum-protect-packages = %{version}-%{release} -Obsoletes: yum-protect-packages < 1.1.20-0 -Conflicts: yum-protect-packages < 1.1.20-0 -Requires: yum >= 3.0 - -%description -n yum-plugin-protect-packages -this plugin prevents Yum from removing itself and other protected packages. -By default, yum is the only package protected, but by extension this -automatically protects everything on which yum depends (rpm, python, glibc, -and so on).Therefore, the plugin functions well even without -compiling careful lists of all important packages. - %package -n yum-plugin-upgrade-helper Summary: Yum plugin to help upgrades to the next distribution version Group: System Environment/Base @@ -366,8 +351,6 @@ filesystem that is touched by the packages in a yum update or yum remove. %prep %setup -q -%patch0 -p1 - %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -385,7 +368,6 @@ plugins="\ refresh-updatesd \ merge-conf \ security \ - protect-packages \ upgrade-helper \ aliases \ list-data \ @@ -450,6 +432,7 @@ fi %{_bindir}/verifytree %{_bindir}/yumdownloader %{_bindir}/yum-builddep +%{_bindir}/yum-config-manager %{_bindir}/yum-debug-dump %{_bindir}/yum-groups-manager %{_bindir}/yum-debug-restore @@ -532,11 +515,6 @@ fi /usr/lib/yum-plugins/security.* %{_mandir}/man8/yum-security.8.* -%files -n yum-plugin-protect-packages -%defattr(-, root, root) -%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protect-packages.conf -/usr/lib/yum-plugins/protect-packages.* - %files -n yum-plugin-upgrade-helper %defattr(-, root, root) %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/upgrade-helper.conf @@ -623,18 +601,8 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog -* Sat Apr 17 2010 James Antill - 1.1.26-7 -- Fix the changelog entry time comparison in repodiff, again. - -* Fri Apr 16 2010 James Antill - 1.1.26-4 -- Fix the changelog entry time comparison in repodiff. - -* Wed Apr 14 2010 James Antill - 1.1.26-3 -- Get lots of fixes from latest HEAD. Also: -- --alldeps default in repoquery. -- repoquery will now do a full provides version check. -- Add repoclosure --group. -- Big repodiff speedup. +* Sun Jun 6 2010 Tim Lauridsen +- mark as 1.1.27 * Wed Feb 10 2010 Tim Lauridsen - mark as 1.1.26 From 3f43bbc7a0f87ad6eca086ccde4aee86df228abf Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 7 Jun 2010 03:18:12 +0000 Subject: [PATCH 11/86] - Fix repoquery in 1.1.27 --- repoquery-not-installed.patch | 19 +++++++++++++++++++ yum-utils.spec | 8 +++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 repoquery-not-installed.patch diff --git a/repoquery-not-installed.patch b/repoquery-not-installed.patch new file mode 100644 index 0000000..de2f58b --- /dev/null +++ b/repoquery-not-installed.patch @@ -0,0 +1,19 @@ +commit 123d241f35401386f514cee852a0ea2f174be500 +Author: James Antill +Date: Sun Jun 6 23:10:37 2010 -0400 + + Fix stupid typo in repoquery, let non-installed packages work again + +diff --git a/repoquery.py b/repoquery.py +index 2992b2d..1186782 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -556,7 +556,7 @@ class YumBaseQuery(yum.YumBase): + pkg = iq + else: + if rq is None: +- rq = instPkgQuery(pkg, qf) ++ rq = repoPkgQuery(pkg, qf) + rq.pkg = pkg + rq.name = pkg.name + pkg = rq diff --git a/yum-utils.spec b/yum-utils.spec index 056c8e8..b7ebf23 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,10 +1,11 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.27 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz +Patch0: repoquery-not-installed.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -351,6 +352,8 @@ filesystem that is touched by the packages in a yum update or yum remove. %prep %setup -q +%patch0 -p1 + %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -601,6 +604,9 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog +* Sun Jun 6 2010 James Antill +- Fix repoquery in 1.1.27 + * Sun Jun 6 2010 Tim Lauridsen - mark as 1.1.27 From 07f0aa605ef8fd485e530321c103d93b80839280 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 7 Jun 2010 18:38:25 +0000 Subject: [PATCH 12/86] - Fix repoquery in 1.1.27 --- repoquery-not-installed.patch | 19 +++++++++++++++++++ yum-utils.spec | 8 +++++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 repoquery-not-installed.patch diff --git a/repoquery-not-installed.patch b/repoquery-not-installed.patch new file mode 100644 index 0000000..de2f58b --- /dev/null +++ b/repoquery-not-installed.patch @@ -0,0 +1,19 @@ +commit 123d241f35401386f514cee852a0ea2f174be500 +Author: James Antill +Date: Sun Jun 6 23:10:37 2010 -0400 + + Fix stupid typo in repoquery, let non-installed packages work again + +diff --git a/repoquery.py b/repoquery.py +index 2992b2d..1186782 100755 +--- a/repoquery.py ++++ b/repoquery.py +@@ -556,7 +556,7 @@ class YumBaseQuery(yum.YumBase): + pkg = iq + else: + if rq is None: +- rq = instPkgQuery(pkg, qf) ++ rq = repoPkgQuery(pkg, qf) + rq.pkg = pkg + rq.name = pkg.name + pkg = rq diff --git a/yum-utils.spec b/yum-utils.spec index 056c8e8..b7ebf23 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,10 +1,11 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.27 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz +Patch0: repoquery-not-installed.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -351,6 +352,8 @@ filesystem that is touched by the packages in a yum update or yum remove. %prep %setup -q +%patch0 -p1 + %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -601,6 +604,9 @@ fi %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog +* Sun Jun 6 2010 James Antill +- Fix repoquery in 1.1.27 + * Sun Jun 6 2010 Tim Lauridsen - mark as 1.1.27 From e6b62b67de75ea2bc9ad75c8d2e64ff1e79202c6 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Wed, 7 Jul 2010 21:42:55 +0000 Subject: [PATCH 13/86] add copying to each subpkg/plugin as per the licensing guideline change --- yum-utils.spec | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/yum-utils.spec b/yum-utils.spec index b7ebf23..06b687b 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,7 +1,7 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.27 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz @@ -457,30 +457,33 @@ fi %files -n yum-updateonboot %defattr(-, root, root) -%doc updateonboot/README +%doc updateonboot/README COPYING %config(noreplace) %{_sysconfdir}/sysconfig/yum-updateonboot %{_initrddir}/yum-updateonboot %files -n yum-plugin-changelog %defattr(-, root, root) %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/changelog.conf +%doc COPYING /usr/lib/yum-plugins/changelog.* %{_mandir}/man1/yum-changelog.1.* %{_mandir}/man5/yum-changelog.conf.5.* %files -n yum-plugin-fastestmirror %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fastestmirror.conf /usr/lib/yum-plugins/fastestmirror*.* %files -n yum-plugin-protectbase %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protectbase.conf /usr/lib/yum-plugins/protectbase.* %files -n yum-plugin-versionlock %defattr(-, root, root) -%doc plugins/versionlock/README +%doc plugins/versionlock/README COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/versionlock.conf %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/versionlock.list /usr/lib/yum-plugins/versionlock.* @@ -489,42 +492,50 @@ fi %files -n yum-plugin-tsflags %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tsflags.conf /usr/lib/yum-plugins/tsflags.* %files -n yum-plugin-downloadonly %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/downloadonly.conf /usr/lib/yum-plugins/downloadonly.* %files -n yum-plugin-priorities %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/priorities.conf /usr/lib/yum-plugins/priorities.* %files -n yum-plugin-refresh-updatesd %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/refresh-updatesd.conf /usr/lib/yum-plugins/refresh-updatesd.* %files -n yum-plugin-merge-conf %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/merge-conf.conf /usr/lib/yum-plugins/merge-conf.* %files -n yum-plugin-security %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/security.conf /usr/lib/yum-plugins/security.* %{_mandir}/man8/yum-security.8.* %files -n yum-plugin-upgrade-helper %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/upgrade-helper.conf /usr/lib/yum-plugins/upgrade-helper.* %files -n yum-plugin-aliases %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/aliases.conf %config(noreplace) %{_sysconfdir}/yum/aliases.conf /usr/lib/yum-plugins/aliases.* @@ -532,43 +543,51 @@ fi %files -n yum-plugin-list-data %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/list-data.conf /usr/lib/yum-plugins/list-data.* %{_mandir}/man1/yum-list-data.1.* %files -n yum-plugin-filter-data %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/filter-data.conf /usr/lib/yum-plugins/filter-data.* %{_mandir}/man1/yum-filter-data.1.* %files -n yum-plugin-tmprepo %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tmprepo.conf /usr/lib/yum-plugins/tmprepo.* %files -n yum-plugin-verify %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/verify.conf /usr/lib/yum-plugins/verify.* %{_mandir}/man1/yum-verify.1.* %files -n yum-plugin-keys %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/keys.conf /usr/lib/yum-plugins/keys.* %files -n yum-NetworkManager-dispatcher %defattr(-, root, root) +%doc COPYING /etc/NetworkManager/dispatcher.d/* %files -n yum-plugin-remove-with-leaves %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/remove-with-leaves.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/remove-with-leaves.conf %files -n yum-plugin-post-transaction-actions %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/post-transaction-actions.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/post-transaction-actions.conf %doc plugins/post-transaction-actions/sample.action @@ -577,33 +596,41 @@ fi %files -n yum-plugin-rpm-warm-cache %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/rpm-warm-cache.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/rpm-warm-cache.conf %files -n yum-plugin-auto-update-debug-info %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/auto-update-debuginfo.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/auto-update-debuginfo.conf %files -n yum-plugin-show-leaves %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/show-leaves.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/show-leaves.conf %files -n yum-plugin-local %defattr(-, root, root) +%doc COPYING %ghost %{_sysconfdir}/yum.repos.d/_local.repo %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/local.conf /usr/lib/yum-plugins/local.* %files -n yum-plugin-fs-snapshot %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fs-snapshot.conf /usr/lib/yum-plugins/fs-snapshot.* %{_mandir}/man1/yum-fs-snapshot.1.* %{_mandir}/man5/yum-fs-snapshot.conf.5.* %changelog +* Wed Jul 7 2010 Seth Vidal +- add license files to each subpkg that doesn't require yum-utils directly + * Sun Jun 6 2010 James Antill - Fix repoquery in 1.1.27 From 8f429ec7546ef08d9bac6a9d45d90f907c9a011e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 18:32:12 +0000 Subject: [PATCH 14/86] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 1fb2032..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: yum-utils -# $Id: Makefile,v 1.1 2005/06/11 19:27:59 skvidal Exp $ -NAME := yum-utils -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index baa94ef..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-13 From cb6f1deb916950c2845c85129c5c2dbfcdeb7d6b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 18:32:24 +0000 Subject: [PATCH 15/86] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 1fb2032..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: yum-utils -# $Id: Makefile,v 1.1 2005/06/11 19:27:59 skvidal Exp $ -NAME := yum-utils -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 704111794ae9ff8e55a65555c90d515a7868e58b Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Tue, 3 Aug 2010 18:02:53 +0200 Subject: [PATCH 16/86] release 1.1.28-1 --- .gitignore | 1 + sources | 2 +- yum-utils.spec | 58 +++++++++++++++++++------------------------------- 3 files changed, 24 insertions(+), 37 deletions(-) diff --git a/.gitignore b/.gitignore index 0a39cad..f134a0e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ yum-utils-1.1.27.tar.gz +yum-utils-1.1.28.tar.gz diff --git a/sources b/sources index 4695520..7e2a9c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e5bf013b43cd898ef5483798e64317f9 yum-utils-1.1.27.tar.gz +beac7f26fe6f2f5f5faf81dd4adb3c69 yum-utils-1.1.28.tar.gz diff --git a/yum-utils.spec b/yum-utils.spec index 06b687b..bf58c7d 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,11 +1,10 @@ Summary: Utilities based around the yum package manager Name: yum-utils -Version: 1.1.27 -Release: 3%{?dist} +Version: 1.1.28 +Release: 1%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz -Patch0: repoquery-not-installed.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -349,11 +348,19 @@ Requires: yum >= 3.2.22 When this plugin is installed it will automatically snapshot any filesystem that is touched by the packages in a yum update or yum remove. +%package -n yum-plugin-ps +Summary: Yum plugin to look at processes, with respect to packages +Group: System Environment/Base +Requires: yum >= 3.2.27 + +%description -n yum-plugin-ps +When this plugin is installed it adds the yum command "ps", which allows you +to see which running processes are accociated with which packages (and if they +need rebooting, or have updates, etc.) + %prep %setup -q -%patch0 -p1 - %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -385,6 +392,7 @@ plugins="\ show-leaves \ local \ fs-snapshot \ + ps \ " mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/ @@ -457,33 +465,30 @@ fi %files -n yum-updateonboot %defattr(-, root, root) -%doc updateonboot/README COPYING +%doc updateonboot/README %config(noreplace) %{_sysconfdir}/sysconfig/yum-updateonboot %{_initrddir}/yum-updateonboot %files -n yum-plugin-changelog %defattr(-, root, root) %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/changelog.conf -%doc COPYING /usr/lib/yum-plugins/changelog.* %{_mandir}/man1/yum-changelog.1.* %{_mandir}/man5/yum-changelog.conf.5.* %files -n yum-plugin-fastestmirror %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fastestmirror.conf /usr/lib/yum-plugins/fastestmirror*.* %files -n yum-plugin-protectbase %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protectbase.conf /usr/lib/yum-plugins/protectbase.* %files -n yum-plugin-versionlock %defattr(-, root, root) -%doc plugins/versionlock/README COPYING +%doc plugins/versionlock/README %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/versionlock.conf %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/versionlock.list /usr/lib/yum-plugins/versionlock.* @@ -492,50 +497,42 @@ fi %files -n yum-plugin-tsflags %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tsflags.conf /usr/lib/yum-plugins/tsflags.* %files -n yum-plugin-downloadonly %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/downloadonly.conf /usr/lib/yum-plugins/downloadonly.* %files -n yum-plugin-priorities %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/priorities.conf /usr/lib/yum-plugins/priorities.* %files -n yum-plugin-refresh-updatesd %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/refresh-updatesd.conf /usr/lib/yum-plugins/refresh-updatesd.* %files -n yum-plugin-merge-conf %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/merge-conf.conf /usr/lib/yum-plugins/merge-conf.* %files -n yum-plugin-security %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/security.conf /usr/lib/yum-plugins/security.* %{_mandir}/man8/yum-security.8.* %files -n yum-plugin-upgrade-helper %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/upgrade-helper.conf /usr/lib/yum-plugins/upgrade-helper.* %files -n yum-plugin-aliases %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/aliases.conf %config(noreplace) %{_sysconfdir}/yum/aliases.conf /usr/lib/yum-plugins/aliases.* @@ -543,51 +540,43 @@ fi %files -n yum-plugin-list-data %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/list-data.conf /usr/lib/yum-plugins/list-data.* %{_mandir}/man1/yum-list-data.1.* %files -n yum-plugin-filter-data %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/filter-data.conf /usr/lib/yum-plugins/filter-data.* %{_mandir}/man1/yum-filter-data.1.* %files -n yum-plugin-tmprepo %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tmprepo.conf /usr/lib/yum-plugins/tmprepo.* %files -n yum-plugin-verify %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/verify.conf /usr/lib/yum-plugins/verify.* %{_mandir}/man1/yum-verify.1.* %files -n yum-plugin-keys %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/keys.conf /usr/lib/yum-plugins/keys.* %files -n yum-NetworkManager-dispatcher %defattr(-, root, root) -%doc COPYING /etc/NetworkManager/dispatcher.d/* %files -n yum-plugin-remove-with-leaves %defattr(-, root, root) -%doc COPYING /usr/lib/yum-plugins/remove-with-leaves.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/remove-with-leaves.conf %files -n yum-plugin-post-transaction-actions %defattr(-, root, root) -%doc COPYING /usr/lib/yum-plugins/post-transaction-actions.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/post-transaction-actions.conf %doc plugins/post-transaction-actions/sample.action @@ -596,43 +585,40 @@ fi %files -n yum-plugin-rpm-warm-cache %defattr(-, root, root) -%doc COPYING /usr/lib/yum-plugins/rpm-warm-cache.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/rpm-warm-cache.conf %files -n yum-plugin-auto-update-debug-info %defattr(-, root, root) -%doc COPYING /usr/lib/yum-plugins/auto-update-debuginfo.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/auto-update-debuginfo.conf %files -n yum-plugin-show-leaves %defattr(-, root, root) -%doc COPYING /usr/lib/yum-plugins/show-leaves.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/show-leaves.conf %files -n yum-plugin-local %defattr(-, root, root) -%doc COPYING %ghost %{_sysconfdir}/yum.repos.d/_local.repo %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/local.conf /usr/lib/yum-plugins/local.* %files -n yum-plugin-fs-snapshot %defattr(-, root, root) -%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fs-snapshot.conf /usr/lib/yum-plugins/fs-snapshot.* %{_mandir}/man1/yum-fs-snapshot.1.* %{_mandir}/man5/yum-fs-snapshot.conf.5.* -%changelog -* Wed Jul 7 2010 Seth Vidal -- add license files to each subpkg that doesn't require yum-utils directly +%files -n yum-plugin-ps +%defattr(-, root, root) +%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/ps.conf +/usr/lib/yum-plugins/ps.* -* Sun Jun 6 2010 James Antill -- Fix repoquery in 1.1.27 +%changelog +* Tue Aug 3 2010 Tim Lauridsen +- mark as 1.1.28 * Sun Jun 6 2010 Tim Lauridsen - mark as 1.1.27 From 83b7eb56e7463fda910c58de5c7f52eab03e5d16 Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Tue, 3 Aug 2010 18:17:16 +0200 Subject: [PATCH 17/86] release 1.1.28-1 --- sources | 2 +- yum-utils.spec | 27 ++++++++++++++++++++------- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/sources b/sources index 4695520..7e2a9c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e5bf013b43cd898ef5483798e64317f9 yum-utils-1.1.27.tar.gz +beac7f26fe6f2f5f5faf81dd4adb3c69 yum-utils-1.1.28.tar.gz diff --git a/yum-utils.spec b/yum-utils.spec index b7ebf23..bf58c7d 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,11 +1,10 @@ Summary: Utilities based around the yum package manager Name: yum-utils -Version: 1.1.27 -Release: 2%{?dist} +Version: 1.1.28 +Release: 1%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz -Patch0: repoquery-not-installed.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -349,11 +348,19 @@ Requires: yum >= 3.2.22 When this plugin is installed it will automatically snapshot any filesystem that is touched by the packages in a yum update or yum remove. +%package -n yum-plugin-ps +Summary: Yum plugin to look at processes, with respect to packages +Group: System Environment/Base +Requires: yum >= 3.2.27 + +%description -n yum-plugin-ps +When this plugin is installed it adds the yum command "ps", which allows you +to see which running processes are accociated with which packages (and if they +need rebooting, or have updates, etc.) + %prep %setup -q -%patch0 -p1 - %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -385,6 +392,7 @@ plugins="\ show-leaves \ local \ fs-snapshot \ + ps \ " mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/ @@ -603,9 +611,14 @@ fi %{_mandir}/man1/yum-fs-snapshot.1.* %{_mandir}/man5/yum-fs-snapshot.conf.5.* +%files -n yum-plugin-ps +%defattr(-, root, root) +%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/ps.conf +/usr/lib/yum-plugins/ps.* + %changelog -* Sun Jun 6 2010 James Antill -- Fix repoquery in 1.1.27 +* Tue Aug 3 2010 Tim Lauridsen +- mark as 1.1.28 * Sun Jun 6 2010 Tim Lauridsen - mark as 1.1.27 From 22b646cca443bc52da12d4717d592a20c0c6d3d5 Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Sun, 7 Nov 2010 10:23:34 +0100 Subject: [PATCH 18/86] Release 1.1.29-1 --- .gitignore | 1 + sources | 2 +- yum-utils.spec | 41 +++++++++++++++++++++++++++++++++++++---- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index f134a0e..df6c964 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ yum-utils-1.1.27.tar.gz yum-utils-1.1.28.tar.gz +/yum-utils-1.1.29.tar.gz diff --git a/sources b/sources index 7e2a9c1..489b965 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -beac7f26fe6f2f5f5faf81dd4adb3c69 yum-utils-1.1.28.tar.gz +9848c4e5f161c43ffb438126403c9093 yum-utils-1.1.29.tar.gz diff --git a/yum-utils.spec b/yum-utils.spec index bf58c7d..4ed0f09 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,6 +1,6 @@ Summary: Utilities based around the yum package manager Name: yum-utils -Version: 1.1.28 +Version: 1.1.29 Release: 1%{?dist} License: GPLv2+ Group: Development/Tools @@ -8,9 +8,10 @@ Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Requires: python >= 2.4 , yum >= 3.2.27 +Requires: python >= 2.4 , yum >= 3.2.29 BuildRequires: python >= 2.4 + %description yum-utils is a collection of utilities and examples for the yum package manager. It includes utilities by different authors that make yum easier and @@ -447,6 +448,7 @@ fi %{_bindir}/yum-debug-dump %{_bindir}/yum-groups-manager %{_bindir}/yum-debug-restore +%{_bindir}/show-installed %{_sbindir}/yum-complete-transaction %{_sbindir}/yumdb %{_mandir}/man1/yum-utils.1.* @@ -465,30 +467,33 @@ fi %files -n yum-updateonboot %defattr(-, root, root) -%doc updateonboot/README +%doc updateonboot/README COPYING %config(noreplace) %{_sysconfdir}/sysconfig/yum-updateonboot %{_initrddir}/yum-updateonboot %files -n yum-plugin-changelog %defattr(-, root, root) %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/changelog.conf +%doc COPYING /usr/lib/yum-plugins/changelog.* %{_mandir}/man1/yum-changelog.1.* %{_mandir}/man5/yum-changelog.conf.5.* %files -n yum-plugin-fastestmirror %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fastestmirror.conf /usr/lib/yum-plugins/fastestmirror*.* %files -n yum-plugin-protectbase %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/protectbase.conf /usr/lib/yum-plugins/protectbase.* %files -n yum-plugin-versionlock %defattr(-, root, root) -%doc plugins/versionlock/README +%doc plugins/versionlock/README COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/versionlock.conf %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/versionlock.list /usr/lib/yum-plugins/versionlock.* @@ -497,42 +502,50 @@ fi %files -n yum-plugin-tsflags %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tsflags.conf /usr/lib/yum-plugins/tsflags.* %files -n yum-plugin-downloadonly %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/downloadonly.conf /usr/lib/yum-plugins/downloadonly.* %files -n yum-plugin-priorities %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/priorities.conf /usr/lib/yum-plugins/priorities.* %files -n yum-plugin-refresh-updatesd %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/refresh-updatesd.conf /usr/lib/yum-plugins/refresh-updatesd.* %files -n yum-plugin-merge-conf %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/merge-conf.conf /usr/lib/yum-plugins/merge-conf.* %files -n yum-plugin-security %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/security.conf /usr/lib/yum-plugins/security.* %{_mandir}/man8/yum-security.8.* %files -n yum-plugin-upgrade-helper %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/upgrade-helper.conf /usr/lib/yum-plugins/upgrade-helper.* %files -n yum-plugin-aliases %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/aliases.conf %config(noreplace) %{_sysconfdir}/yum/aliases.conf /usr/lib/yum-plugins/aliases.* @@ -540,43 +553,51 @@ fi %files -n yum-plugin-list-data %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/list-data.conf /usr/lib/yum-plugins/list-data.* %{_mandir}/man1/yum-list-data.1.* %files -n yum-plugin-filter-data %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/filter-data.conf /usr/lib/yum-plugins/filter-data.* %{_mandir}/man1/yum-filter-data.1.* %files -n yum-plugin-tmprepo %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/tmprepo.conf /usr/lib/yum-plugins/tmprepo.* %files -n yum-plugin-verify %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/verify.conf /usr/lib/yum-plugins/verify.* %{_mandir}/man1/yum-verify.1.* %files -n yum-plugin-keys %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/keys.conf /usr/lib/yum-plugins/keys.* %files -n yum-NetworkManager-dispatcher %defattr(-, root, root) +%doc COPYING /etc/NetworkManager/dispatcher.d/* %files -n yum-plugin-remove-with-leaves %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/remove-with-leaves.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/remove-with-leaves.conf %files -n yum-plugin-post-transaction-actions %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/post-transaction-actions.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/post-transaction-actions.conf %doc plugins/post-transaction-actions/sample.action @@ -585,27 +606,32 @@ fi %files -n yum-plugin-rpm-warm-cache %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/rpm-warm-cache.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/rpm-warm-cache.conf %files -n yum-plugin-auto-update-debug-info %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/auto-update-debuginfo.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/auto-update-debuginfo.conf %files -n yum-plugin-show-leaves %defattr(-, root, root) +%doc COPYING /usr/lib/yum-plugins/show-leaves.* %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/show-leaves.conf %files -n yum-plugin-local %defattr(-, root, root) +%doc COPYING %ghost %{_sysconfdir}/yum.repos.d/_local.repo %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/local.conf /usr/lib/yum-plugins/local.* %files -n yum-plugin-fs-snapshot %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/fs-snapshot.conf /usr/lib/yum-plugins/fs-snapshot.* %{_mandir}/man1/yum-fs-snapshot.1.* @@ -613,10 +639,17 @@ fi %files -n yum-plugin-ps %defattr(-, root, root) +%doc COPYING %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/ps.conf /usr/lib/yum-plugins/ps.* %changelog +* Sun Nov 7 2010 Tim Lauridsen +- mark as 1.1.29 + +* Tue Aug 3 2010 Seth Vidal +- add COPYING docs to all the plugins to make fedora(and Tim) happy. :) + * Tue Aug 3 2010 Tim Lauridsen - mark as 1.1.28 From dd7a90cb887113f53c9b67c8a84af322c5a6de70 Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Sun, 7 Nov 2010 10:38:23 +0100 Subject: [PATCH 19/86] Release 1.1.29-2 - fix yum requirement to match yum in current rawhide --- yum-utils.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/yum-utils.spec b/yum-utils.spec index 4ed0f09..457025f 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,14 +1,14 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.29 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Requires: python >= 2.4 , yum >= 3.2.29 +Requires: python >= 2.4 , yum >= 3.2.28-12 BuildRequires: python >= 2.4 @@ -644,6 +644,9 @@ fi /usr/lib/yum-plugins/ps.* %changelog +* Sun Nov 7 2010 Tim Lauridsen +- Change requirement yum >= 3.2.29 to yum >= 3.2.28-12 (current rawhide is close to yum HEAD) + * Sun Nov 7 2010 Tim Lauridsen - mark as 1.1.29 From 2a663b1964214725e489ef4e9e60afbb5bd6589f Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Fri, 14 Jan 2011 18:40:06 +0100 Subject: [PATCH 20/86] Release 1.1.30-1 --- .gitignore | 1 + sources | 2 +- yum-utils.spec | 31 ++++++++++++++++++++++++------- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index df6c964..cc7df06 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ yum-utils-1.1.27.tar.gz yum-utils-1.1.28.tar.gz /yum-utils-1.1.29.tar.gz +/yum-utils-1.1.30.tar.gz diff --git a/sources b/sources index 489b965..d32dce8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9848c4e5f161c43ffb438126403c9093 yum-utils-1.1.29.tar.gz +1b085c0fe375c3d306dbb44f6d7fa28a yum-utils-1.1.30.tar.gz diff --git a/yum-utils.spec b/yum-utils.spec index 457025f..258f525 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -1,15 +1,21 @@ +%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} + Summary: Utilities based around the yum package manager Name: yum-utils -Version: 1.1.29 -Release: 2%{?dist} +Version: 1.1.30 +Release: 1%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -Requires: python >= 2.4 , yum >= 3.2.28-12 -BuildRequires: python >= 2.4 +Requires: yum >= 3.2.29 +Requires: python-kitchen +BuildRequires: python-devel >= 2.4 +BuildRequires: gettext +BuildRequires: intltool +Provides: yum-utils-translations = %{version}-%{release} %description @@ -184,6 +190,7 @@ Obsoletes: yum-aliases < 1.1.20-0 Conflicts: yum-aliases < 1.1.20-0 # Requires args_hook Requires: yum >= 3.2.23 +Requires: yum-utils-translations = %{version}-%{release} %description -n yum-plugin-aliases This plugin adds the command alias, and parses the aliases config. file to @@ -367,6 +374,8 @@ rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install make -C updateonboot DESTDIR=$RPM_BUILD_ROOT install +%find_lang %name + # Plugins to install plugins="\ changelog \ @@ -411,6 +420,7 @@ install -m 644 versionlock/versionlock.list $RPM_BUILD_ROOT/%{_sysconfdir}/yum/p mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum.repos.d touch $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d/_local.repo + %clean rm -rf $RPM_BUILD_ROOT @@ -423,7 +433,7 @@ if [ $1 = 0 ]; then /sbin/chkconfig --del yum-updateonboot >/dev/null 2>&1 || :; fi -%files +%files -f %{name}.lang %defattr(-, root, root) %doc README yum-util-cli-template %doc COPYING @@ -451,6 +461,7 @@ fi %{_bindir}/show-installed %{_sbindir}/yum-complete-transaction %{_sbindir}/yumdb +%{python_sitelib}/yumutils/ %{_mandir}/man1/yum-utils.1.* %{_mandir}/man1/debuginfo-install.1.* %{_mandir}/man1/package-cleanup.1.* @@ -644,8 +655,14 @@ fi /usr/lib/yum-plugins/ps.* %changelog -* Sun Nov 7 2010 Tim Lauridsen -- Change requirement yum >= 3.2.29 to yum >= 3.2.28-12 (current rawhide is close to yum HEAD) +* Thu Jan 13 2011 Tim Lauridsen +- mark as 1.1.30 + +* Mon Jan 3 2011 Tim Lauridsen +- Added yumutils python module + +* Thu Dec 30 2010 Tim Lauridsen +- Added Translation support and need Requires, BuildRequires * Sun Nov 7 2010 Tim Lauridsen - mark as 1.1.29 From 4322fb85787a09cc20a632a05efc85c593ef9181 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 02:25:50 -0600 Subject: [PATCH 21/86] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- yum-utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yum-utils.spec b/yum-utils.spec index 258f525..8140259 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -3,7 +3,7 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.30 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz @@ -655,6 +655,9 @@ fi /usr/lib/yum-plugins/ps.* %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 1.1.30-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Thu Jan 13 2011 Tim Lauridsen - mark as 1.1.30 From 1509339c521101653b5a32054952b01d9d26176c Mon Sep 17 00:00:00 2001 From: James Antill Date: Thu, 28 Jul 2011 12:26:35 -0400 Subject: [PATCH 22/86] Fix for BuildTrans no return value checking, needed for mock. Resolves: bug#716267 --- BZ-716267-BuildTrans-ret-check.patch | 77 ++++++++++++++++++++++++++++ yum-utils.spec | 9 +++- 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 BZ-716267-BuildTrans-ret-check.patch diff --git a/BZ-716267-BuildTrans-ret-check.patch b/BZ-716267-BuildTrans-ret-check.patch new file mode 100644 index 0000000..76ce631 --- /dev/null +++ b/BZ-716267-BuildTrans-ret-check.patch @@ -0,0 +1,77 @@ +commit 32ec6213b9f698eb48c573b16e8bae40eb7dca8c +Author: Ville Skyttä +Date: Fri Jun 24 18:44:32 2011 +0300 + + Check doUtilBuildTransaction return value, exit early on failure. BZ 716267 + +diff --git a/debuginfo-install.py b/debuginfo-install.py +index 0891f63..177c6c3 100755 +--- a/debuginfo-install.py ++++ b/debuginfo-install.py +@@ -100,7 +100,9 @@ class DebugInfoInstall(YumUtilBase): + + self.debugInfo_main() + if hasattr(self, 'doUtilBuildTransaction'): +- self.doUtilBuildTransaction() ++ errc = self.doUtilBuildTransaction() ++ if errc: ++ sys.exit(errc) + else: + try: + self.buildTransaction() +diff --git a/package-cleanup.py b/package-cleanup.py +index a4eb7d9..4794369 100755 +--- a/package-cleanup.py ++++ b/package-cleanup.py +@@ -343,7 +343,9 @@ class PackageCleanup(YumUtilBase): + self._remove_old_kernels(opts.kernelcount, opts.keepdevel) + self.run_with_package_names.add('yum-utils') + if hasattr(self, 'doUtilBuildTransaction'): +- self.doUtilBuildTransaction() ++ errc = self.doUtilBuildTransaction() ++ if errc: ++ sys.exit(errc) + else: + try: + self.buildTransaction() +@@ -392,7 +394,9 @@ class PackageCleanup(YumUtilBase): + self.run_with_package_names.add('yum-utils') + + if hasattr(self, 'doUtilBuildTransaction'): +- self.doUtilBuildTransaction() ++ errc = self.doUtilBuildTransaction() ++ if errc: ++ sys.exit(errc) + else: + try: + self.buildTransaction() +diff --git a/yum-builddep.py b/yum-builddep.py +index d13c90e..d7a37c3 100755 +--- a/yum-builddep.py ++++ b/yum-builddep.py +@@ -98,7 +98,9 @@ class YumBuildDep(YumUtilBase): + sys.exit(1) + + if hasattr(self, 'doUtilBuildTransaction'): +- self.doUtilBuildTransaction() ++ errc = self.doUtilBuildTransaction() ++ if errc: ++ sys.exit(errc) + else: + try: + self.buildTransaction() +diff --git a/yum-complete-transaction.py b/yum-complete-transaction.py +index fde1f35..c5074ab 100755 +--- a/yum-complete-transaction.py ++++ b/yum-complete-transaction.py +@@ -208,7 +208,9 @@ class YumCompleteTransaction(YumUtilBase): + + current_count = len(self.tsInfo) + if hasattr(self, 'doUtilBuildTransaction'): +- self.doUtilBuildTransaction(unfinished_transactions_check=False) ++ errc = self.doUtilBuildTransaction(unfinished_transactions_check=False) ++ if errc: ++ sys.exit(errc) + else: + try: + self.buildTransaction(unfinished_transactions_check=False) diff --git a/yum-utils.spec b/yum-utils.spec index 8140259..5c72848 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -3,11 +3,12 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.30 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz URL: http://yum.baseurl.org/download/yum-utils/ +Patch0: BZ-716267-BuildTrans-ret-check.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: yum >= 3.2.29 @@ -369,6 +370,8 @@ need rebooting, or have updates, etc.) %prep %setup -q +%patch0 -p1 + %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -655,6 +658,10 @@ fi /usr/lib/yum-plugins/ps.* %changelog +* Thu Jul 28 2011 James Antill +- Fix for BuildTrans no return value checking, needed for mock. +- Resolves: bug#716267 + * Tue Feb 08 2011 Fedora Release Engineering - 1.1.30-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From daf4e7eed3a535f34cf575d170e55c4544df1694 Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Wed, 10 Aug 2011 18:20:47 +0200 Subject: [PATCH 23/86] Release 1.1.31-1 --- .gitignore | 1 + sources | 2 +- yum-utils.spec | 37 ++++++++++++++++++++++++++++++------- 3 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index cc7df06..137fcee 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ yum-utils-1.1.27.tar.gz yum-utils-1.1.28.tar.gz /yum-utils-1.1.29.tar.gz /yum-utils-1.1.30.tar.gz +/yum-utils-1.1.31.tar.gz diff --git a/sources b/sources index d32dce8..09a2534 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1b085c0fe375c3d306dbb44f6d7fa28a yum-utils-1.1.30.tar.gz +b2859b89321b98f2581243536e1b4993 yum-utils-1.1.31.tar.gz diff --git a/yum-utils.spec b/yum-utils.spec index 5c72848..4524bbe 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -2,13 +2,12 @@ Summary: Utilities based around the yum package manager Name: yum-utils -Version: 1.1.30 -Release: 3%{?dist} +Version: 1.1.31 +Release: 1%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz URL: http://yum.baseurl.org/download/yum-utils/ -Patch0: BZ-716267-BuildTrans-ret-check.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch Requires: yum >= 3.2.29 @@ -25,8 +24,9 @@ manager. It includes utilities by different authors that make yum easier and more powerful to use. These tools include: debuginfo-install, find-repos-of-install, needs-restarting, package-cleanup, repoclosure, repodiff, repo-graph, repomanage, repoquery, repo-rss, reposync, -repotrack, verifytree, yumdownloader, yum-builddep, yum-complete-transaction, -yum-config-manager, yum-debug-dump, yum-debug-restore and yum-groups-manager. +repotrack, show-installed, show-changed-rco, verifytree, yumdownloader, +yum-builddep, yum-complete-transaction, yum-config-manager, yum-debug-dump, +yum-debug-restore and yum-groups-manager. %package -n yum-updateonboot Summary: Run yum update on system boot @@ -367,11 +367,20 @@ When this plugin is installed it adds the yum command "ps", which allows you to see which running processes are accociated with which packages (and if they need rebooting, or have updates, etc.) +%package -n yum-plugin-puppetverify +Summary: Yum plugin to add puppet checksums to verify data +Group: System Environment/Base +Provides: yum-puppetverify = %{version}-%{release} +Requires: yum >= 3.2.12 +Requires: PyYAML >= 3.09 +Requires: puppet + +%description -n yum-plugin-puppetverify +Supplies checksums for files in packages from puppet's state file. + %prep %setup -q -%patch0 -p1 - %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install @@ -406,6 +415,7 @@ plugins="\ local \ fs-snapshot \ ps \ + puppetverify \ " mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/yum/pluginconf.d/ $RPM_BUILD_ROOT/usr/lib/yum-plugins/ @@ -462,6 +472,7 @@ fi %{_bindir}/yum-groups-manager %{_bindir}/yum-debug-restore %{_bindir}/show-installed +%{_bindir}/show-changed-rco %{_sbindir}/yum-complete-transaction %{_sbindir}/yumdb %{python_sitelib}/yumutils/ @@ -472,6 +483,8 @@ fi %{_mandir}/man1/repoquery.1.* %{_mandir}/man1/repodiff.1.* %{_mandir}/man1/reposync.1.* +%{_mandir}/man1/show-changed-rco.1.* +%{_mandir}/man1/show-installed.1.* %{_mandir}/man1/yum-builddep.1.* %{_mandir}/man1/yum-debug-dump.1.* %{_mandir}/man8/yum-complete-transaction.8.* @@ -657,7 +670,17 @@ fi %config(noreplace) %{_sysconfdir}/yum/pluginconf.d/ps.conf /usr/lib/yum-plugins/ps.* +%files -n yum-plugin-puppetverify +%defattr(-, root, root) +%doc COPYING +%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/puppetverify.conf +/usr/lib/yum-plugins/puppetverify.* + %changelog +* Thu Aug 10 2011 Tim Lauridsen +- mark as 1.1.31 +- remove patches + * Thu Jul 28 2011 James Antill - Fix for BuildTrans no return value checking, needed for mock. - Resolves: bug#716267 From 57637768edef6b99329e3b4b81ce5bd708c8b0e7 Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Wed, 10 Aug 2011 18:21:52 +0200 Subject: [PATCH 24/86] remove patches --- BZ-716267-BuildTrans-ret-check.patch | 77 ---------------------------- repoquery-not-installed.patch | 19 ------- 2 files changed, 96 deletions(-) delete mode 100644 BZ-716267-BuildTrans-ret-check.patch delete mode 100644 repoquery-not-installed.patch diff --git a/BZ-716267-BuildTrans-ret-check.patch b/BZ-716267-BuildTrans-ret-check.patch deleted file mode 100644 index 76ce631..0000000 --- a/BZ-716267-BuildTrans-ret-check.patch +++ /dev/null @@ -1,77 +0,0 @@ -commit 32ec6213b9f698eb48c573b16e8bae40eb7dca8c -Author: Ville Skyttä -Date: Fri Jun 24 18:44:32 2011 +0300 - - Check doUtilBuildTransaction return value, exit early on failure. BZ 716267 - -diff --git a/debuginfo-install.py b/debuginfo-install.py -index 0891f63..177c6c3 100755 ---- a/debuginfo-install.py -+++ b/debuginfo-install.py -@@ -100,7 +100,9 @@ class DebugInfoInstall(YumUtilBase): - - self.debugInfo_main() - if hasattr(self, 'doUtilBuildTransaction'): -- self.doUtilBuildTransaction() -+ errc = self.doUtilBuildTransaction() -+ if errc: -+ sys.exit(errc) - else: - try: - self.buildTransaction() -diff --git a/package-cleanup.py b/package-cleanup.py -index a4eb7d9..4794369 100755 ---- a/package-cleanup.py -+++ b/package-cleanup.py -@@ -343,7 +343,9 @@ class PackageCleanup(YumUtilBase): - self._remove_old_kernels(opts.kernelcount, opts.keepdevel) - self.run_with_package_names.add('yum-utils') - if hasattr(self, 'doUtilBuildTransaction'): -- self.doUtilBuildTransaction() -+ errc = self.doUtilBuildTransaction() -+ if errc: -+ sys.exit(errc) - else: - try: - self.buildTransaction() -@@ -392,7 +394,9 @@ class PackageCleanup(YumUtilBase): - self.run_with_package_names.add('yum-utils') - - if hasattr(self, 'doUtilBuildTransaction'): -- self.doUtilBuildTransaction() -+ errc = self.doUtilBuildTransaction() -+ if errc: -+ sys.exit(errc) - else: - try: - self.buildTransaction() -diff --git a/yum-builddep.py b/yum-builddep.py -index d13c90e..d7a37c3 100755 ---- a/yum-builddep.py -+++ b/yum-builddep.py -@@ -98,7 +98,9 @@ class YumBuildDep(YumUtilBase): - sys.exit(1) - - if hasattr(self, 'doUtilBuildTransaction'): -- self.doUtilBuildTransaction() -+ errc = self.doUtilBuildTransaction() -+ if errc: -+ sys.exit(errc) - else: - try: - self.buildTransaction() -diff --git a/yum-complete-transaction.py b/yum-complete-transaction.py -index fde1f35..c5074ab 100755 ---- a/yum-complete-transaction.py -+++ b/yum-complete-transaction.py -@@ -208,7 +208,9 @@ class YumCompleteTransaction(YumUtilBase): - - current_count = len(self.tsInfo) - if hasattr(self, 'doUtilBuildTransaction'): -- self.doUtilBuildTransaction(unfinished_transactions_check=False) -+ errc = self.doUtilBuildTransaction(unfinished_transactions_check=False) -+ if errc: -+ sys.exit(errc) - else: - try: - self.buildTransaction(unfinished_transactions_check=False) diff --git a/repoquery-not-installed.patch b/repoquery-not-installed.patch deleted file mode 100644 index de2f58b..0000000 --- a/repoquery-not-installed.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 123d241f35401386f514cee852a0ea2f174be500 -Author: James Antill -Date: Sun Jun 6 23:10:37 2010 -0400 - - Fix stupid typo in repoquery, let non-installed packages work again - -diff --git a/repoquery.py b/repoquery.py -index 2992b2d..1186782 100755 ---- a/repoquery.py -+++ b/repoquery.py -@@ -556,7 +556,7 @@ class YumBaseQuery(yum.YumBase): - pkg = iq - else: - if rq is None: -- rq = instPkgQuery(pkg, qf) -+ rq = repoPkgQuery(pkg, qf) - rq.pkg = pkg - rq.name = pkg.name - pkg = rq From b5064156dc6bbbfcc72cc9d7900a9b63edc141cc Mon Sep 17 00:00:00 2001 From: Tim Lauridsen Date: Sat, 13 Aug 2011 15:54:09 +0200 Subject: [PATCH 25/86] Release 1.1.31.2 --- auto-update-debuginfo.patch | 24 ++++++++++++++++++++++++ yum-utils.spec | 7 ++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 auto-update-debuginfo.patch diff --git a/auto-update-debuginfo.patch b/auto-update-debuginfo.patch new file mode 100644 index 0000000..5c3e5aa --- /dev/null +++ b/auto-update-debuginfo.patch @@ -0,0 +1,24 @@ +From: Zdeněk Pavlas +Date: Thu, 11 Aug 2011 12:34:42 +0000 (+0200) +Subject: Fix check for repos in opts, in auto-update-debuginfo plugin. BZ 729964. +X-Git-Url: http://yum.baseurl.org/gitweb?p=yum-utils.git;a=commitdiff_plain;h=efb3c7b3fb96523bb5997c163bf4e33ab897f1b8 + + Fix check for repos in opts, in auto-update-debuginfo plugin. BZ 729964. + + Also hasattr(None, 'repos') == False, so we don't need +to check for None explicitly. +--- + +diff --git a/plugins/auto-update-debuginfo/auto-update-debuginfo.py b/plugins/auto-update-debuginfo/auto-update-debuginfo.py +index 39993ad..9ff927c 100644 +--- a/plugins/auto-update-debuginfo/auto-update-debuginfo.py ++++ b/plugins/auto-update-debuginfo/auto-update-debuginfo.py +@@ -38,7 +38,7 @@ def _check_man_disable(mdrs, di): + def enable_debuginfo_repos(yb, conduit): + mdrs = set() + opts, args = conduit.getCmdLine() +- if opts is not None and hasattr(opts.repos) : ++ if hasattr(opts, 'repos'): + for opt, repoexp in opts.repos: + if opt == '--disablerepo': + mdrs.add(repoexp) diff --git a/yum-utils.spec b/yum-utils.spec index 4524bbe..b71aeae 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -3,10 +3,11 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.31 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz +Patch0: auto-update-debuginfo.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -380,6 +381,7 @@ Supplies checksums for files in packages from puppet's state file. %prep %setup -q +%patch0 -p1 %install rm -rf $RPM_BUILD_ROOT @@ -677,6 +679,9 @@ fi /usr/lib/yum-plugins/puppetverify.* %changelog +* Thu Aug 13 2011 Tim Lauridsen +- fix traceback in auto-update-debuginfo plugin (rhbz #729982) + * Thu Aug 10 2011 Tim Lauridsen - mark as 1.1.31 - remove patches From 60dd4a37c986e8c94250bafb767ba7d8e6ad1b9c Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 03:32:21 -0600 Subject: [PATCH 26/86] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- yum-utils.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yum-utils.spec b/yum-utils.spec index b71aeae..c45244d 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -3,7 +3,7 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.31 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz @@ -679,6 +679,9 @@ fi /usr/lib/yum-plugins/puppetverify.* %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 1.1.31-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Thu Aug 13 2011 Tim Lauridsen - fix traceback in auto-update-debuginfo plugin (rhbz #729982) From 259a493eaf60c7954e8e58f8d110d9dfcde93bf0 Mon Sep 17 00:00:00 2001 From: James Antill Date: Thu, 26 Jan 2012 13:49:29 -0500 Subject: [PATCH 27/86] Update to latest HEAD. --- yum-utils.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/yum-utils.spec b/yum-utils.spec index c45244d..aa6ffa0 100644 --- a/yum-utils.spec +++ b/yum-utils.spec @@ -3,11 +3,12 @@ Summary: Utilities based around the yum package manager Name: yum-utils Version: 1.1.31 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Development/Tools Source: http://yum.baseurl.org/download/yum-utils/%{name}-%{version}.tar.gz Patch0: auto-update-debuginfo.patch +Patch1: yum-utils-HEAD.patch URL: http://yum.baseurl.org/download/yum-utils/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -381,7 +382,8 @@ Supplies checksums for files in packages from puppet's state file. %prep %setup -q -%patch0 -p1 +# patch0 -p1 +%patch1 -p1 %install rm -rf $RPM_BUILD_ROOT @@ -679,6 +681,9 @@ fi /usr/lib/yum-plugins/puppetverify.* %changelog +* Thu Jan 26 2012 James Antill - 1.1.31-4 +- Update to latest HEAD. + * Sat Jan 14 2012 Fedora Release Engineering - 1.1.31-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 5c0b80180ccf911f2b7f60065fab445804987ad3 Mon Sep 17 00:00:00 2001 From: James Antill Date: Thu, 26 Jan 2012 15:21:17 -0500 Subject: [PATCH 28/86] Update to latest HEAD. --- yum-utils-HEAD.patch | 2280 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 2280 insertions(+) create mode 100644 yum-utils-HEAD.patch diff --git a/yum-utils-HEAD.patch b/yum-utils-HEAD.patch new file mode 100644 index 0000000..a1d0e9e --- /dev/null +++ b/yum-utils-HEAD.patch @@ -0,0 +1,2280 @@ +diff --git a/COPYING b/COPYING +index e77696a..d159169 100644 +--- a/COPYING ++++ b/COPYING +@@ -1,12 +1,12 @@ +- GNU GENERAL PUBLIC LICENSE +- Version 2, June 1991 ++ GNU GENERAL PUBLIC LICENSE ++ Version 2, June 1991 + +- Copyright (C) 1989, 1991 Free Software Foundation, Inc. +- 675 Mass Ave, Cambridge, MA 02139, USA ++ Copyright (C) 1989, 1991 Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +- Preamble ++ Preamble + + The licenses for most software are designed to take away your + freedom to share and change it. By contrast, the GNU General Public +@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This + General Public License applies to most of the Free Software + Foundation's software and to any other program whose authors commit to + using it. (Some other Free Software Foundation software is covered by +-the GNU Library General Public License instead.) You can apply it to ++the GNU Lesser General Public License instead.) You can apply it to + your programs, too. + + When we speak of free software, we are referring to freedom, not +@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. +- +- GNU GENERAL PUBLIC LICENSE ++ ++ GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) +- ++ + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Program, + and can be reasonably considered independent and separate works in +@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent + access to copy the source code from the same place counts as + distribution of the source code, even though third parties are not + compelled to copy the source along with the object code. +- ++ + 4. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt + otherwise to copy, modify, sublicense or distribute the Program is +@@ -225,7 +225,7 @@ impose that choice. + + This section is intended to make thoroughly clear what is believed to + be a consequence of the rest of this License. +- ++ + 8. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Program under this License +@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals + of preserving the free status of all derivatives of our free software and + of promoting the sharing and reuse of software generally. + +- NO WARRANTY ++ NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY + FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER + PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGES. + +- END OF TERMS AND CONDITIONS +- +- How to Apply These Terms to Your New Programs ++ END OF TERMS AND CONDITIONS ++ ++ How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it +@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least + the "copyright" line and a pointer to where the full notice is found. + + +- Copyright (C) 19yy ++ Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -303,16 +303,16 @@ the "copyright" line and a pointer to where the full notice is found. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + +- You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software +- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Also add information on how to contact you by electronic and paper mail. + + If the program is interactive, make it output a short notice like this + when it starts in an interactive mode: + +- Gnomovision version 69, Copyright (C) 19yy name of author ++ Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. +@@ -335,5 +335,5 @@ necessary. Here is a sample; alter the names: + This General Public License does not permit incorporating your program into + proprietary programs. If your program is a subroutine library, you may + consider it more useful to permit linking proprietary applications with the +-library. If this is what you want to do, use the GNU Library General ++library. If this is what you want to do, use the GNU Lesser General + Public License instead of this License. +diff --git a/debuginfo-install.py b/debuginfo-install.py +index 177c6c3..27d19ac 100755 +--- a/debuginfo-install.py ++++ b/debuginfo-install.py +@@ -7,11 +7,11 @@ + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU Library General Public License for more details. ++# GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++# along with this program; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + # Copyright 2007 Seth Vidal + + import sys +diff --git a/docs/Makefile b/docs/Makefile +index d01c1e4..13ea4e7 100644 +--- a/docs/Makefile ++++ b/docs/Makefile +@@ -1,7 +1,7 @@ + DOCS = repoquery package-cleanup repo-rss yumdownloader yum-builddep yum-changelog reposync \ + yum-list-data yum-filter-data yum-verify yum-utils yum-aliases yum-debug-dump yum-versionlock \ + yum-groups-manager debuginfo-install repodiff yum-fs-snapshot \ +- show-installed show-changed-rco ++ show-installed show-changed-rco yum-debug-restore + DOCS5 = yum-changelog.conf yum-versionlock.conf yum-fs-snapshot.conf + DOCS8 = yum-security yum-complete-transaction yumdb + +diff --git a/docs/package-cleanup.1 b/docs/package-cleanup.1 +index 867cf4d..15f94ce 100644 +--- a/docs/package-cleanup.1 ++++ b/docs/package-cleanup.1 +@@ -14,7 +14,7 @@ Use alternative config file (default is /etc/yum.conf). + .IP "\fB\-h, \-\-help\fP" + Help; display a help message and then quit\&. + .IP "\fB\-q, \-\-quiet\fP" +-Print out nothing unecessary. ++Print out nothing unnecessary. + .IP "\fB\-v, \-\-version\fP" + Report program version and exit. + .IP "\fB\-y\fP" +diff --git a/docs/repodiff.1 b/docs/repodiff.1 +index c421c5d..ef2a373 100644 +--- a/docs/repodiff.1 ++++ b/docs/repodiff.1 +@@ -11,9 +11,11 @@ repositories. \fBNote\fP that by default only source packages are compared. + .PP + .SH "GENERAL OPTIONS" + .IP "\fB\-\-old, -o\fP" +-Add a repo. as an old repo. ++Add a repo. as an old repo. Note that if you prefix the url with "mirror:" then ++the following url is treated as a mirror and not a baseurl. + .IP "\fB\-\-new, -n\fP" +-Add a repo. as an new repo. ++Add a repo. as an new repo. Note that if you prefix the url with "mirror:" then ++the following url is treated as a mirror and not a baseurl. + .IP "\fB\-\-archlist, -a\fP" + Add architectures to change the default from just comparing source packages. + Note that if you want the same as a native +@@ -21,10 +23,14 @@ Note that if you want the same as a native + from earlier versions where you needed to specify + "x86_64,athlon,i686,i586,i486,i386,noarch" and you still got "src"). + .IP "\fB\-\-size, -s\fP" +-Ouput additional data about the size of the changes. ++Output additional data about the size of the changes. + .IP "\fB\-\-compare-arch\fP" + Normally packages are just compared based on their name, this flag makes the + comparison also use the arch. So foo.i386 and foo.x86_64 are different. ++.IP "\fB\-\-simple\fP" ++Output a simple one line message for modified packages. ++.IP "\fB\-\-downgrade\fP" ++Split the data for modified packages between upgraded and downgraded packages. + .SH "EXAMPLES" + .IP "Compare source pkgs in two local repos:" + \fBrepodiff --old=/tmp/repo-old --new=/tmp/repo-new\fP +@@ -32,6 +38,8 @@ comparison also use the arch. So foo.i386 and foo.x86_64 are different. + \fBrepodiff -a x86_64 --old=http://example.com/repo1-old --old=/tmp/repo-old --new=http://example.com/repo1-new --new=/tmp/repo-new\fP + .IP "Compare x86_64 compat. binary pkgs, but also compare arch:" + \fBrepodiff -a x86_64 --compare-arch --old=http://example.com/repo1-old --old=/tmp/repo-old --new=http://example.com/repo1-new --new=/tmp/repo-new\fP ++.IP "Compare two releases of Fedora (15 => 16):" ++\fBrepodiff --old='mirror:https://mirrors.fedoraproject.org/metalink?repo=fedora-source-15&arch=i386' --new='mirror:https://mirrors.fedoraproject.org/metalink?repo=fedora-source-16&arch=i386' --size --simple --downgrade\fP + .PP + + .SH "SEE ALSO" +diff --git a/docs/repoquery.1 b/docs/repoquery.1 +index f5a8c5d..fe842f5 100644 +--- a/docs/repoquery.1 ++++ b/docs/repoquery.1 +@@ -130,7 +130,8 @@ package names). This is the default. + When used with --whatrequires, search for dependencies only exactly as given. + This is effectively the opposite of --alldeps. + .IP "\fB\-\-recursive\fP" +-When used with --whatrequires, query packages recursively. ++When used with --whatrequires, and --requires --resolve, query packages ++recursively. + .IP "\fB\-\-archlist=ARCH1[,ARCH2...]\fP" + Limit the query to packages of given architecture(s). Valid values are all + architectures known to rpm/yum such as 'i386' and 'src' for +@@ -166,7 +167,7 @@ Query groups instead of packages. + + .SH "EXAMPLES" + .IP "List all packages whose name contains 'perl':" +-\fBrepoquery '*perl*'\fP ++\fBrepoquery \(aq*perl*\(aq\fP + .IP "List all packages depending on openssl:" + \fBrepoquery --whatrequires openssl\fP + .IP "List all package names and the repository they come from, nicely formatted:" +diff --git a/docs/reposync.1 b/docs/reposync.1 +index c1bc818..edc05cc 100644 +--- a/docs/reposync.1 ++++ b/docs/reposync.1 +@@ -14,7 +14,7 @@ Display a help message, and then quit. + Config file to use (defaults to /etc/yum.conf). + .IP "\fB\-a ARCH, \-\-arch=ARCH\fP" + Act as if running the specified arch (default: current arch, note: does +-not override $releasever). ++not override $releasever. x86_64 is a superset for i*86.). + .IP "\fB\-\-source\fP" + Also download .src.rpm files. + .IP "\fB\-r REPOID, \-\-repoid=REPOID\fP" +@@ -28,6 +28,8 @@ Path to download packages to: defaults to current directory. + Remove packages that fail GPG signature checking after downloading. + .IP "\fB\-u, \-\-urls\fP" + Just list urls of what would be downloaded, don't download. ++.IP "\fB\-l, \-\-plugins\fP" ++Enable yum plugin support. + .IP "\fB\-n, \-\-newest-only\fP" + Download only newest packages per-repo. + .IP "\fB\-q, \-\-quiet\fP" +@@ -41,6 +43,8 @@ Output as little information as possible. + \fB reposync --repoid=updates --repoid=extras\fP + .IP "Sync all packages from the 'updates' repo to the \fBrepos\fP directory:" + \fB reposync -p repos --repoid=updates\fP ++.IP "Sync all packages from the 'updates' repo to the \fBrepos\fP directory excluding x86_64 arch. Edit \fI/etc/yum.conf\fR adding option \fBexclude=*.x86_64\fR. Then: ++\fBreposync -p repos --repoid=updates\fP + .SH "FILES" + \fBreposync\fP uses the yum libraries for retrieving information and + packages. If no configuration file is specified, the default yum +diff --git a/docs/show-changed-rco.1 b/docs/show-changed-rco.1 +index 3e3b62c..1b0ea65 100644 +--- a/docs/show-changed-rco.1 ++++ b/docs/show-changed-rco.1 +@@ -11,7 +11,7 @@ packages Requires, Conflicts and Obsoletes data from the installed (or old) to + a specified rpm file. + .SH OPTIONS + .TP +-.IP \-h, \-\-help ++.IP "\fB\-h, \-\-help\fP" + show this help message and exit + .IP "\fB\-C, \-\-cache\fP" + Tells repoquery to run entirely from YUM cache - does not download any metadata +diff --git a/docs/show-installed.1 b/docs/show-installed.1 +index 7072b63..18c4af8 100644 +--- a/docs/show-installed.1 ++++ b/docs/show-installed.1 +@@ -16,10 +16,10 @@ show this help message and exit + yum, kickstart or human; yum gives the result as a yum command line; kickstart the content of a %packages section; "human" readable is default. + .TP + .B \-i INPUT, \-\-input=INPUT +-File to read the package list from instead of using the rpmdb. \- for stdin. The file must contain package names only separated by white space (including newlines). rpm \-qa \-\-qf='%{name}\\n' produces proper output. ++File to read the package list from instead of using the rpmdb. \- for stdin. The file must contain package names only separated by white space (including newlines). rpm \-qa \-\-qf=\(aq%{name}\\n\(aq produces proper output. + .TP + .B \-o OUTPUT, \-\-output=OUTPUT +-File to write the result to. Stdout is used if option is omited. ++File to write the result to. Stdout is used if option is omitted. + .TP + .B \-q, \-\-quiet + Do not show warnings. +diff --git a/docs/yum-aliases.1 b/docs/yum-aliases.1 +index c0f148d..8b943d4 100644 +--- a/docs/yum-aliases.1 ++++ b/docs/yum-aliases.1 +@@ -28,7 +28,7 @@ last form creates a new alias. + .PP + When you type an aliased command, like "yum --disableexcludes UPT lsu" using + the default aliases, the yum-aliases plugin first takes the first "command", by +-skiping over any options, and then looks up the result (in this case "UPT" is converted to "--enablerepo=updates-tesintg"). If there is a match, then it will ++skipping over any options, and then looks up the result (in this case "UPT" is converted to "--enablerepo=updates-testing"). If there is a match, then it will + replace the aliased "command" in the argument list and try again (again + skipping over any options). By convention, in the default aliases list, alias + "commands" that are in all CAPS only add options so you can join together a +diff --git a/docs/yum-debug-dump.1 b/docs/yum-debug-dump.1 +index 0e65a07..71e5f3f 100644 +--- a/docs/yum-debug-dump.1 ++++ b/docs/yum-debug-dump.1 +@@ -10,11 +10,15 @@ yum-debug-dump + lot of information useful to developers trying to debug a problem. + .PP + By default it will output a file to the current working directory named +-yum_debug_dump.txt.gz. This file contains no private information but does ++yum_debug_dump--