From 7b107a5251cace8021f25c6ab7670d8ad8750c88 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 26 Sep 2011 10:05:40 +0100 Subject: [PATCH 01/12] Backport upstream fix for RHBZ#731717. --- ...lving_failed-as-soon-as-buildTransaction-i.patch | 13 +++++++++++++ yum.spec | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch diff --git a/0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch b/0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch new file mode 100644 index 0000000..29540b8 --- /dev/null +++ b/0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch @@ -0,0 +1,13 @@ +--- yum-3.4.3.old/yum/__init__.py 2011-09-26 10:06:24.876279470 +0100 ++++ yum-3.4.3/yum/__init__.py 2011-09-26 10:07:35.819800317 +0100 +@@ -966,6 +966,10 @@ + def buildTransaction(self, unfinished_transactions_check=True): + """go through the packages in the transaction set, find them in the + packageSack or rpmdb, and pack up the ts accordingly""" ++ # FIXME: This is horrible, see below and yummain. Maybe create a real ++ # rescode object? :( ++ self._depsolving_failed = False ++ + if (unfinished_transactions_check and + misc.find_unfinished_transactions(yumlibpath=self.conf.persistdir)): + msg = _('There are unfinished transactions remaining. You might ' \ diff --git a/yum.spec b/yum.spec index b7a3302..604e7f6 100644 --- a/yum.spec +++ b/yum.spec @@ -7,7 +7,7 @@ Summary: RPM package installer/updater/manager Name: yum Version: 3.4.3 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz @@ -21,6 +21,7 @@ Patch5: geode-arch.patch Patch6: yum-HEAD.patch Patch7: yum-ppc64-preferred.patch Patch20: yum-manpage-files.patch +Patch21: 0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch URL: http://yum.baseurl.org/ BuildArch: noarch @@ -126,6 +127,7 @@ Install this package if you want auto yum updates nightly via cron. %patch6 -p1 %patch7 -p1 %patch20 -p1 +%patch21 -p1 %build make @@ -248,6 +250,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/sysconfig/yum-cron %changelog +* Mon Sep 26 2011 Richard W.M. Jones - 3.4.3-5 +- Backport upstream fix for RHBZ#731717. + * Fri Jul 15 2011 James Antill - 3.4.3-4 - update to latest HEAD - Weird old bugs fixed for new createrepo code. From 87013e9c428be193944d878effd79356825586a2 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 30 Nov 2011 19:54:01 -0600 Subject: [PATCH 02/12] add arm hardware floating point support --- yum-arm-hfp-support.patch | 54 +++++++++++++++++++++++++++++++++++++++ yum.spec | 7 ++++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 yum-arm-hfp-support.patch diff --git a/yum-arm-hfp-support.patch b/yum-arm-hfp-support.patch new file mode 100644 index 0000000..992ebc7 --- /dev/null +++ b/yum-arm-hfp-support.patch @@ -0,0 +1,54 @@ +diff -uNr yum-3.4.3-orig/rpmUtils/arch.py yum-3.4.3/rpmUtils/arch.py +--- yum-3.4.3-orig/rpmUtils/arch.py 2011-11-30 19:24:32.000000000 -0600 ++++ yum-3.4.3/rpmUtils/arch.py 2011-11-30 19:24:58.000000000 -0600 +@@ -2,6 +2,7 @@ + # + + import os ++import rpm + + _ppc64_native_is_best = True + +@@ -65,6 +66,10 @@ + "armv5tejl": "armv5tel", + "armv5tel": "noarch", + ++ #arm hardware floating point ++ "armv7hnl": "armv7hl", ++ "armv7hl": "noarch", ++ + # super-h + "sh4a": "sh4", + "sh4": "noarch", +@@ -235,6 +240,13 @@ + + return arch + ++def getCanonARMArch(arch): ++ # the %{_target_arch} macro in rpm will let us know the abi we are using ++ target = rpm.expandMacro('%{_target_cpu}') ++ if target.startswith('armv7h'): ++ return target ++ return arch ++ + def getCanonPPCArch(arch): + # FIXME: should I do better handling for mac, etc? + if arch != "ppc64": +@@ -312,6 +324,8 @@ + if (len(arch) == 4 and arch[0] == "i" and arch[2:4] == "86"): + return getCanonX86Arch(arch) + ++ if arch.startswith("arm"): ++ return getCanonARMArch(arch) + if arch.startswith("ppc"): + return getCanonPPCArch(arch) + if arch.startswith("sparc"): +@@ -363,6 +377,8 @@ + return "sparc" + elif myarch.startswith("ppc64") and not _ppc64_native_is_best: + return "ppc" ++ elif myarch.startswith("armv7h"): ++ return "armhfp" + elif myarch.startswith("arm"): + return "arm" + diff --git a/yum.spec b/yum.spec index 604e7f6..62d03fa 100644 --- a/yum.spec +++ b/yum.spec @@ -7,7 +7,7 @@ Summary: RPM package installer/updater/manager Name: yum Version: 3.4.3 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz @@ -20,6 +20,7 @@ Patch4: no-more-exactarchlist.patch Patch5: geode-arch.patch Patch6: yum-HEAD.patch Patch7: yum-ppc64-preferred.patch +Patch8: yum-arm-hfp-support.patch Patch20: yum-manpage-files.patch Patch21: 0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch @@ -126,6 +127,7 @@ Install this package if you want auto yum updates nightly via cron. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %patch20 -p1 %patch21 -p1 @@ -250,6 +252,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/sysconfig/yum-cron %changelog +* Wed Nov 30 2011 Dennis Gilmore - 3.4.3-6 +- add arm hardware floating point support + * Mon Sep 26 2011 Richard W.M. Jones - 3.4.3-5 - Backport upstream fix for RHBZ#731717. From fbc178fa4ee22842e4916569ee514c6d2fcb73a6 Mon Sep 17 00:00:00 2001 From: "Jan ONDREJ (SAL)" Date: Fri, 9 Dec 2011 09:08:59 +0100 Subject: [PATCH 03/12] change loglevel from INFO to INFO_2, bz#750859 --- yum.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yum.spec b/yum.spec index 62d03fa..cf6e969 100644 --- a/yum.spec +++ b/yum.spec @@ -7,7 +7,7 @@ Summary: RPM package installer/updater/manager Name: yum Version: 3.4.3 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz @@ -21,6 +21,7 @@ Patch5: geode-arch.patch Patch6: yum-HEAD.patch Patch7: yum-ppc64-preferred.patch Patch8: yum-arm-hfp-support.patch +Patch9: yum-silence.patch Patch20: yum-manpage-files.patch Patch21: 0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch @@ -128,6 +129,7 @@ Install this package if you want auto yum updates nightly via cron. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %patch20 -p1 %patch21 -p1 @@ -252,6 +254,9 @@ exit 0 %config(noreplace) %{_sysconfdir}/sysconfig/yum-cron %changelog +* Fri Dec 09 2011 Ján ONDREJ (SAL) - 3.4.3-7 +- change loglevel from INFO to INFO_2, bz#750859 + * Wed Nov 30 2011 Dennis Gilmore - 3.4.3-6 - add arm hardware floating point support From 26b9deb1cca9a7eee7d86839a8d2e9c701d8938b Mon Sep 17 00:00:00 2001 From: "Jan ONDREJ (SAL)" Date: Fri, 9 Dec 2011 20:00:04 +0100 Subject: [PATCH 04/12] added patch for yum silence --- .gitignore | 1 + sources | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b4d901e..2981154 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ yum-3.2.28.tar.gz /yum-3.4.1.tar.gz /yum-3.4.2.tar.gz /yum-3.4.3.tar.gz +/yum-silence.patch diff --git a/sources b/sources index c5d16f2..2adb575 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 7c8ea8beba5b4e7fe0c215e4ebaa26ed yum-3.4.3.tar.gz +0b9555f6ed3e67e247ed092dbceaf1c7 yum-silence.patch From 49a2bb05603788924ae66c4f97bae085f5c4c154 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Fri, 9 Dec 2011 15:26:22 -0500 Subject: [PATCH 05/12] remove the patch from git ignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2981154..b4d901e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,3 @@ yum-3.2.28.tar.gz /yum-3.4.1.tar.gz /yum-3.4.2.tar.gz /yum-3.4.3.tar.gz -/yum-silence.patch From 70e91575618c637a33595a1285a460521f6a60d1 Mon Sep 17 00:00:00 2001 From: "Jan ONDREJ (SAL)" Date: Sun, 11 Dec 2011 23:47:11 +0100 Subject: [PATCH 06/12] Added missing patch, which was only uplaoded to server. http://lists.fedoraproject.org/pipermail/scm-commits/2011-December/693055.html --- yum-silence.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 yum-silence.patch diff --git a/yum-silence.patch b/yum-silence.patch new file mode 100644 index 0000000..b4ba054 --- /dev/null +++ b/yum-silence.patch @@ -0,0 +1,15 @@ +@@ -, +, @@ + 750859. + yumcommands.py | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) +--- a/yumcommands.py ++++ a/yumcommands.py +@@ -215,7 +215,7 @@ class YumCommand: + :param *args: additional arguments associated with the message + """ + if not self.done_command_once: +- base.verbose_logger.info(msg, *args) ++ base.verbose_logger.log(logginglevels.INFO_2, msg, *args) + self.done_command_once = True + + def getNames(self): From 696380a721b469c33082417a9f53a7a24d145b36 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 12 Mar 2012 15:40:51 -0400 Subject: [PATCH 07/12] Sync with F17/rawhide. - Fixes translations. - Fix weird multiple obsoletion bug. BZ 800016 - Lots of other smaller fixes/changes. --- yum.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/yum.spec b/yum.spec index 02fe805..3238f20 100644 --- a/yum.spec +++ b/yum.spec @@ -316,6 +316,12 @@ exit 0 %endif %changelog +* Mon Mar 12 2012 James Antill - 3.4.3-22 +- Sync with F17/rawhide. +- Fixes translations. +- Fix weird multiple obsoletion bug. BZ 800016 +- Lots of other smaller fixes/changes. + * Fri Mar 9 2012 James Antill - 3.4.3-22 - update to latest HEAD. - Fail on bad reinstall/downgrade arguments. bug 800285. From 5cf68f0905b1ac1d780a2a1f76cd26d3de131bbb Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 12 Mar 2012 15:51:43 -0400 Subject: [PATCH 08/12] Sync with F17/rawhide. - Fixes translations. - Fix weird multiple obsoletion bug. BZ 800016 - Lots of other smaller fixes/changes. --- yum.spec | 90 ++------------------------------------------------------ 1 file changed, 2 insertions(+), 88 deletions(-) diff --git a/yum.spec b/yum.spec index 3238f20..7b64995 100644 --- a/yum.spec +++ b/yum.spec @@ -29,7 +29,6 @@ Patch4: no-more-exactarchlist.patch Patch5: geode-arch.patch Patch6: yum-HEAD.patch Patch7: yum-ppc64-preferred.patch -Patch8: yum-arm-hfp-support.patch Patch9: yum-silence.patch Patch20: yum-manpage-files.patch Patch21: 0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch @@ -139,7 +138,6 @@ Install this package if you want auto yum updates nightly via cron. %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 %patch9 -p1 %patch20 -p1 %patch1 -p1 @@ -322,92 +320,8 @@ exit 0 - Fix weird multiple obsoletion bug. BZ 800016 - Lots of other smaller fixes/changes. -* Fri Mar 9 2012 James Antill - 3.4.3-22 -- update to latest HEAD. -- Fail on bad reinstall/downgrade arguments. bug 800285. -- Fix weird multiple obsoletion bug. BZ 800016 -- Check for a compat. arch. as well, when hand testing for upgradability. -- Allow changing the exit code on non-fatal errors. - -* Thu Mar 1 2012 James Antill - 3.4.3-21 -- update to latest HEAD. -- Translation update. - -* Wed Feb 29 2012 James Antill - 3.4.3-20 -- update to latest HEAD. -- Lazy setup pkgSack, for localinstall/etc. -- add support for 64 bit arm hardware. -- Hack for "info install blah" to never look at repos. -- Fixup resolvedep command for mock users. - -* Mon Feb 20 2012 James Antill - 3.4.3-19 -- update to latest HEAD. -- Add a yum group convert command, so people can use groups as objects easily. -- Document the new group stuff. -- Generic provide markers for installonlypkgs (for kernel/vms). -- Minor updates/fixes merge some older branches. - -* Fri Jan 20 2012 James Antill - 3.4.3-18 -- update to latest HEAD -- Added group_command, but didn't change to groups as objects by default. -- Minor updates. - -* Sat Jan 14 2012 Fedora Release Engineering - 3.4.3-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Tue Dec 13 2011 James Antill - 3.4.3-16 -- update to latest HEAD -- Have users always use their own dirs. -- Minor updates. - -* Fri Dec 2 2011 James Antill - 3.4.3-15 -- update to latest HEAD -- Init "found" variable for distro-sync full. BZ 752407. -- Fix _conv_pkg_state when calling with history as checksum. BZ 757736. -- When a repo. fails in repolist, manually populate the ones after it.A -- Fix a corner case in exception2msg(). BZ 749239. -- Transifex sync. -- Hand fix the plural forms gettext stuff. - -* Wed Nov 30 2011 Dennis Gilmore - 3.4.3-13 -- add patch from upstream for arm hardware floating point support - -* Mon Oct 17 2011 James Antill - 3.4.3-12 -- update to latest HEAD -- Basically just an update for transifex sync. - -* Fri Oct 14 2011 James Antill - 3.4.3-11 -- update to latest HEAD -- Some edge case depsolver bug fixes. -- Output the GPG fingerprint when showing the GPG key. -- Update bugtracker URL back to redhat. -- Allow reinstall and remove arguments to history redo command. -- Let resolvedep look for installed packages. - -* Tue Sep 21 2011 James Antill - 3.4.3-10 -- update to latest HEAD -- Fix for history sync, and saving on install. -- Lots of minor bug fixes. -- Speedups for upgrade_requirements_on_install=true. -- Fix generated data using bad caches. -- Changes for yum-cron. - -* Tue Aug 23 2011 James Antill - 3.4.3-9 -- update to latest HEAD -- Update translations. -- Minor UI tweaks for transaction output. -- Minor tweak for update_reqs_on_install. - -* Mon Aug 22 2011 James Antill - 3.4.3-8 -- update to latest HEAD -- Fix upgrade_requirements_on_install breaking upgrade typos. - -* Fri Aug 19 2011 James Antill - 3.4.3-7 -- update to latest HEAD -- Fix syncing of yum DB data in history. -- Add upgrade_requirements_on_install config. option. -- Don't look for releasever if it's set directly (anaconda). -- Expose ip_resolve urlgrabber option. +* Fri Dec 09 2011 Ján ONDREJ (SAL) - 3.4.3-7 +- change loglevel from INFO to INFO_2, bz#750859 * Fri Aug 5 2011 James Antill - 3.4.3-6 - update to latest HEAD From b23fd54232f7a302f60b9ed77b4dd19867fcfaa8 Mon Sep 17 00:00:00 2001 From: James Antill Date: Fri, 16 Mar 2012 14:57:45 -0400 Subject: [PATCH 09/12] update to latest HEAD. - Also fix "yum check" for strong requires. bug 795907. - Fix for "Only update available" on downgrade. bug 803346. --- BZ-803346-no-only-update.patch | 113 +++++++++++ yum-HEAD.patch | 353 ++++++++++++++++++++------------- yum.spec | 11 +- 3 files changed, 340 insertions(+), 137 deletions(-) create mode 100644 BZ-803346-no-only-update.patch diff --git a/BZ-803346-no-only-update.patch b/BZ-803346-no-only-update.patch new file mode 100644 index 0000000..c6fc2ad --- /dev/null +++ b/BZ-803346-no-only-update.patch @@ -0,0 +1,113 @@ +From yum-devel-bounces@lists.baseurl.org Thu Mar 15 04:54:11 2012 +Return-Path: yum-devel-bounces@lists.baseurl.org +Received: from zmta01.collab.prod.int.phx2.redhat.com (LHLO + zmta01.collab.prod.int.phx2.redhat.com) (10.5.5.31) by + zmail17.collab.prod.int.phx2.redhat.com with LMTP; Thu, 15 Mar 2012 + 04:54:11 -0400 (EDT) +Received: from localhost (localhost.localdomain [127.0.0.1]) by + zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id 2504011402A; + Thu, 15 Mar 2012 04:54:11 -0400 (EDT) +X-Quarantine-ID: +Received: from zmta01.collab.prod.int.phx2.redhat.com ([127.0.0.1]) by + localhost (zmta01.collab.prod.int.phx2.redhat.com [127.0.0.1]) + (amavisd-new, port 10024) with ESMTP id I+79tTMZeO4w; Thu, 15 Mar 2012 + 04:54:11 -0400 (EDT) +Received: from int-mx02.intmail.prod.int.phx2.redhat.com + (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by + zmta01.collab.prod.int.phx2.redhat.com (Postfix) with ESMTP id E8D74114011; + Thu, 15 Mar 2012 04:54:10 -0400 (EDT) +Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com + [10.5.110.16]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) + with ESMTP id q2F8sAi8004183; Thu, 15 Mar 2012 04:54:10 -0400 +Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by + mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2F8s8Nd023630; Thu, 15 Mar + 2012 04:54:08 -0400 +Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org + (Postfix) with ESMTP id AB1CCA0378; Thu, 15 Mar 2012 08:54:08 +0000 (UTC) +X-Virus-Scanned: amavisd-new at osuosl.org +Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org + [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JtdO5JgtXfRu; Thu, 15 + Mar 2012 08:54:07 +0000 (UTC) +Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by + hemlock.osuosl.org (Postfix) with ESMTP id C4A10A036E; Thu, 15 Mar 2012 + 08:54:07 +0000 (UTC) +X-Original-To: yum-devel@lists.baseurl.org +Delivered-To: yum-devel@osuosl.org +Received: from whitealder.osuosl.org (whitealder.osuosl.org + [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3DBAC8F75B for + ; Thu, 15 Mar 2012 08:54:06 +0000 (UTC) +Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org + (Postfix) with ESMTP id 0C5028FEF1 for ; Thu, + 15 Mar 2012 08:54:06 +0000 (UTC) +X-Virus-Scanned: amavisd-new at osuosl.org +Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost + (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id + FvpW+oEPmqRK for ; Thu, 15 Mar 2012 08:54:04 + +0000 (UTC) +X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 +Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by + whitealder.osuosl.org (Postfix) with ESMTP id 7D0108FBF1 for + ; Thu, 15 Mar 2012 08:54:04 +0000 (UTC) +Received: from int-mx01.intmail.prod.int.phx2.redhat.com + (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com + (8.14.4/8.14.4) with ESMTP id q2F8s3XU023619 (version=TLSv1/SSLv3 + cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for + ; Thu, 15 Mar 2012 04:54:03 -0400 +Received: from koblih.brq.redhat.com (koblih.brq.redhat.com [10.34.24.78]) + by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id + q2F8s2qX018211 for ; Thu, 15 Mar 2012 04:54:03 + -0400 +From: =?UTF-8?q?Zden=C4=9Bk=20Pavlas?= +To: yum-devel@lists.baseurl.org +Date: Thu, 15 Mar 2012 09:53:45 +0100 +Message-Id: <1331801625-9070-1-git-send-email-zpavlas@redhat.com> +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 +X-Scanned-By: MIMEDefang 2.68 on 10.5.110.16 +X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 +Subject: [Yum-devel] [PATCH] No "Only update available" msg when there is + not. BZ 803346 +X-BeenThere: yum-devel@lists.baseurl.org +X-Mailman-Version: 2.1.14 +Precedence: list +Reply-To: yum development +List-Id: yum development +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +MIME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Errors-To: yum-devel-bounces@lists.baseurl.org +Sender: yum-devel-bounces@lists.baseurl.org +X-RedHat-Spam-Score: -2.3 (RCVD_IN_DNSWL_MED) +X-Evolution-Source: imap://jantill%40redhat.com@mail.corp.redhat.com/ +Content-Transfer-Encoding: 8bit + +--- + yum/__init__.py | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/yum/__init__.py b/yum/__init__.py +index 3680356..6f7a69c 100644 +--- a/yum/__init__.py ++++ b/yum/__init__.py +@@ -5075,6 +5075,8 @@ class YumBase(depsolve.Depsolve): + continue + + if pkg.verGE(lipkg): ++ if pkg.verEQ(lipkg): ++ continue + if na not in warned_nas: + msg = _('Only Upgrade available on package: %s') % pkg + self.logger.critical(msg) +-- +1.7.4.4 + +_______________________________________________ +Yum-devel mailing list +Yum-devel@lists.baseurl.org +http://lists.baseurl.org/mailman/listinfo/yum-devel + diff --git a/yum-HEAD.patch b/yum-HEAD.patch index e6e7837..1fa8c87 100644 --- a/yum-HEAD.patch +++ b/yum-HEAD.patch @@ -150481,10 +150481,26 @@ index abd203f..572112a 100644 - 3.4.1 - umask bug fix. diff --git a/yum/__init__.py b/yum/__init__.py -index 99039e0..7e84539 100644 +index 99039e0..3680356 100644 --- a/yum/__init__.py +++ b/yum/__init__.py -@@ -73,6 +73,7 @@ import logginglevels +@@ -46,8 +46,13 @@ import operator + import tempfile + + import yum.i18n +-_ = yum.i18n._ +-P_ = yum.i18n.P_ ++# This is required to make gaftonmode work... ++_wrap_yum_i18n__ = yum.i18n._ ++def _(*args, **kwargs): ++ return _wrap_yum_i18n__(*args, **kwargs) ++_wrap_yum_i18n_P_ = yum.i18n.P_ ++def P_(*args, **kwargs): ++ return _wrap_yum_i18n_P_(*args, **kwargs) + + import config + from config import ParsingError, ConfigParser +@@ -73,6 +78,7 @@ import logginglevels import yumRepo import callbacks import yum.history @@ -150492,7 +150508,7 @@ index 99039e0..7e84539 100644 import warnings warnings.simplefilter("ignore", Errors.YumFutureDeprecationWarning) -@@ -82,7 +83,7 @@ from packages import YumAvailablePackage, YumLocalPackage, YumInstalledPackage +@@ -82,7 +88,7 @@ from packages import YumAvailablePackage, YumLocalPackage, YumInstalledPackage from packages import YumUrlPackage, YumNotFoundPackage from constants import * from yum.rpmtrans import RPMTransaction,SimpleCliCallBack @@ -150501,7 +150517,7 @@ index 99039e0..7e84539 100644 import string import StringIO -@@ -102,10 +103,12 @@ default_grabber.opts.user_agent += " yum/" + __version__ +@@ -102,10 +108,12 @@ default_grabber.opts.user_agent += " yum/" + __version__ class _YumPreBaseConf: @@ -150518,7 +150534,7 @@ index 99039e0..7e84539 100644 def __init__(self): self.fn = '/etc/yum/yum.conf' self.root = '/' -@@ -125,10 +128,12 @@ class _YumPreBaseConf: +@@ -125,10 +133,12 @@ class _YumPreBaseConf: class _YumPreRepoConf: @@ -150535,7 +150551,7 @@ index 99039e0..7e84539 100644 def __init__(self): self.progressbar = None self.callback = None -@@ -164,11 +169,11 @@ class _YumCostExclude: +@@ -164,11 +174,11 @@ class _YumCostExclude: return False class YumBase(depsolve.Depsolve): @@ -150552,7 +150568,7 @@ index 99039e0..7e84539 100644 def __init__(self): depsolve.Depsolve.__init__(self) self._conf = None -@@ -177,6 +182,7 @@ class YumBase(depsolve.Depsolve): +@@ -177,6 +187,7 @@ class YumBase(depsolve.Depsolve): self._up = None self._comps = None self._history = None @@ -150560,7 +150576,7 @@ index 99039e0..7e84539 100644 self._pkgSack = None self._lockfile = None self._tags = None -@@ -204,6 +210,7 @@ class YumBase(depsolve.Depsolve): +@@ -204,6 +215,7 @@ class YumBase(depsolve.Depsolve): self.run_with_package_names = set() self._cleanup = [] @@ -150568,7 +150584,7 @@ index 99039e0..7e84539 100644 def __del__(self): self.close() -@@ -213,10 +220,15 @@ class YumBase(depsolve.Depsolve): +@@ -213,10 +225,15 @@ class YumBase(depsolve.Depsolve): for cb in self._cleanup: cb() def close(self): @@ -150584,7 +150600,7 @@ index 99039e0..7e84539 100644 if self._repos: self._repos.close() -@@ -225,15 +237,33 @@ class YumBase(depsolve.Depsolve): +@@ -225,15 +242,33 @@ class YumBase(depsolve.Depsolve): return transactioninfo.TransactionData() def doGenericSetup(self, cache=0): @@ -150620,7 +150636,7 @@ index 99039e0..7e84539 100644 warnings.warn(_('doConfigSetup() will go away in a future version of Yum.\n'), Errors.YumFutureDeprecationWarning, stacklevel=2) -@@ -297,7 +327,7 @@ class YumBase(depsolve.Depsolve): +@@ -297,15 +332,17 @@ class YumBase(depsolve.Depsolve): # Try the old default fn = '/etc/yum.conf' @@ -150629,7 +150645,19 @@ index 99039e0..7e84539 100644 startupconf.arch = arch startupconf.basearch = self.arch.basearch if uuid: -@@ -367,22 +397,36 @@ class YumBase(depsolve.Depsolve): + startupconf.uuid = uuid + + if startupconf.gaftonmode: +- global _ +- _ = yum.i18n.dummy_wrapper ++ global _wrap_yum_i18n__ ++ _wrap_yum_i18n__ = yum.i18n.dummy_wrapper ++ global _wrap_yum_i18n_P_ ++ _wrap_yum_i18n_P_ = yum.i18n.dummyP_wrapper + + if debuglevel != None: + startupconf.debuglevel = debuglevel +@@ -367,22 +404,36 @@ class YumBase(depsolve.Depsolve): def doLoggingSetup(self, debuglevel, errorlevel, syslog_ident=None, syslog_facility=None, syslog_device='/dev/log'): @@ -150673,7 +150701,7 @@ index 99039e0..7e84539 100644 if repo_age is None: repo_age = os.stat(repofn)[8] -@@ -429,7 +473,15 @@ class YumBase(depsolve.Depsolve): +@@ -429,7 +480,15 @@ class YumBase(depsolve.Depsolve): thisrepo.base_persistdir = self.conf._repos_persistdir @@ -150690,7 +150718,7 @@ index 99039e0..7e84539 100644 if thisrepo.id in self.repo_setopts: for opt in self.repo_setopts[thisrepo.id].items: if not hasattr(thisrepo, opt): -@@ -440,6 +492,20 @@ class YumBase(depsolve.Depsolve): +@@ -440,6 +499,20 @@ class YumBase(depsolve.Depsolve): if validate and not validate(thisrepo): continue @@ -150711,7 +150739,7 @@ index 99039e0..7e84539 100644 # Got our list of repo objects, add them to the repos # collection try: -@@ -448,8 +514,11 @@ class YumBase(depsolve.Depsolve): +@@ -448,8 +521,11 @@ class YumBase(depsolve.Depsolve): self.logger.warning(e) def getReposFromConfig(self): @@ -150725,7 +150753,7 @@ index 99039e0..7e84539 100644 # Read .repo files from directories specified by the reposdir option # (typically /etc/yum/repos.d) repo_config_age = self.conf.config_file_age -@@ -472,12 +541,13 @@ class YumBase(depsolve.Depsolve): +@@ -472,12 +548,13 @@ class YumBase(depsolve.Depsolve): self.getReposFromConfigFile(repofn, repo_age=thisrepo_age) def readRepoConfig(self, parser, section): @@ -150744,7 +150772,7 @@ index 99039e0..7e84539 100644 repo = yumRepo.YumRepository(section) try: repo.populate(parser, section, self.conf) -@@ -500,31 +570,31 @@ class YumBase(depsolve.Depsolve): +@@ -500,31 +577,31 @@ class YumBase(depsolve.Depsolve): return repo def disablePlugins(self): @@ -150797,7 +150825,7 @@ index 99039e0..7e84539 100644 if isinstance(self.plugins, plugins.YumPlugins): raise RuntimeError(_("plugins already initialised")) -@@ -533,6 +603,8 @@ class YumBase(depsolve.Depsolve): +@@ -533,6 +610,8 @@ class YumBase(depsolve.Depsolve): def doRpmDBSetup(self): @@ -150806,7 +150834,7 @@ index 99039e0..7e84539 100644 warnings.warn(_('doRpmDBSetup() will go away in a future version of Yum.\n'), Errors.YumFutureDeprecationWarning, stacklevel=2) -@@ -552,7 +624,8 @@ class YumBase(depsolve.Depsolve): +@@ -552,7 +631,8 @@ class YumBase(depsolve.Depsolve): return self._rpmdb def closeRpmDB(self): @@ -150816,7 +150844,7 @@ index 99039e0..7e84539 100644 if self._rpmdb is not None: self._rpmdb.ts = None self._rpmdb.dropCachedData() -@@ -567,6 +640,12 @@ class YumBase(depsolve.Depsolve): +@@ -567,6 +647,12 @@ class YumBase(depsolve.Depsolve): self._ts = None def doRepoSetup(self, thisrepo=None): @@ -150829,7 +150857,7 @@ index 99039e0..7e84539 100644 warnings.warn(_('doRepoSetup() will go away in a future version of Yum.\n'), Errors.YumFutureDeprecationWarning, stacklevel=2) -@@ -630,6 +709,14 @@ class YumBase(depsolve.Depsolve): +@@ -630,6 +716,14 @@ class YumBase(depsolve.Depsolve): self._repos = RepoStorage(self) def doSackSetup(self, archlist=None, thisrepo=None): @@ -150844,7 +150872,7 @@ index 99039e0..7e84539 100644 warnings.warn(_('doSackSetup() will go away in a future version of Yum.\n'), Errors.YumFutureDeprecationWarning, stacklevel=2) -@@ -711,6 +798,9 @@ class YumBase(depsolve.Depsolve): +@@ -711,6 +805,9 @@ class YumBase(depsolve.Depsolve): def doUpdateSetup(self): @@ -150854,7 +150882,7 @@ index 99039e0..7e84539 100644 warnings.warn(_('doUpdateSetup() will go away in a future version of Yum.\n'), Errors.YumFutureDeprecationWarning, stacklevel=2) -@@ -765,6 +855,8 @@ class YumBase(depsolve.Depsolve): +@@ -765,6 +862,8 @@ class YumBase(depsolve.Depsolve): return self._up def doGroupSetup(self): @@ -150863,7 +150891,7 @@ index 99039e0..7e84539 100644 warnings.warn(_('doGroupSetup() will go away in a future version of Yum.\n'), Errors.YumFutureDeprecationWarning, stacklevel=2) -@@ -837,7 +929,10 @@ class YumBase(depsolve.Depsolve): +@@ -837,7 +936,10 @@ class YumBase(depsolve.Depsolve): if self._comps.compscount == 0: raise Errors.GroupsError, _('No Groups Available in any repository') @@ -150875,7 +150903,7 @@ index 99039e0..7e84539 100644 self.verbose_logger.debug('group time: %0.3f' % (time.time() - group_st)) return self._comps -@@ -881,9 +976,18 @@ class YumBase(depsolve.Depsolve): +@@ -881,9 +983,18 @@ class YumBase(depsolve.Depsolve): if self._history is None: pdb_path = self.conf.persistdir + "/history" self._history = yum.history.YumHistory(root=self.conf.installroot, @@ -150895,7 +150923,7 @@ index 99039e0..7e84539 100644 # properties so they auto-create themselves with defaults repos = property(fget=lambda self: self._getRepos(), fset=lambda self, value: setattr(self, "_repos", value), -@@ -921,6 +1025,11 @@ class YumBase(depsolve.Depsolve): +@@ -921,6 +1032,11 @@ class YumBase(depsolve.Depsolve): fdel=lambda self: setattr(self, "_history", None), doc="Yum History Object") @@ -150907,7 +150935,7 @@ index 99039e0..7e84539 100644 pkgtags = property(fget=lambda self: self._getTags(), fset=lambda self, value: setattr(self, "_tags",value), fdel=lambda self: setattr(self, "_tags", None), -@@ -928,9 +1037,10 @@ class YumBase(depsolve.Depsolve): +@@ -928,9 +1044,10 @@ class YumBase(depsolve.Depsolve): def doSackFilelistPopulate(self): @@ -150921,7 +150949,7 @@ index 99039e0..7e84539 100644 necessary = False # I can't think of a nice way of doing this, we have to have the sack here -@@ -951,8 +1061,12 @@ class YumBase(depsolve.Depsolve): +@@ -951,8 +1068,12 @@ class YumBase(depsolve.Depsolve): self.repos.populateSack(mdtype='filelists') def yumUtilsMsg(self, func, prog): @@ -150936,7 +150964,7 @@ index 99039e0..7e84539 100644 if self.rpmdb.contains(name="yum-utils"): return -@@ -964,8 +1078,17 @@ class YumBase(depsolve.Depsolve): +@@ -964,8 +1085,17 @@ class YumBase(depsolve.Depsolve): (hibeg, prog, hiend)) def buildTransaction(self, unfinished_transactions_check=True): @@ -150956,7 +150984,7 @@ index 99039e0..7e84539 100644 if (unfinished_transactions_check and misc.find_unfinished_transactions(yumlibpath=self.conf.persistdir)): msg = _('There are unfinished transactions remaining. You might ' \ -@@ -1004,7 +1127,7 @@ class YumBase(depsolve.Depsolve): +@@ -1004,7 +1134,7 @@ class YumBase(depsolve.Depsolve): # If transaction was changed by postresolve plugins then we should run skipbroken again (rescode, restring) = self._doSkipBroken(rescode, restring, clear_skipped=False ) @@ -150965,7 +150993,7 @@ index 99039e0..7e84539 100644 self.tsInfo.pkgSack.dropCachedData() # FIXME: This is horrible, see below and yummain. Maybe create a real -@@ -1242,13 +1365,15 @@ class YumBase(depsolve.Depsolve): +@@ -1242,13 +1372,15 @@ class YumBase(depsolve.Depsolve): if None in pkgtup: return None return pkgtup @@ -150985,7 +151013,7 @@ index 99039e0..7e84539 100644 if pkgtup is None: return self._not_found_i[pkgtup] = YumNotFoundPackage(pkgtup) -@@ -1454,8 +1579,14 @@ class YumBase(depsolve.Depsolve): +@@ -1454,8 +1586,14 @@ class YumBase(depsolve.Depsolve): return probs def runTransaction(self, cb): @@ -151001,7 +151029,7 @@ index 99039e0..7e84539 100644 self.plugins.run('pretrans') # We may want to put this other places, eventually, but for now it's -@@ -1516,10 +1647,23 @@ class YumBase(depsolve.Depsolve): +@@ -1516,10 +1654,23 @@ class YumBase(depsolve.Depsolve): pass self._ts_save_file = None @@ -151025,7 +151053,7 @@ index 99039e0..7e84539 100644 # make resultobject - just a plain yumgenericholder object resultobject = misc.GenericHolder() -@@ -1567,13 +1711,24 @@ class YumBase(depsolve.Depsolve): +@@ -1567,13 +1718,24 @@ class YumBase(depsolve.Depsolve): self.plugins.run('posttrans') # sync up what just happened versus what is in the rpmdb if not self.ts.isTsFlagSet(rpm.RPMTRANS_FLAG_TEST): @@ -151055,7 +151083,7 @@ index 99039e0..7e84539 100644 # check to see that the rpmdb and the tsInfo roughly matches # push package object metadata outside of rpmdb into yumdb # delete old yumdb metadata entries -@@ -1584,9 +1739,16 @@ class YumBase(depsolve.Depsolve): +@@ -1584,9 +1746,16 @@ class YumBase(depsolve.Depsolve): # that there is not also an install of this pkg in the tsInfo (reinstall) # for any kind of install add from_repo to the yumdb, and the cmdline # and the install reason @@ -151072,7 +151100,7 @@ index 99039e0..7e84539 100644 for txmbr in self.tsInfo: if txmbr.output_state in TS_INSTALL_STATES: if not self.rpmdb.contains(po=txmbr.po): -@@ -1596,7 +1758,9 @@ class YumBase(depsolve.Depsolve): +@@ -1596,7 +1765,9 @@ class YumBase(depsolve.Depsolve): ' but is not!' % txmbr.po)) # Note: Get Panu to do te.Failed() so we don't have to txmbr.output_state = TS_FAILED @@ -151082,7 +151110,7 @@ index 99039e0..7e84539 100644 po = self.getInstalledPackageObject(txmbr.pkgtup) rpo = txmbr.po po.yumdb_info.from_repo = rpo.repoid -@@ -1630,6 +1794,10 @@ class YumBase(depsolve.Depsolve): +@@ -1630,6 +1801,10 @@ class YumBase(depsolve.Depsolve): if md: po.yumdb_info.from_repo_timestamp = str(md.timestamp) @@ -151093,7 +151121,7 @@ index 99039e0..7e84539 100644 loginuid = misc.getloginuid() if txmbr.updates or txmbr.downgrades or txmbr.reinstall: if txmbr.updates: -@@ -1640,11 +1808,16 @@ class YumBase(depsolve.Depsolve): +@@ -1640,11 +1815,16 @@ class YumBase(depsolve.Depsolve): opo = po if 'installed_by' in opo.yumdb_info: po.yumdb_info.installed_by = opo.yumdb_info.installed_by @@ -151110,7 +151138,7 @@ index 99039e0..7e84539 100644 # Remove old ones after installing new ones, so we can copy values. for txmbr in self.tsInfo: if txmbr.output_state in TS_INSTALL_STATES: -@@ -1662,10 +1835,13 @@ class YumBase(depsolve.Depsolve): +@@ -1662,10 +1842,13 @@ class YumBase(depsolve.Depsolve): ' but is not!' % txmbr.po)) # Note: Get Panu to do te.Failed() so we don't have to txmbr.output_state = TS_FAILED @@ -151124,7 +151152,7 @@ index 99039e0..7e84539 100644 self.verbose_logger.log(logginglevels.DEBUG_2, 'What is this? %s' % txmbr.po) self.plugins.run('postverifytrans') -@@ -1680,10 +1856,11 @@ class YumBase(depsolve.Depsolve): +@@ -1680,10 +1863,11 @@ class YumBase(depsolve.Depsolve): self.verbose_logger.debug('VerifyTransaction time: %0.3f' % (time.time() - vt_st)) def costExcludePackages(self): @@ -151140,7 +151168,7 @@ index 99039e0..7e84539 100644 # if all the repo.costs are equal then don't bother running things costs = {} for r in self.repos.listEnabled(): -@@ -1705,10 +1882,12 @@ class YumBase(depsolve.Depsolve): +@@ -1705,10 +1889,12 @@ class YumBase(depsolve.Depsolve): done = True def excludePackages(self, repo=None): @@ -151156,7 +151184,7 @@ index 99039e0..7e84539 100644 if "all" in self.conf.disable_excludes: return -@@ -1735,9 +1914,11 @@ class YumBase(depsolve.Depsolve): +@@ -1735,9 +1921,11 @@ class YumBase(depsolve.Depsolve): self.pkgSack.addPackageExcluder(repoid, exid,'exclude.match', match) def includePackages(self, repo): @@ -151171,7 +151199,7 @@ index 99039e0..7e84539 100644 includelist = repo.getIncludePkgList() if len(includelist) == 0: -@@ -1757,8 +1938,11 @@ class YumBase(depsolve.Depsolve): +@@ -1757,8 +1945,11 @@ class YumBase(depsolve.Depsolve): self.pkgSack.addPackageExcluder(repo.id, exid, 'exclude.marked') def doLock(self, lockfile = YUM_PID_FILE): @@ -151185,7 +151213,7 @@ index 99039e0..7e84539 100644 if self.conf.uid != 0: # If we are a user, assume we are using the root cache ... so don't # bother locking. -@@ -1774,38 +1958,26 @@ class YumBase(depsolve.Depsolve): +@@ -1774,38 +1965,26 @@ class YumBase(depsolve.Depsolve): mypid=str(os.getpid()) while not self._lock(lockfile, mypid, 0644): @@ -151239,7 +151267,7 @@ index 99039e0..7e84539 100644 # if we're not root then we don't lock - just return nicely # Note that we can get here from __del__, so if we haven't created # YumBase.conf we don't want to do so here as creating stuff inside -@@ -1830,31 +2002,69 @@ class YumBase(depsolve.Depsolve): +@@ -1830,31 +2009,69 @@ class YumBase(depsolve.Depsolve): self._unlock(lockfile) self._lockfile = None @@ -151319,7 +151347,7 @@ index 99039e0..7e84539 100644 failed = False if type(fo) is types.InstanceType: -@@ -1894,9 +2104,16 @@ class YumBase(depsolve.Depsolve): +@@ -1894,9 +2111,16 @@ class YumBase(depsolve.Depsolve): def verifyChecksum(self, fo, checksumType, csum): @@ -151339,7 +151367,7 @@ index 99039e0..7e84539 100644 try: filesum = misc.checksum(checksumType, fo) except Errors.MiscError, e: -@@ -1908,6 +2125,17 @@ class YumBase(depsolve.Depsolve): +@@ -1908,6 +2132,17 @@ class YumBase(depsolve.Depsolve): return 0 def downloadPkgs(self, pkglist, callback=None, callback_total=None): @@ -151357,7 +151385,7 @@ index 99039e0..7e84539 100644 def mediasort(apo, bpo): # FIXME: we should probably also use the mediaid; else we # could conceivably ping-pong between different disc1's -@@ -1998,16 +2226,6 @@ class YumBase(depsolve.Depsolve): +@@ -1998,16 +2233,6 @@ class YumBase(depsolve.Depsolve): os.unlink(local) checkfunc = (self.verifyPkg, (po, 1), {}) @@ -151374,7 +151402,7 @@ index 99039e0..7e84539 100644 try: if i == 1 and not local_size and remote_size == po.size: text = os.path.basename(po.relativepath) -@@ -2032,7 +2250,7 @@ class YumBase(depsolve.Depsolve): +@@ -2032,7 +2257,7 @@ class YumBase(depsolve.Depsolve): done_repos.add(po.repoid) except Errors.RepoError, e: @@ -151383,7 +151411,7 @@ index 99039e0..7e84539 100644 else: po.localpath = mylocal if po in errors: -@@ -2052,7 +2270,22 @@ class YumBase(depsolve.Depsolve): +@@ -2052,7 +2277,22 @@ class YumBase(depsolve.Depsolve): return errors def verifyHeader(self, fo, po, raiseError): @@ -151407,7 +151435,7 @@ index 99039e0..7e84539 100644 if type(fo) is types.InstanceType: fo = fo.filename -@@ -2076,9 +2309,12 @@ class YumBase(depsolve.Depsolve): +@@ -2076,9 +2316,12 @@ class YumBase(depsolve.Depsolve): return 1 def downloadHeader(self, po): @@ -151422,7 +151450,7 @@ index 99039e0..7e84539 100644 if hasattr(po, 'pkgtype') and po.pkgtype == 'local': return -@@ -2122,15 +2358,17 @@ class YumBase(depsolve.Depsolve): +@@ -2122,15 +2365,17 @@ class YumBase(depsolve.Depsolve): return def sigCheckPkg(self, po): @@ -151448,7 +151476,7 @@ index 99039e0..7e84539 100644 if self._override_sigchecks: check = False hasgpgkey = 0 -@@ -2181,6 +2419,9 @@ class YumBase(depsolve.Depsolve): +@@ -2181,6 +2426,9 @@ class YumBase(depsolve.Depsolve): return result, msg def cleanUsedHeadersPackages(self): @@ -151458,7 +151486,7 @@ index 99039e0..7e84539 100644 filelist = [] for txmbr in self.tsInfo: if txmbr.po.state not in TS_INSTALL_STATES: -@@ -2218,27 +2459,42 @@ class YumBase(depsolve.Depsolve): +@@ -2218,27 +2466,42 @@ class YumBase(depsolve.Depsolve): _('%s removed'), fn) def cleanHeaders(self): @@ -151503,7 +151531,7 @@ index 99039e0..7e84539 100644 cachedir = self.conf.persistdir + "/rpmdb-indexes/" if not os.path.exists(cachedir): filelist = [] -@@ -2272,8 +2528,29 @@ class YumBase(depsolve.Depsolve): +@@ -2272,8 +2535,29 @@ class YumBase(depsolve.Depsolve): def doPackageLists(self, pkgnarrow='all', patterns=None, showdups=None, ignore_case=False): @@ -151535,7 +151563,7 @@ index 99039e0..7e84539 100644 if showdups is None: showdups = self.conf.showdupesfromrepos ygh = misc.GenericHolder(iter=pkgnarrow) -@@ -2323,10 +2600,22 @@ class YumBase(depsolve.Depsolve): +@@ -2323,10 +2607,22 @@ class YumBase(depsolve.Depsolve): key = (pkg.name, pkg.arch) if pkg.pkgtup in dinst: reinstall_available.append(pkg) @@ -151561,7 +151589,7 @@ index 99039e0..7e84539 100644 # produce the updates list of tuples elif pkgnarrow == 'updates': -@@ -2461,14 +2750,13 @@ class YumBase(depsolve.Depsolve): +@@ -2461,14 +2757,13 @@ class YumBase(depsolve.Depsolve): def findDeps(self, pkgs): @@ -151581,7 +151609,7 @@ index 99039e0..7e84539 100644 results = {} for pkg in pkgs: -@@ -2495,10 +2783,22 @@ class YumBase(depsolve.Depsolve): +@@ -2495,10 +2790,22 @@ class YumBase(depsolve.Depsolve): # pre 3.2.10 API used to always showdups, so that's the default atm. def searchGenerator(self, fields, criteria, showdups=True, keys=False, searchtags=True, searchrpmdb=True): @@ -151608,7 +151636,7 @@ index 99039e0..7e84539 100644 sql_fields = [] for f in fields: sql_fields.append(RPM_TO_SQLITE.get(f, f)) -@@ -2661,6 +2961,14 @@ class YumBase(depsolve.Depsolve): +@@ -2661,6 +2968,14 @@ class YumBase(depsolve.Depsolve): yield (po, vs) def searchPackageTags(self, criteria): @@ -151623,7 +151651,7 @@ index 99039e0..7e84539 100644 results = {} # name = [(criteria, taglist)] for c in criteria: c = c.lower() -@@ -2677,11 +2985,16 @@ class YumBase(depsolve.Depsolve): +@@ -2677,11 +2992,16 @@ class YumBase(depsolve.Depsolve): return results def searchPackages(self, fields, criteria, callback=None): @@ -151645,7 +151673,7 @@ index 99039e0..7e84539 100644 warnings.warn(_('searchPackages() will go away in a future version of Yum.\ Use searchGenerator() instead. \n'), Errors.YumFutureDeprecationWarning, stacklevel=2) -@@ -2700,6 +3013,19 @@ class YumBase(depsolve.Depsolve): +@@ -2700,6 +3020,19 @@ class YumBase(depsolve.Depsolve): def searchPackageProvides(self, args, callback=None, callback_has_matchfor=False): @@ -151665,7 +151693,7 @@ index 99039e0..7e84539 100644 def _arg_data(arg): if not misc.re_glob(arg): isglob = False -@@ -2723,7 +3049,7 @@ class YumBase(depsolve.Depsolve): +@@ -2723,7 +3056,7 @@ class YumBase(depsolve.Depsolve): where = self.returnPackagesByDep(arg) else: usedDepString = False @@ -151674,7 +151702,7 @@ index 99039e0..7e84539 100644 self.verbose_logger.log(logginglevels.DEBUG_1, P_('Searching %d package', 'Searching %d packages', len(where)), len(where)) -@@ -2817,25 +3143,93 @@ class YumBase(depsolve.Depsolve): +@@ -2817,25 +3150,93 @@ class YumBase(depsolve.Depsolve): return matches @@ -151779,7 +151807,7 @@ index 99039e0..7e84539 100644 if uservisible: if grp.user_visible: installed.append(grp) -@@ -2848,12 +3242,29 @@ class YumBase(depsolve.Depsolve): +@@ -2848,12 +3249,29 @@ class YumBase(depsolve.Depsolve): else: available.append(grp) @@ -151812,7 +151840,7 @@ index 99039e0..7e84539 100644 txmbrs_used = [] thesegroups = self.comps.return_groups(grpid) -@@ -2861,20 +3272,28 @@ class YumBase(depsolve.Depsolve): +@@ -2861,20 +3279,28 @@ class YumBase(depsolve.Depsolve): raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid) for thisgroup in thesegroups: @@ -151843,7 +151871,7 @@ index 99039e0..7e84539 100644 thesegroups = self.comps.return_groups(grpid) if not thesegroups: raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid) -@@ -2898,13 +3317,18 @@ class YumBase(depsolve.Depsolve): +@@ -2898,13 +3324,18 @@ class YumBase(depsolve.Depsolve): self.tsInfo.remove(txmbr.po.pkgtup) @@ -151869,7 +151897,7 @@ index 99039e0..7e84539 100644 """ if not self.comps.has_group(grpid): -@@ -2934,12 +3358,47 @@ class YumBase(depsolve.Depsolve): +@@ -2934,12 +3365,47 @@ class YumBase(depsolve.Depsolve): if 'optional' in package_types: pkgs.extend(thisgroup.optional_packages) @@ -151918,7 +151946,7 @@ index 99039e0..7e84539 100644 except Errors.InstallError, e: self.verbose_logger.debug(_('No package named %s available to be installed'), pkg) -@@ -2953,6 +3412,7 @@ class YumBase(depsolve.Depsolve): +@@ -2953,6 +3419,7 @@ class YumBase(depsolve.Depsolve): group_conditionals = enable_group_conditionals count_cond_test = 0 @@ -151926,7 +151954,7 @@ index 99039e0..7e84539 100644 if group_conditionals: for condreq, cond in thisgroup.conditional_packages.iteritems(): if self.isPackageInstalled(cond): -@@ -2997,10 +3457,14 @@ class YumBase(depsolve.Depsolve): +@@ -2997,10 +3464,14 @@ class YumBase(depsolve.Depsolve): return txmbrs_used def deselectGroup(self, grpid, force=False): @@ -151945,7 +151973,7 @@ index 99039e0..7e84539 100644 if not self.comps.has_group(grpid): raise Errors.GroupsError, _("No Group named %s exists") % to_unicode(grpid) -@@ -3035,12 +3499,21 @@ class YumBase(depsolve.Depsolve): +@@ -3035,12 +3506,21 @@ class YumBase(depsolve.Depsolve): self.tsInfo.remove(pkg.pkgtup) def getPackageObject(self, pkgtup, allow_missing=False): @@ -151973,7 +152001,7 @@ index 99039e0..7e84539 100644 # look it up in the self.localPackages first: for po in self.localPackages: if po.pkgtup == pkgtup: -@@ -3049,7 +3522,7 @@ class YumBase(depsolve.Depsolve): +@@ -3049,7 +3529,7 @@ class YumBase(depsolve.Depsolve): pkgs = self.pkgSack.searchPkgTuple(pkgtup) if len(pkgs) == 0: @@ -151982,7 +152010,7 @@ index 99039e0..7e84539 100644 if allow_missing: # This can happen due to excludes after .up has return None # happened. raise Errors.DepError, _('Package tuple %s could not be found in packagesack') % str(pkgtup) -@@ -3065,13 +3538,21 @@ class YumBase(depsolve.Depsolve): +@@ -3065,13 +3545,21 @@ class YumBase(depsolve.Depsolve): return result def getInstalledPackageObject(self, pkgtup): @@ -152009,7 +152037,7 @@ index 99039e0..7e84539 100644 raise Errors.RpmDBError, _('Package tuple %s could not be found in rpmdb') % str(pkgtup) # Dito. FIXME from getPackageObject() for len() > 1 ... :) -@@ -3079,9 +3560,11 @@ class YumBase(depsolve.Depsolve): +@@ -3079,9 +3567,11 @@ class YumBase(depsolve.Depsolve): return po def gpgKeyCheck(self): @@ -152023,7 +152051,7 @@ index 99039e0..7e84539 100644 gpgkeyschecked = self.conf.cachedir + '/.gpgkeyschecked.yum' if os.path.exists(gpgkeyschecked): return 1 -@@ -3106,9 +3589,13 @@ class YumBase(depsolve.Depsolve): +@@ -3106,9 +3596,13 @@ class YumBase(depsolve.Depsolve): return 1 def returnPackagesByDep(self, depstring): @@ -152039,7 +152067,7 @@ index 99039e0..7e84539 100644 if not depstring: return [] -@@ -3135,9 +3622,16 @@ class YumBase(depsolve.Depsolve): +@@ -3135,9 +3629,16 @@ class YumBase(depsolve.Depsolve): return self.pkgSack.getProvides(depname, depflags, depver).keys() def returnPackageByDep(self, depstring): @@ -152059,7 +152087,7 @@ index 99039e0..7e84539 100644 # we get all sorts of randomness here errstring = depstring if type(depstring) not in types.StringTypes: -@@ -3149,16 +3643,22 @@ class YumBase(depsolve.Depsolve): +@@ -3149,16 +3650,22 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError, _('No Package found for %s') % errstring ps = ListPackageSack(pkglist) @@ -152086,7 +152114,7 @@ index 99039e0..7e84539 100644 if not depstring: return [] -@@ -3184,12 +3684,47 @@ class YumBase(depsolve.Depsolve): +@@ -3184,12 +3691,47 @@ class YumBase(depsolve.Depsolve): return self.rpmdb.getProvides(depname, depflags, depver).keys() @@ -152136,7 +152164,7 @@ index 99039e0..7e84539 100644 if len(pkglist) == 0: -@@ -3198,14 +3733,23 @@ class YumBase(depsolve.Depsolve): +@@ -3198,14 +3740,23 @@ class YumBase(depsolve.Depsolve): if len(pkglist) == 1: return pkglist[0] @@ -152166,7 +152194,7 @@ index 99039e0..7e84539 100644 returnlist = [] compatArchList = self.arch.get_arch_list(arch) multiLib = [] -@@ -3222,9 +3766,9 @@ class YumBase(depsolve.Depsolve): +@@ -3222,9 +3773,9 @@ class YumBase(depsolve.Depsolve): singleLib.append(po) # we now have three lists. find the best package(s) of each @@ -152179,7 +152207,7 @@ index 99039e0..7e84539 100644 if single_name and multi and single and multi.name != single.name: # Sinlge _must_ match multi, if we want a single package name -@@ -3238,7 +3782,7 @@ class YumBase(depsolve.Depsolve): +@@ -3238,7 +3789,7 @@ class YumBase(depsolve.Depsolve): # if there's a noarch and it's newer than the multilib, we want # just the noarch. otherwise, we want multi + single elif multi: @@ -152188,7 +152216,7 @@ index 99039e0..7e84539 100644 if best.arch == "noarch": returnlist.append(no) else: -@@ -3246,7 +3790,7 @@ class YumBase(depsolve.Depsolve): +@@ -3246,7 +3797,7 @@ class YumBase(depsolve.Depsolve): if single: returnlist.append(single) # similar for the non-multilib case elif single: @@ -152197,7 +152225,7 @@ index 99039e0..7e84539 100644 if best.arch == "noarch": returnlist.append(no) else: -@@ -3350,23 +3894,27 @@ class YumBase(depsolve.Depsolve): +@@ -3350,23 +3901,27 @@ class YumBase(depsolve.Depsolve): done = True slow = next_func(slow) @@ -152230,7 +152258,7 @@ index 99039e0..7e84539 100644 def _at_groupremove(self, pattern): " Do groupremove via. leading @ on the cmd line, for remove." assert pattern[0] == '@' -@@ -3398,7 +3946,7 @@ class YumBase(depsolve.Depsolve): +@@ -3398,7 +3953,7 @@ class YumBase(depsolve.Depsolve): def _minus_deselect(self, pattern): """ Remove things from the transaction, like kickstart. """ assert pattern[0] == '-' @@ -152239,7 +152267,7 @@ index 99039e0..7e84539 100644 if pat and pat[0] == '@': pat = pat[1:] -@@ -3437,14 +3985,61 @@ class YumBase(depsolve.Depsolve): +@@ -3437,14 +3992,61 @@ class YumBase(depsolve.Depsolve): if flag not in self.tsInfo.probFilterFlags: self.tsInfo.probFilterFlags.append(flag) @@ -152307,7 +152335,7 @@ index 99039e0..7e84539 100644 pkgs = [] was_pattern = False if po: -@@ -3477,20 +4072,12 @@ class YumBase(depsolve.Depsolve): +@@ -3477,20 +4079,12 @@ class YumBase(depsolve.Depsolve): self.verbose_logger.debug(_('Checking for virtual provide or file-provide for %s'), arg) @@ -152334,7 +152362,7 @@ index 99039e0..7e84539 100644 else: nevra_dict = self._nevra_kwarg_parse(kwargs) -@@ -3577,8 +4164,8 @@ class YumBase(depsolve.Depsolve): +@@ -3577,8 +4171,8 @@ class YumBase(depsolve.Depsolve): continue # make sure this shouldn't be passed to update: @@ -152345,7 +152373,7 @@ index 99039e0..7e84539 100644 txmbrs = self.update(po=po) tx_return.extend(txmbrs) continue -@@ -3587,7 +4174,7 @@ class YumBase(depsolve.Depsolve): +@@ -3587,7 +4181,7 @@ class YumBase(depsolve.Depsolve): # something else in the repo. Unless there is a obsoletion loop, # at which point ignore everything. obsoleting_pkg = None @@ -152354,7 +152382,7 @@ index 99039e0..7e84539 100644 obsoleting_pkg = self._test_loop(po, self._pkg2obspkg) if obsoleting_pkg is not None: # this is not a definitive check but it'll make sure we don't -@@ -3600,23 +4187,23 @@ class YumBase(depsolve.Depsolve): +@@ -3600,23 +4194,23 @@ class YumBase(depsolve.Depsolve): already_obs = pkgs[0] if already_obs: @@ -152385,7 +152413,7 @@ index 99039e0..7e84539 100644 continue # make sure we don't have a name.arch of this already installed -@@ -3630,7 +4217,7 @@ class YumBase(depsolve.Depsolve): +@@ -3630,7 +4224,7 @@ class YumBase(depsolve.Depsolve): found = True break if not found: @@ -152394,7 +152422,7 @@ index 99039e0..7e84539 100644 txmbrs = self.update(po=po) tx_return.extend(txmbrs) continue -@@ -3719,14 +4306,33 @@ class YumBase(depsolve.Depsolve): +@@ -3719,14 +4313,33 @@ class YumBase(depsolve.Depsolve): return txmbr def update(self, po=None, requiringPo=None, update_to=False, **kwargs): @@ -152435,7 +152463,7 @@ index 99039e0..7e84539 100644 # check for args - if no po nor kwargs, do them all # if po, do it, ignore all else # if no po do kwargs -@@ -3765,7 +4371,12 @@ class YumBase(depsolve.Depsolve): +@@ -3765,7 +4378,12 @@ class YumBase(depsolve.Depsolve): if new is None: continue tx_return.extend(self.update(po=new)) @@ -152449,7 +152477,7 @@ index 99039e0..7e84539 100644 return tx_return # complications -@@ -3787,7 +4398,7 @@ class YumBase(depsolve.Depsolve): +@@ -3787,7 +4405,7 @@ class YumBase(depsolve.Depsolve): return self._minus_deselect(kwargs['pattern']) if kwargs['pattern'] and kwargs['pattern'][0] == '@': @@ -152458,7 +152486,7 @@ index 99039e0..7e84539 100644 arg = kwargs['pattern'] if not update_to: -@@ -3920,6 +4531,18 @@ class YumBase(depsolve.Depsolve): +@@ -3920,6 +4538,18 @@ class YumBase(depsolve.Depsolve): tx_return.append(txmbr) for available_pkg in availpkgs: @@ -152477,7 +152505,7 @@ index 99039e0..7e84539 100644 # Make sure we're not installing a package which is obsoleted by # something else in the repo. Unless there is a obsoletion loop, # at which point ignore everything. -@@ -3985,11 +4608,18 @@ class YumBase(depsolve.Depsolve): +@@ -3985,11 +4615,18 @@ class YumBase(depsolve.Depsolve): return tx_return def remove(self, po=None, **kwargs): @@ -152501,7 +152529,7 @@ index 99039e0..7e84539 100644 if not po and not kwargs: raise Errors.RemoveError, 'Nothing specified to remove' -@@ -4055,17 +4685,19 @@ class YumBase(depsolve.Depsolve): +@@ -4055,17 +4692,19 @@ class YumBase(depsolve.Depsolve): return tx_return def installLocal(self, pkg, po=None, updateonly=False): @@ -152531,7 +152559,7 @@ index 99039e0..7e84539 100644 # read in the package into a YumLocalPackage Object # append it to self.localPackages # check if it can be installed or updated based on nevra versus rpmdb -@@ -4183,16 +4815,15 @@ class YumBase(depsolve.Depsolve): +@@ -4183,16 +4822,15 @@ class YumBase(depsolve.Depsolve): return tx_return def reinstallLocal(self, pkg, po=None): @@ -152556,7 +152584,7 @@ index 99039e0..7e84539 100644 if not po: try: po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg, -@@ -4215,9 +4846,19 @@ class YumBase(depsolve.Depsolve): +@@ -4215,9 +4853,19 @@ class YumBase(depsolve.Depsolve): return self.reinstall(po=po) def reinstall(self, po=None, **kwargs): @@ -152579,7 +152607,7 @@ index 99039e0..7e84539 100644 self._add_prob_flags(rpm.RPMPROB_FILTER_REPLACEPKG, rpm.RPMPROB_FILTER_REPLACENEWFILES, rpm.RPMPROB_FILTER_REPLACEOLDFILES) -@@ -4259,16 +4900,15 @@ class YumBase(depsolve.Depsolve): +@@ -4259,16 +4907,15 @@ class YumBase(depsolve.Depsolve): return tx_mbrs def downgradeLocal(self, pkg, po=None): @@ -152604,7 +152632,7 @@ index 99039e0..7e84539 100644 if not po: try: po = YumUrlPackage(self, ts=self.rpmdb.readOnlyTS(), url=pkg, -@@ -4309,13 +4949,19 @@ class YumBase(depsolve.Depsolve): +@@ -4309,13 +4956,19 @@ class YumBase(depsolve.Depsolve): return False def downgrade(self, po=None, **kwargs): @@ -152631,7 +152659,7 @@ index 99039e0..7e84539 100644 if not po and not kwargs: raise Errors.DowngradeError, 'Nothing specified to downgrade' -@@ -4457,7 +5103,7 @@ class YumBase(depsolve.Depsolve): +@@ -4457,7 +5110,7 @@ class YumBase(depsolve.Depsolve): if e and v and r: evr = '%s:%s-%s' % (e, v, r) elif v and r: @@ -152640,7 +152668,7 @@ index 99039e0..7e84539 100644 elif e and v: evr = '%s:%s' % (e, v) elif v: # e and r etc. is just too weird to print -@@ -4500,12 +5146,24 @@ class YumBase(depsolve.Depsolve): +@@ -4500,12 +5153,24 @@ class YumBase(depsolve.Depsolve): return returndict @@ -152668,7 +152696,7 @@ index 99039e0..7e84539 100644 old_conf_obs = self.conf.obsoletes self.conf.obsoletes = False done = False -@@ -4515,19 +5173,46 @@ class YumBase(depsolve.Depsolve): +@@ -4515,19 +5180,46 @@ class YumBase(depsolve.Depsolve): done = True for pkg in transaction.trans_data: if pkg.state == 'Downgrade': @@ -152715,7 +152743,7 @@ index 99039e0..7e84539 100644 if self.install(pkgtup=pkg.pkgtup): done = True for pkg in transaction.trans_data: -@@ -4538,8 +5223,14 @@ class YumBase(depsolve.Depsolve): +@@ -4538,8 +5230,14 @@ class YumBase(depsolve.Depsolve): return done def history_undo(self, transaction): @@ -152732,7 +152760,7 @@ index 99039e0..7e84539 100644 # NOTE: This is somewhat basic atm. ... for instance we don't check # that we are going from the old new version. However it's still # better than the RHN rollback code, and people pay for that :). -@@ -4674,39 +5365,49 @@ class YumBase(depsolve.Depsolve): +@@ -4674,39 +5372,49 @@ class YumBase(depsolve.Depsolve): if pkgs: pkgs = sorted(pkgs)[-1] msg = (_('Importing %s key 0x%s:\n' @@ -152800,7 +152828,7 @@ index 99039e0..7e84539 100644 user_cb_fail = False for keyurl in keyurls: keys = self._retrievePublicKey(keyurl, repo) -@@ -4725,7 +5426,9 @@ class YumBase(depsolve.Depsolve): +@@ -4725,7 +5433,9 @@ class YumBase(depsolve.Depsolve): # Try installing/updating GPG key self._getKeyImportMessage(info, keyurl) rc = False @@ -152811,7 +152839,7 @@ index 99039e0..7e84539 100644 rc = True # grab the .sig/.asc for the keyurl, if it exists -@@ -4751,8 +5454,8 @@ class YumBase(depsolve.Depsolve): +@@ -4751,8 +5461,8 @@ class YumBase(depsolve.Depsolve): ts = self.rpmdb.readOnlyTS() result = ts.pgpImportPubkey(misc.procgpgkey(info['raw_key'])) if result != 0: @@ -152822,7 +152850,7 @@ index 99039e0..7e84539 100644 self.logger.info(_('Key imported successfully')) key_installed = True -@@ -4760,18 +5463,20 @@ class YumBase(depsolve.Depsolve): +@@ -4760,18 +5470,20 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError, _("Didn't install any keys") if not key_installed: @@ -152848,7 +152876,7 @@ index 99039e0..7e84539 100644 def _getAnyKeyForRepo(self, repo, destdir, keyurl_list, is_cakey=False, callback=None): """ -@@ -4788,6 +5493,18 @@ class YumBase(depsolve.Depsolve): +@@ -4788,6 +5500,18 @@ class YumBase(depsolve.Depsolve): """ key_installed = False @@ -152867,7 +152895,7 @@ index 99039e0..7e84539 100644 user_cb_fail = False for keyurl in keyurl_list: keys = self._retrievePublicKey(keyurl, repo, getSig=not is_cakey) -@@ -4819,8 +5536,11 @@ class YumBase(depsolve.Depsolve): +@@ -4819,8 +5543,11 @@ class YumBase(depsolve.Depsolve): if not key_installed: self._getKeyImportMessage(info, keyurl, keytype) rc = False @@ -152880,7 +152908,7 @@ index 99039e0..7e84539 100644 elif callback: rc = callback({"repo": repo, "userid": info['userid'], "hexkeyid": info['hexkeyid'], "keyurl": keyurl, -@@ -4835,7 +5555,8 @@ class YumBase(depsolve.Depsolve): +@@ -4835,7 +5562,8 @@ class YumBase(depsolve.Depsolve): # Import the key result = misc.import_key_to_pubring(info['raw_key'], info['hexkeyid'], gpgdir=destdir) if not result: @@ -152890,7 +152918,7 @@ index 99039e0..7e84539 100644 self.logger.info(_('Key imported successfully')) key_installed = True # write out the key id to imported_cakeys in the repos basedir -@@ -4851,36 +5572,35 @@ class YumBase(depsolve.Depsolve): +@@ -4851,36 +5579,35 @@ class YumBase(depsolve.Depsolve): pass if not key_installed and user_cb_fail: @@ -152943,7 +152971,7 @@ index 99039e0..7e84539 100644 self._getAnyKeyForRepo(repo, repo.gpgcadir, repo.gpgcakey, is_cakey=True, callback=callback) def _limit_installonly_pkgs(self): -@@ -4959,19 +5679,22 @@ class YumBase(depsolve.Depsolve): +@@ -4959,19 +5686,22 @@ class YumBase(depsolve.Depsolve): txmbr.depends_on.append(rel) def processTransaction(self, callback=None,rpmTestDisplay=None, rpmDisplay=None): @@ -152979,7 +153007,7 @@ index 99039e0..7e84539 100644 if not callback: callback = callbacks.ProcessTransNoOutputCallback() -@@ -5114,13 +5837,19 @@ class YumBase(depsolve.Depsolve): +@@ -5114,13 +5844,19 @@ class YumBase(depsolve.Depsolve): return results def add_enable_repo(self, repoid, baseurls=[], mirrorlist=None, **kwargs): @@ -153006,7 +153034,7 @@ index 99039e0..7e84539 100644 # out of place fixme - maybe we should make this the default repo addition # routine and use it from getReposFromConfigFile(), etc. newrepo = yumRepo.YumRepository(repoid) -@@ -5167,9 +5896,15 @@ class YumBase(depsolve.Depsolve): +@@ -5167,9 +5903,15 @@ class YumBase(depsolve.Depsolve): def setCacheDir(self, force=False, tmpdir=None, reuse=True, suffix='/$basearch/$releasever'): @@ -153025,7 +153053,7 @@ index 99039e0..7e84539 100644 if not force and os.geteuid() == 0: return True # We are root, not forced, so happy with the global dir. if tmpdir is None: -@@ -5220,13 +5955,24 @@ class YumBase(depsolve.Depsolve): +@@ -5220,13 +5962,24 @@ class YumBase(depsolve.Depsolve): self.history.write_addon_data('config-repos', myrepos) def verify_plugins_cb(self, verify_package): @@ -153053,7 +153081,7 @@ index 99039e0..7e84539 100644 if self.tsInfo._unresolvedMembers: if auto: self.logger.critical(_("Dependencies not solved. Will not save unresolved transaction.")) -@@ -5234,7 +5980,7 @@ class YumBase(depsolve.Depsolve): +@@ -5234,7 +5987,7 @@ class YumBase(depsolve.Depsolve): raise Errors.YumBaseError(_("Dependencies not solved. Will not save unresolved transaction.")) if not filename: @@ -153062,7 +153090,7 @@ index 99039e0..7e84539 100644 fd,filename = tempfile.mkstemp(suffix='.yumtx', prefix=prefix) f = os.fdopen(fd, 'w') else: -@@ -5244,7 +5990,7 @@ class YumBase(depsolve.Depsolve): +@@ -5244,7 +5997,7 @@ class YumBase(depsolve.Depsolve): msg = "%s\n" % self.rpmdb.simpleVersion(main_only=True)[0] msg += "%s\n" % self.ts.getTsFlags() @@ -153071,7 +153099,7 @@ index 99039e0..7e84539 100644 msg += "0\n" else: msg += "%s\n" % len(self.repos.listEnabled()) -@@ -5266,7 +6012,17 @@ class YumBase(depsolve.Depsolve): +@@ -5266,7 +6019,17 @@ class YumBase(depsolve.Depsolve): def load_ts(self, filename, ignorerpm=None, ignoremissing=None): @@ -153090,7 +153118,7 @@ index 99039e0..7e84539 100644 # check rpmversion - if not match throw a fit # check repoversions (and repos)- if not match throw a fit # load each txmbr - if pkgs being updated don't exist, bail w/error -@@ -5292,6 +6048,16 @@ class YumBase(depsolve.Depsolve): +@@ -5292,6 +6055,16 @@ class YumBase(depsolve.Depsolve): # 3+numrepos = num pkgs # 3+numrepos+1 -> EOF= txmembers @@ -153107,7 +153135,7 @@ index 99039e0..7e84539 100644 # rpm db ver rpmv = data[0].strip() if rpmv != str(self.rpmdb.simpleVersion(main_only=True)[0]): -@@ -5329,6 +6095,7 @@ class YumBase(depsolve.Depsolve): +@@ -5329,6 +6102,7 @@ class YumBase(depsolve.Depsolve): pkgcount = 0 pkgprob = False curpkg = None @@ -155584,7 +155612,7 @@ index 4af563a..47832fc 100644 self.obsoletes = {} #obs[obsoletename] = [pkg1, pkg2, pkg3] #the package lists are packages that obsolete the key name diff --git a/yum/packages.py b/yum/packages.py -index 5ef9951..492ccac 100644 +index 5ef9951..da31971 100644 --- a/yum/packages.py +++ b/yum/packages.py @@ -243,34 +243,87 @@ class PackageObject(object): @@ -155719,7 +155747,26 @@ index 5ef9951..492ccac 100644 return 0 -@@ -1083,7 +1135,7 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -611,15 +663,18 @@ class RpmBase(object): + dirlist = property(fget=lambda self: self.returnFileEntries(ftype='dir')) + ghostlist = property(fget=lambda self: self.returnFileEntries(ftype='ghost')) + requires = property(fget=lambda self: self.returnPrco('requires')) ++ strong_requires = property(fget=lambda self: self.returnPrco('strong_requires')) + provides = property(fget=lambda self: self.returnPrco('provides')) + obsoletes = property(fget=lambda self: self.returnPrco('obsoletes')) + conflicts = property(fget=lambda self: self.returnPrco('conflicts')) + provides_names = property(fget=lambda self: self.returnPrcoNames('provides')) + requires_names = property(fget=lambda self: self.returnPrcoNames('requires')) ++ strong_requires_names = property(fget=lambda self: self.returnPrcoNames('strong_requires')) + conflicts_names = property(fget=lambda self: self.returnPrcoNames('conflicts')) + obsoletes_names = property(fget=lambda self: self.returnPrcoNames('obsoletes')) + provides_print = property(fget=lambda self: self.returnPrco('provides', True)) + requires_print = property(fget=lambda self: self.returnPrco('requires', True)) ++ strong_requires_print = property(fget=lambda self: self.returnPrco('strong_requires', True)) + conflicts_print = property(fget=lambda self: self.returnPrco('conflicts', True)) + obsoletes_print = property(fget=lambda self: self.returnPrco('obsoletes', True)) + changelog = property(fget=lambda self: self.returnChangelog()) +@@ -1083,7 +1138,7 @@ class YumAvailablePackage(PackageObject, RpmBase): misc.to_unicode(misc.to_xml(self.summary)), misc.to_unicode(misc.to_xml(self.description)), packager, url, self.filetime, @@ -155728,7 +155775,7 @@ index 5ef9951..492ccac 100644 msg += self._return_remote_location() return msg -@@ -1133,7 +1185,7 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -1133,7 +1188,7 @@ class YumAvailablePackage(PackageObject, RpmBase): msg = "" mylist = getattr(self, pcotype) if mylist: msg = "\n \n" % pcotype @@ -155737,7 +155784,7 @@ index 5ef9951..492ccac 100644 pcostring = ''' %s\n""" % misc.to_xml(fn) return msg -@@ -1194,8 +1246,8 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -1194,8 +1249,8 @@ class YumAvailablePackage(PackageObject, RpmBase): continue newlist.append(i) mylist = newlist @@ -155763,7 +155810,7 @@ index 5ef9951..492ccac 100644 if name.startswith('rpmlib('): continue # this drops out requires that the pkg provides for itself. -@@ -1217,13 +1269,16 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -1217,13 +1272,16 @@ class YumAvailablePackage(PackageObject, RpmBase): prcostring += ''' ver="%s"''' % misc.to_xml(v, attrib=True) if r: prcostring += ''' rel="%s"''' % misc.to_xml(r, attrib=True) @@ -155782,7 +155829,7 @@ index 5ef9951..492ccac 100644 return msg def _dump_changelog(self, clog_limit): -@@ -1272,6 +1327,13 @@ class YumAvailablePackage(PackageObject, RpmBase): +@@ -1272,6 +1330,13 @@ class YumAvailablePackage(PackageObject, RpmBase): return misc.to_utf8(msg) @@ -155796,7 +155843,7 @@ index 5ef9951..492ccac 100644 # This is a tweak on YumAvailablePackage() and is a base class for packages # which are actual rpms. -@@ -1299,7 +1361,8 @@ class YumHeaderPackage(YumAvailablePackage): +@@ -1299,7 +1364,8 @@ class YumHeaderPackage(YumAvailablePackage): self.pkgid = self.hdr[rpm.RPMTAG_SHA1HEADER] if not self.pkgid: self.pkgid = "%s.%s" %(self.hdr['name'], self.hdr['buildtime']) @@ -155806,7 +155853,7 @@ index 5ef9951..492ccac 100644 self.__mode_cache = {} self.__prcoPopulated = False -@@ -1353,6 +1416,12 @@ class YumHeaderPackage(YumAvailablePackage): +@@ -1353,6 +1419,12 @@ class YumHeaderPackage(YumAvailablePackage): continue lst = hdr[getattr(rpm, 'RPMTAG_%sFLAGS' % tag)] @@ -155819,7 +155866,7 @@ index 5ef9951..492ccac 100644 flag = map(rpmUtils.miscutils.flagToString, lst) flag = map(misc.share_data, flag) -@@ -1363,6 +1432,10 @@ class YumHeaderPackage(YumAvailablePackage): +@@ -1363,6 +1435,10 @@ class YumHeaderPackage(YumAvailablePackage): prcotype = tag2prco[tag] self.prco[prcotype] = map(misc.share_data, zip(name,flag,vers)) @@ -155830,7 +155877,7 @@ index 5ef9951..492ccac 100644 def tagByName(self, tag): warnings.warn("tagByName() will go away in a furture version of Yum.\n", -@@ -1447,7 +1520,7 @@ class YumHeaderPackage(YumAvailablePackage): +@@ -1447,7 +1523,7 @@ class YumHeaderPackage(YumAvailablePackage): raise NotImplementedError() def _size(self): @@ -156408,7 +156455,7 @@ index bfc49b7..9ddcae6 100644 b = parsever(b) diff --git a/yum/rpmsack.py b/yum/rpmsack.py -index e289a7a..4f2ccd0 100644 +index e289a7a..ed8e3d1 100644 --- a/yum/rpmsack.py +++ b/yum/rpmsack.py @@ -48,6 +48,17 @@ def _open_no_umask(*args): @@ -156429,6 +156476,15 @@ index e289a7a..4f2ccd0 100644 def _iopen(*args): """ IOError wrapper BS for open, stupid exceptions. """ try: +@@ -119,7 +130,7 @@ class RPMInstalledPackage(YumInstalledPackage): + + def required_packages(self): + pkgset = set() +- for (reqn, reqf, reqevr) in self.requires: ++ for (reqn, reqf, reqevr) in self.strong_requires: + for pkg in self.rpmdb.getProvides(reqn, reqf, reqevr): + if pkg != self: + pkgset.add(pkg) @@ -364,7 +375,8 @@ class RPMDBPackageSack(PackageSackBase): pkg = self.searchNevra(n, e, v, r, a) if not pkg: @@ -156467,6 +156523,15 @@ index e289a7a..4f2ccd0 100644 except (IOError, OSError), e: return +@@ -1456,7 +1469,7 @@ class RPMDBPackageSack(PackageSackBase): + providers = set() # Speedup, as usual :) + problems = [] + for pkg in sorted(pkgs): # The sort here is mainly for "UI" +- for rreq in pkg.requires: ++ for rreq in pkg.strong_requires: + if rreq[0].startswith('rpmlib'): continue + if rreq in providers: continue + @@ -1562,11 +1575,11 @@ class RPMDBAdditionalData(object): self._packages = {} # pkgid = dir if not os.path.exists(self.conf.db_path): @@ -156641,6 +156706,25 @@ index 4d89d83..97de8f0 100644 def getNewProvides(self, name, flag=None, version=(None, None, None)): """return dict { packages -> list of matching provides } +diff --git a/yum/update_md.py b/yum/update_md.py +index 2cb1acb..7da6a08 100644 +--- a/yum/update_md.py ++++ b/yum/update_md.py +@@ -79,8 +79,14 @@ class UpdateNotice(object): + + def __getitem__(self, item): + """ Allows scriptable metadata access (ie: un['update_id']). """ ++ if type(item) is int: ++ return sorted(self._md)[item] + return self._md.get(item) or None + ++ def __contains__(self, item): ++ """ Allows quick tests for foo in blah. """ ++ return item in self._md ++ + def __setitem__(self, item, val): + self._md[item] = val + diff --git a/yum/yumRepo.py b/yum/yumRepo.py index e5e9ece..62e53f8 100644 --- a/yum/yumRepo.py @@ -156762,7 +156846,7 @@ index e5e9ece..62e53f8 100644 return None raise diff --git a/yumcommands.py b/yumcommands.py -index 4dcbea7..bb4dde8 100644 +index 4dcbea7..9c181ec 100644 --- a/yumcommands.py +++ b/yumcommands.py @@ -43,16 +43,24 @@ def _err_mini_usage(base, basecmd): @@ -156921,7 +157005,8 @@ index 4dcbea7..bb4dde8 100644 + :param *args: additional arguments associated with the message + """ if not self.done_command_once: - base.verbose_logger.info(msg, *args) +- base.verbose_logger.info(msg, *args) ++ base.verbose_logger.info(logginglevels.INFO_2, msg, *args) self.done_command_once = True def getNames(self): diff --git a/yum.spec b/yum.spec index 7b64995..aa88ee8 100644 --- a/yum.spec +++ b/yum.spec @@ -18,7 +18,7 @@ Summary: RPM package installer/updater/manager Name: yum Version: 3.4.3 -Release: 22%{?dist} +Release: 23%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz @@ -29,7 +29,7 @@ Patch4: no-more-exactarchlist.patch Patch5: geode-arch.patch Patch6: yum-HEAD.patch Patch7: yum-ppc64-preferred.patch -Patch9: yum-silence.patch +Patch8: BZ-803346-no-only-update.patch Patch20: yum-manpage-files.patch Patch21: 0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch @@ -138,7 +138,7 @@ Install this package if you want auto yum updates nightly via cron. %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch9 -p1 +%patch8 -p1 %patch20 -p1 %patch1 -p1 @@ -314,6 +314,11 @@ exit 0 %endif %changelog +* Fri Mar 16 2012 James Antill - 3.4.3-23 +- update to latest HEAD. +- Also fix "yum check" for strong requires. bug 795907. +- Fix for "Only update available" on downgrade. bug 803346. + * Mon Mar 12 2012 James Antill - 3.4.3-22 - Sync with F17/rawhide. - Fixes translations. From 38ce167286ac827e62b8b8156262352be04bbda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20Pavlas?= Date: Thu, 26 Apr 2012 13:06:06 +0200 Subject: [PATCH 10/12] backported completion-helper.py patches from HEAD, BZ 809469. --- BZ-809469-completion-helper.patch | 68 +++++++++++++++++++++++++++++++ yum.spec | 7 +++- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 BZ-809469-completion-helper.patch diff --git a/BZ-809469-completion-helper.patch b/BZ-809469-completion-helper.patch new file mode 100644 index 0000000..d98652a --- /dev/null +++ b/BZ-809469-completion-helper.patch @@ -0,0 +1,68 @@ +diff --git a/completion-helper.py b/completion-helper.py +index 405ceab..71de058 100755 +--- a/completion-helper.py ++++ b/completion-helper.py +@@ -69,6 +69,8 @@ def get_pattern(extcmds): + + def main(args): + base = cli.YumBaseCli() ++ # We want the default cachedir but commit 0f034091 does not. ++ base.setCacheDir = lambda *x: True # monkeypatch + base.yum_cli_commands.clear() + base.registerCommand(GroupsCompletionCommand()) + base.registerCommand(ListCompletionCommand()) +commit 6351d7bbb6957e7c739a674696fcc5d7d31ecb17 +Author: Zdeněk Pavlas +Date: Wed Apr 4 13:36:36 2012 +0200 + + completion-helper: skip unavailable repos. BZ 809469. + + completion-helper uses --cacheonly option to avoid metadata + download, so new (or cleaned up) repos raise exceptions. + + We work this around by setting skip_if_unavailable=1 on all + enabled repositories. + +diff --git a/completion-helper.py b/completion-helper.py +index e4164f7..2e95ced 100755 +--- a/completion-helper.py ++++ b/completion-helper.py +@@ -74,6 +74,8 @@ def main(args): + base.registerCommand(RepoListCompletionCommand()) + base.getOptionsConfig(args) + base.parseCommands() ++ for repo in base.repos.listEnabled(): ++ repo.skip_if_unavailable = True + base.doCommands() + + if __name__ == "__main__": +commit 6d8a99b413698b117b787fb8d69abeba4fbe7826 +Author: Zdeněk Pavlas +Date: Thu Apr 5 11:08:08 2012 +0200 + + completion_helper: catch GroupsError. BZ 806844. + +diff --git a/completion-helper.py b/completion-helper.py +index 2e95ced..405ceab 100755 +--- a/completion-helper.py ++++ b/completion-helper.py +@@ -23,6 +23,7 @@ import sys + + import cli + import yumcommands ++from yum.Errors import GroupsError + + + class GroupsCompletionCommand(yumcommands.GroupsCommand): +@@ -76,7 +77,10 @@ def main(args): + base.parseCommands() + for repo in base.repos.listEnabled(): + repo.skip_if_unavailable = True +- base.doCommands() ++ try: ++ base.doCommands() ++ except GroupsError, e: ++ base.logger.error(e) + + if __name__ == "__main__": + try: diff --git a/yum.spec b/yum.spec index aa88ee8..95665ed 100644 --- a/yum.spec +++ b/yum.spec @@ -18,7 +18,7 @@ Summary: RPM package installer/updater/manager Name: yum Version: 3.4.3 -Release: 23%{?dist} +Release: 24%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz @@ -32,6 +32,7 @@ Patch7: yum-ppc64-preferred.patch Patch8: BZ-803346-no-only-update.patch Patch20: yum-manpage-files.patch Patch21: 0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch +Patch22: BZ-809469-completion-helper.patch URL: http://yum.baseurl.org/ BuildArchitectures: noarch @@ -140,6 +141,7 @@ Install this package if you want auto yum updates nightly via cron. %patch7 -p1 %patch8 -p1 %patch20 -p1 +%patch22 -p1 %patch1 -p1 %build @@ -314,6 +316,9 @@ exit 0 %endif %changelog +* Thu Apr 26 2012 Zdenek Pavlas - 3.4.3-24 +- backported completion-helper.py patches from HEAD, BZ 809469. + * Fri Mar 16 2012 James Antill - 3.4.3-23 - update to latest HEAD. - Also fix "yum check" for strong requires. bug 795907. From cb699f6c49100a684d4ca51b7e63c78f213cb22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20Pavlas?= Date: Fri, 4 May 2012 15:32:18 +0200 Subject: [PATCH 11/12] revert the setCacheDir() override --- BZ-809469-completion-helper.patch | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/BZ-809469-completion-helper.patch b/BZ-809469-completion-helper.patch index d98652a..3dd92db 100644 --- a/BZ-809469-completion-helper.patch +++ b/BZ-809469-completion-helper.patch @@ -1,16 +1,3 @@ -diff --git a/completion-helper.py b/completion-helper.py -index 405ceab..71de058 100755 ---- a/completion-helper.py -+++ b/completion-helper.py -@@ -69,6 +69,8 @@ def get_pattern(extcmds): - - def main(args): - base = cli.YumBaseCli() -+ # We want the default cachedir but commit 0f034091 does not. -+ base.setCacheDir = lambda *x: True # monkeypatch - base.yum_cli_commands.clear() - base.registerCommand(GroupsCompletionCommand()) - base.registerCommand(ListCompletionCommand()) commit 6351d7bbb6957e7c739a674696fcc5d7d31ecb17 Author: Zdeněk Pavlas Date: Wed Apr 4 13:36:36 2012 +0200 From c9f974a35e91787ddcbe46c8cc81ec092eaaac4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20Pavlas?= Date: Wed, 1 Aug 2012 17:38:32 +0200 Subject: [PATCH 12/12] Fix traceback when querying available package's strong requires. --- handle-strong-requires-of-avail-po.patch | 27 ++++++++++++++++++++++++ yum.spec | 7 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 handle-strong-requires-of-avail-po.patch diff --git a/handle-strong-requires-of-avail-po.patch b/handle-strong-requires-of-avail-po.patch new file mode 100644 index 0000000..2825eb7 --- /dev/null +++ b/handle-strong-requires-of-avail-po.patch @@ -0,0 +1,27 @@ +commit eb245abe8272da41f484680c5a88518798b15071 +Author: Zdeněk Pavlas +Date: Tue May 15 18:44:19 2012 +0200 + + Handle avail_po.returnPrco('strong_requires') + + Don't traceback when querying available package's strong requires. + Return all requires instead. This is incorrect, but conservative + and should work as expected in most use cases. + + https://fedorahosted.org/autoqa/ticket/421 + +diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py +index f6df93e..ba929de 100644 +--- a/yum/sqlitesack.py ++++ b/yum/sqlitesack.py +@@ -382,6 +382,10 @@ class YumAvailablePackageSqlite(YumAvailablePackage, PackageObject, RpmBase): + + def returnPrco(self, prcotype, printable=False): + prcotype = _share_data(prcotype) ++ if prcotype == 'strong_requires': ++ # pkg not installed so we don't know require flags yet ++ # returning all requires should work in most cases ++ prcotype = 'requires' + if isinstance(self.prco[prcotype], tuple): + sql = "SELECT name, version, release, epoch, flags " \ + "FROM %s WHERE pkgKey = ?" % prcotype diff --git a/yum.spec b/yum.spec index 95665ed..e3fa379 100644 --- a/yum.spec +++ b/yum.spec @@ -18,7 +18,7 @@ Summary: RPM package installer/updater/manager Name: yum Version: 3.4.3 -Release: 24%{?dist} +Release: 25%{?dist} License: GPLv2+ Group: System Environment/Base Source0: http://yum.baseurl.org/download/3.4/%{name}-%{version}.tar.gz @@ -33,6 +33,7 @@ Patch8: BZ-803346-no-only-update.patch Patch20: yum-manpage-files.patch Patch21: 0001-Set-_depsolving_failed-as-soon-as-buildTransaction-i.patch Patch22: BZ-809469-completion-helper.patch +Patch23: handle-strong-requires-of-avail-po.patch URL: http://yum.baseurl.org/ BuildArchitectures: noarch @@ -142,6 +143,7 @@ Install this package if you want auto yum updates nightly via cron. %patch8 -p1 %patch20 -p1 %patch22 -p1 +%patch23 -p1 %patch1 -p1 %build @@ -316,6 +318,9 @@ exit 0 %endif %changelog +* Wed Aug 1 2012 Zdenek Pavlas - 3.4.3-25 +- Don't traceback when querying available package's strong requires. + * Thu Apr 26 2012 Zdenek Pavlas - 3.4.3-24 - backported completion-helper.py patches from HEAD, BZ 809469.