Re: [Yum-devel] [yum-utils] package-graph

2011-02-24 Thread Ville Skyttä
> 0001-Update-arguments.patch Sorry for chiming in this late, but here's a few remarks about this patch: The man page (docs/repoquery.1) has not been updated with the new arguments. The patch adds some Dot() calls, but I don't see Dot() defined anywhere. _

Re: [Yum-devel] urlgrabber test suite failures

2011-02-24 Thread Ville Skyttä
On 02/24/2011 11:21 PM, Ville Skyttä wrote: > 2) test_readline() in test_byterange fails at the last line because it > ends up calling fo.readline(0) on the underlying StringIO object, which > apparently means that it will happily read past the range: > > $ python -c "import StringIO ; print Strin

[Yum-devel] urlgrabber test suite failures

2011-02-24 Thread Ville Skyttä
Hello, I'm running the urlgrabber test suite to test some local changes, and have two questions (which aren't related to my local changes) about two failing test cases: 1) http://urlgrabber.baseurl.org/test/test_post.php should apparently echo back data POSTed to it, but it returns the PHP source

Re: [Yum-devel] [yum-commits] urlgrabber/grabber.py

2011-02-24 Thread Ville Skyttä
On 02/24/2011 10:47 PM, seth vidal wrote: > hah. you're busting out the obscure today. Blame pyflakes ;) ___ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel

Re: [Yum-devel] [yum-commits] urlgrabber/grabber.py

2011-02-24 Thread seth vidal
On Thu, 2011-02-24 at 20:43 +, Ville Skyttä wrote: > urlgrabber/grabber.py |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > New commits: > commit d47bac8e4b5365074568e0fc237812bc86281fb1 > Author: Ville Skyttä > Date: Thu Feb 24 22:41:36 2011 +0200 > > Fix non-pycurl erro

Re: [Yum-devel] [PATCH 3/5] Eliminate linear search for names in callback

2011-02-24 Thread Panu Matilainen
On 02/24/2011 07:09 PM, James Antill wrote: On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: We only care if the name has been seen so a dict works for the purpose just as well and is faster. If we only need uniqueness ... can you use set() instead? Sure, why not. The only reason

Re: [Yum-devel] [PATCH 2/5] Remove unnecessary "magic number" test

2011-02-24 Thread seth vidal
On Thu, 2011-02-24 at 19:29 +0200, Panu Matilainen wrote: > On 02/24/2011 07:00 PM, seth vidal wrote: > > On Thu, 2011-02-24 at 18:20 +0200, Panu Matilainen wrote: > >> On 02/24/2011 06:06 PM, seth vidal wrote: > >>> On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: > RPMCALLBACK_TRANS

Re: [Yum-devel] [PATCH 2/5] Remove unnecessary "magic number" test

2011-02-24 Thread Panu Matilainen
On 02/24/2011 07:00 PM, seth vidal wrote: On Thu, 2011-02-24 at 18:20 +0200, Panu Matilainen wrote: On 02/24/2011 06:06 PM, seth vidal wrote: On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: RPMCALLBACK_TRANS_START is only issued once. That "bytes" happens to be a magic value of 6 is

Re: [Yum-devel] [PATCH 3/5] Eliminate linear search for names in callback

2011-02-24 Thread James Antill
On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: > We only care if the name has been seen so a dict works for the > purpose just as well and is faster. If we only need uniqueness ... can you use set() instead? ___ Yum-devel mailing list Yum-de

Re: [Yum-devel] [PATCH 5/5] Add a new opt-in callback mode where only txmbr is used as the key

2011-02-24 Thread seth vidal
On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: > We really only want the txmbr in the key, everything else can be > reached through it. This avoids copying any data around as txmbrs > reside in memory anyway, so the key is just a cheap reference > to what we already have. With the new ke

Re: [Yum-devel] [PATCH 4/5] Unify callback key guessworks into helper function

2011-02-24 Thread seth vidal
On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: > Add an internal helper method to deal with the changing key type, > and locate the associated txmbr object when possible. We can't find > it on erasures, but we always have a name so return (name, txmbr) tuples > to simplify life for calle

Re: [Yum-devel] [PATCH 2/5] Remove unnecessary "magic number" test

2011-02-24 Thread seth vidal
On Thu, 2011-02-24 at 18:20 +0200, Panu Matilainen wrote: > On 02/24/2011 06:06 PM, seth vidal wrote: > > On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: > >> RPMCALLBACK_TRANS_START is only issued once. That "bytes" happens > >> to be a magic value of 6 is just an artifact of truly ancie

