Re: [Yum-devel] [PATCH 1/2] Move rpm version comparison flags from depsolve to rpmsack

2011-02-15 Thread Toshio Kuratomi
On Wed, Feb 16, 2011 at 09:15:25AM +0200, Panu Matilainen wrote: > > Consider module "foo" importing "os", because it needs stuff from > there to do its business. Somebody is developing a piece of code > utilizing the "foo" module, and notices "hey its importing os, how > convenient - now I dont h

Re: [Yum-devel] [PATCH 1/2] Move rpm version comparison flags from depsolve to rpmsack

2011-02-15 Thread Panu Matilainen
On 02/15/2011 05:07 PM, James Antill wrote: On Tue, 2011-02-15 at 13:06 +0200, Panu Matilainen wrote: Avoids unnecessary import dependency from rpmsack to the higher level depsolve class, allowing rpmsack to be used earlier. --- yum/depsolve.py |7 +-- yum/rpmsack.py | 11 -

Re: [Yum-devel] [PATCH 1/2] Move rpm version comparison flags from depsolve to rpmsack

2011-02-15 Thread Panu Matilainen
On 02/15/2011 10:10 PM, James Antill wrote: On Tue, 2011-02-15 at 20:29 +0200, Panu Matilainen wrote: On 02/15/2011 05:07 PM, James Antill wrote: Technically this is an API change, but I really hope nobody is relying on it. API users shouldn't really see a difference as it's depsolve.py im

[Yum-devel] Building out the test suite

2011-02-15 Thread David Malcolm
Something that's been very successful for the development of Python itself is having a policy that all patches need to be accompanied by a test that verifies the correct working of the new code. This is one of the things that is done on patch review. See e.g.: http://docs.python.org/devguide/pa

Re: [Yum-devel] [PATCH 1/2] Move rpm version comparison flags from depsolve to rpmsack

2011-02-15 Thread James Antill
On Tue, 2011-02-15 at 20:29 +0200, Panu Matilainen wrote: > On 02/15/2011 05:07 PM, James Antill wrote: > > Technically this is an API change, but I really hope nobody is relying > > on it. > > API users shouldn't really see a difference as it's depsolve.py imports > the moved flags with the or

Re: [Yum-devel] [PATCH 1/2] Move rpm version comparison flags from depsolve to rpmsack

2011-02-15 Thread Panu Matilainen
On 02/15/2011 05:07 PM, James Antill wrote: On Tue, 2011-02-15 at 13:06 +0200, Panu Matilainen wrote: Avoids unnecessary import dependency from rpmsack to the higher level depsolve class, allowing rpmsack to be used earlier. --- yum/depsolve.py |7 +-- yum/rpmsack.py | 11 -

Re: [Yum-devel] [PATCH] Use rpmsack returnGPGPubkeyPackages() in YumBase.gpgKeyCheck()

2011-02-15 Thread Panu Matilainen
On 02/15/2011 06:12 PM, James Antill wrote: On Tue, 2011-02-15 at 17:17 +0200, Panu Matilainen wrote: On 02/15/2011 04:56 PM, James Antill wrote: On Tue, 2011-02-15 at 11:54 +0200, Panu Matilainen wrote: Reduces code duplication and unnecessary rpmdb reopens. The rpmdb gets opened shortly afte

Re: [Yum-devel] [PATCH] Use rpmsack returnGPGPubkeyPackages() in YumBase.gpgKeyCheck()

2011-02-15 Thread James Antill
On Tue, 2011-02-15 at 17:17 +0200, Panu Matilainen wrote: > On 02/15/2011 04:56 PM, James Antill wrote: > > On Tue, 2011-02-15 at 11:54 +0200, Panu Matilainen wrote: > >> Reduces code duplication and unnecessary rpmdb reopens. The rpmdb > >> gets opened shortly afterwards anyway and closed before a

[Yum-devel] [PATCH] Fix printing the obsoleters message, BZ 677666.

2011-02-15 Thread James Antill
Happened due to the cleanup in 94d742bf395cc565cf3a0dca138608a9296b1303 giving us a bad "continue". --- yum/__init__.py |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/yum/__init__.py b/yum/__init__.py index e395cc5..a3a1b02 100644 --- a/yum/__init__.py +++ b/yum/__init__

Re: [Yum-devel] [PATCH 4/4] Use _get_packages() instead of ts.dbMatch() in rpmsack where possible

2011-02-15 Thread Panu Matilainen
On 02/15/2011 04:51 PM, James Antill wrote: On Tue, 2011-02-15 at 10:10 +0200, Panu Matilainen wrote: Deal with gpg-pubkey filtering and auto_close centrally, eliminating the possibility of accidentally leaving zombie rpmdb iterators behind and also reducing code duplication. --- yum/rpmsack.p

Re: [Yum-devel] [PATCH] Use rpmsack returnGPGPubkeyPackages() in YumBase.gpgKeyCheck()

2011-02-15 Thread Panu Matilainen
On 02/15/2011 04:56 PM, James Antill wrote: On Tue, 2011-02-15 at 11:54 +0200, Panu Matilainen wrote: Reduces code duplication and unnecessary rpmdb reopens. The rpmdb gets opened shortly afterwards anyway and closed before any downloads so there should be no unwanted side-effects. --- yum/__i

Re: [Yum-devel] [PATCH 2/2] Use rpmsack for retrieving system release version

2011-02-15 Thread seth vidal
On Tue, 2011-02-15 at 10:08 -0500, James Antill wrote: > On Tue, 2011-02-15 at 13:06 +0200, Panu Matilainen wrote: > > Avoids another lowlevel rpm routine usage where rpmsack provides > > a nicer interface for the thing, and another step towards consolidating > > rpm quirk handling to one spot. >

Re: [Yum-devel] [PATCH 2/2] Use rpmsack for retrieving system release version

2011-02-15 Thread James Antill
On Tue, 2011-02-15 at 13:06 +0200, Panu Matilainen wrote: > Avoids another lowlevel rpm routine usage where rpmsack provides > a nicer interface for the thing, and another step towards consolidating > rpm quirk handling to one spot. This makes me twitch a bit, it just seems wrong to have config d

Re: [Yum-devel] [PATCH 1/2] Move rpm version comparison flags from depsolve to rpmsack

2011-02-15 Thread James Antill
On Tue, 2011-02-15 at 13:06 +0200, Panu Matilainen wrote: > Avoids unnecessary import dependency from rpmsack to the higher > level depsolve class, allowing rpmsack to be used earlier. > --- > yum/depsolve.py |7 +-- > yum/rpmsack.py | 11 --- > 2 files changed, 9 insertions(+),

Re: [Yum-devel] [PATCH] Use rpmsack returnGPGPubkeyPackages() in YumBase.gpgKeyCheck()

2011-02-15 Thread James Antill
On Tue, 2011-02-15 at 11:54 +0200, Panu Matilainen wrote: > Reduces code duplication and unnecessary rpmdb reopens. The rpmdb > gets opened shortly afterwards anyway and closed before any downloads > so there should be no unwanted side-effects. > --- > yum/__init__.py |9 + > 1 files c

Re: [Yum-devel] [PATCH] Unbreak checkGPGKey()

2011-02-15 Thread James Antill
On Tue, 2011-02-15 at 11:27 +0200, Panu Matilainen wrote: > repo.gpgkey is a list, not a string, since at least 2005 > --- > yumcommands.py |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) ACK. ___ Yum-devel mailing list Yum-devel@lists.b

Re: [Yum-devel] [PATCH 4/4] Use _get_packages() instead of ts.dbMatch() in rpmsack where possible

2011-02-15 Thread James Antill
On Tue, 2011-02-15 at 10:10 +0200, Panu Matilainen wrote: > Deal with gpg-pubkey filtering and auto_close centrally, > eliminating the possibility of accidentally leaving zombie rpmdb > iterators behind and also reducing code duplication. > --- > yum/rpmsack.py | 70 > --