Re: [Yum-devel] [PATCH 2/5] Remove unnecessary "magic number" test

2011-02-24 Thread Panu Matilainen
On 02/24/2011 06:06 PM, seth vidal wrote: On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: RPMCALLBACK_TRANS_START is only issued once. That "bytes" happens to be a magic value of 6 is just an artifact of truly ancient rpm versions from last century issuing RPMCALLBACK_TRANS_START more

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

2011-02-24 Thread seth vidal
On Thu, 2011-02-24 at 13:49 +0200, Panu Matilainen wrote: > On 02/15/2011 05:16 PM, seth vidal wrote: > > 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 > >>

Re: [Yum-devel] [PATCH 3/5] Eliminate linear search for names in callback

2011-02-24 Thread seth vidal
On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: > We only care if the name has been seen so a dict works for the > purpose just as well and is faster. > --- > yum/rpmtrans.py |4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/yum/rpmtrans.py b/yum/rpmtrans.

Re: [Yum-devel] [PATCH 1/5] Simplify callback file open/close

2011-02-24 Thread seth vidal
On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: > There's never more than one active file descriptor at a time so > no need to collect them to a dict, remove now unneeded _makeHandle(). > Also use a python file object and return its .fileno() instead of > the lowlevel os-routines. > --- >

Re: [Yum-devel] [PATCH 2/5] Remove unnecessary "magic number" test

2011-02-24 Thread seth vidal
On Thu, 2011-02-24 at 11:18 +0200, Panu Matilainen wrote: > RPMCALLBACK_TRANS_START is only issued once. That "bytes" happens > to be a magic value of 6 is just an artifact of truly ancient rpm > versions from last century issuing RPMCALLBACK_TRANS_START more than once. > --- > yum/rpmtrans.py |

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

2011-02-24 Thread Panu Matilainen
On 02/15/2011 05:16 PM, seth vidal wrote: 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

[Yum-devel] [PATCH 5/5] Add a new opt-in callback mode where only txmbr is used as the key

2011-02-24 Thread Panu Matilainen
We really only want the txmbr in the key, everything else can be reached through it. This avoids copying any data around as txmbrs reside in memory anyway, so the key is just a cheap reference to what we already have. With the new key -> txmbr helper in the callback, this is truly trivial to handle

[Yum-devel] [PATCH 4/5] Unify callback key guessworks into helper function

2011-02-24 Thread Panu Matilainen
Add an internal helper method to deal with the changing key type, and locate the associated txmbr object when possible. We can't find it on erasures, but we always have a name so return (name, txmbr) tuples to simplify life for callers. --- yum/rpmtrans.py | 138 ++

[Yum-devel] [PATCH 3/5] Eliminate linear search for names in callback

2011-02-24 Thread Panu Matilainen
We only care if the name has been seen so a dict works for the purpose just as well and is faster. --- yum/rpmtrans.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yum/rpmtrans.py b/yum/rpmtrans.py index 30c9dd3..cf06e0f 100644 --- a/yum/rpmtrans.py +++ b/yum/rpmtran

[Yum-devel] [PATCH 2/5] Remove unnecessary "magic number" test

2011-02-24 Thread Panu Matilainen
RPMCALLBACK_TRANS_START is only issued once. That "bytes" happens to be a magic value of 6 is just an artifact of truly ancient rpm versions from last century issuing RPMCALLBACK_TRANS_START more than once. --- yum/rpmtrans.py |9 - 1 files changed, 4 insertions(+), 5 deletions(-) dif

[Yum-devel] [PATCH 1/5] Simplify callback file open/close

2011-02-24 Thread Panu Matilainen
There's never more than one active file descriptor at a time so no need to collect them to a dict, remove now unneeded _makeHandle(). Also use a python file object and return its .fileno() instead of the lowlevel os-routines. --- yum/rpmtrans.py | 21 ++--- 1 files changed, 6 ins

[Yum-devel] [PATCH 0/5] Callback cleanups + opt-in mode for txmbr as key

2011-02-24 Thread Panu Matilainen
With the exception of patch 5, these are independent patches. However as they overlap in places, posting this as a series of patches, but please ack/nak individually on principle of what each patch does. Patches 1-3 are just cleanups / minor optimizations, but 1 and 3 can be considered API changes