[Yum-devel] [PATCH 2/2] Use rpmsack for retrieving system release version

2011-02-15 Thread Panu Matilainen
Avoids another lowlevel rpm routine usage where rpmsack provides a nicer interface for the thing, and another step towards consolidating rpm quirk handling to one spot. --- yum/config.py | 15 ++- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/yum/config.py b/yum/conf

[Yum-devel] [PATCH 1/2] Move rpm version comparison flags from depsolve to rpmsack

2011-02-15 Thread Panu Matilainen
Avoids unnecessary import dependency from rpmsack to the higher level depsolve class, allowing rpmsack to be used earlier. --- yum/depsolve.py |7 +-- yum/rpmsack.py | 11 --- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/yum/depsolve.py b/yum/depsolve.py index

[Yum-devel] [PATCH] Use rpmsack returnGPGPubkeyPackages() in YumBase.gpgKeyCheck()

2011-02-15 Thread Panu Matilainen
Reduces code duplication and unnecessary rpmdb reopens. The rpmdb gets opened shortly afterwards anyway and closed before any downloads so there should be no unwanted side-effects. --- yum/__init__.py |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/yum/__init__.py

[Yum-devel] [PATCH] Unbreak checkGPGKey()

2011-02-15 Thread Panu Matilainen
repo.gpgkey is a list, not a string, since at least 2005 --- yumcommands.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/yumcommands.py b/yumcommands.py index 45cd209..f196477 100644 --- a/yumcommands.py +++ b/yumcommands.py @@ -46,7 +46,7 @@ def checkRootUID(base): d

[Yum-devel] [PATCH 4/4] Use _get_packages() instead of ts.dbMatch() in rpmsack where possible

2011-02-15 Thread Panu Matilainen
Deal with gpg-pubkey filtering and auto_close centrally, eliminating the possibility of accidentally leaving zombie rpmdb iterators behind and also reducing code duplication. --- yum/rpmsack.py | 70 1 files changed, 15 insertions(+), 55 d

[Yum-devel] [PATCH 3/4] Eliminate long dead _header_from_index() internal helper

2011-02-15 Thread Panu Matilainen
--- yum/rpmsack.py | 22 -- 1 files changed, 0 insertions(+), 22 deletions(-) diff --git a/yum/rpmsack.py b/yum/rpmsack.py index 4e7f378..24e1d5d 100644 --- a/yum/rpmsack.py +++ b/yum/rpmsack.py @@ -1204,28 +1204,6 @@ class RPMDBPackageSack(PackageSackBase): if self

[Yum-devel] [PATCH 2/4] Generalize rpmsack _all_packages() helper to accept dbMatch arguments

2011-02-15 Thread Panu Matilainen
Rename to _get_packages() and accept arguments to be passed to dbMatch(), adjust callers. --- yum/rpmsack.py | 21 +++-- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/yum/rpmsack.py b/yum/rpmsack.py index 0982a7c..4e7f378 100644 --- a/yum/rpmsack.py +++ b/yum/r

[Yum-devel] [PATCH 0/4] Centralize rpmsack auto_close & friends

2011-02-15 Thread Panu Matilainen
Here's a cleaned up version of the idea from http://lists.baseurl.org/pipermail/yum-devel/2011-February/007894.html as a series of individual patches. Panu Matilainen (4): Support additional match patterns in a single call to ts.dbMatch() Generalize rpmsack _all_packages() helper to accept dbM

[Yum-devel] [PATCH 1/4] Support additional match patterns in a single call to ts.dbMatch()

2011-02-15 Thread Panu Matilainen
Rpm-level dbmatch iterator requires additional mi.pattern() calls for specifying extra match patterns. Hide this behind the ts wrapper, dbMatch() now optionally takes extra patterns as list of (tag, type, pattern) tuples. --- rpmUtils/transaction.py | 14 -- 1 files changed, 12 inser