Bug 423251

Summary: Feature request: Make bodhi -l a bit more usable
Product: [Fedora] Fedora Reporter: Lubomir Kundrak <lkundrak>
Component: bodhiAssignee: Luke Macken <lmacken>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: a.badger, pfrields, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-12-18 20:02:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lubomir Kundrak 2007-12-13 12:12:08 UTC
Description of problem:

$ bodhi -l0 -t security
and
$ bodhi -l-0 -t security

Yield

HTTP Error 500: Internal error
HTTP Error 500: Internal error
$ 

$ bodhi -l-1 -t security
...
259 updates found (258 shown)
$

It would be desirable if any these meant "no limit".

Comment 1 Luke Macken 2007-12-14 16:51:36 UTC
Toshio filed a ticket upstream that contains a patch to fix this:
http://trac.turbogears.org/ticket/1629

Comment 2 Lubomir Kundrak 2007-12-14 18:12:15 UTC
I disagree with that patch. Setting pagination to 0 should return no items at
all. It would be usable to just get the number of items in list. I suggest that
-1 be used instead.

Comment 3 Toshio Ernie Kuratomi 2007-12-14 20:05:10 UTC
-1 already has a meaning to paginate:  it means all elements except the last one.
Similarly, -2 means all but the last two, etc.

Comment 4 Lubomir Kundrak 2007-12-14 21:09:42 UTC
Toshio: I noticed that. Still it makes little sense to me -- why would one want
that? I thought it is just a side effect of python array slicing.

Comment 5 Toshio Ernie Kuratomi 2007-12-14 23:15:37 UTC
There's plans to make it mean last page, -2, second from last, etc, which is better:
 
http://groups.google.com/group/turbogears/browse_thread/thread/751f9013caf40801/37f25aca364ecd21?lnk=gst&q=paginate#37f25aca364ecd21

In any case, negative numbers are allocated to an upstream "feature" whereas 0
is currently an upstream bug.

Comment 6 Toshio Ernie Kuratomi 2007-12-14 23:23:12 UTC
Sorry.  Wrong tg_paginate variable being referenced in that thread.

Feel free to propose a different patch upstream.

Comment 7 Lubomir Kundrak 2007-12-18 08:26:28 UTC
No need to. I am happy with the current one and your explanation.

Comment 8 Luke Macken 2007-12-18 20:02:07 UTC
I just pushed out a new version of TurboGears with Toshio's paginate patch,
which should resolve this issue.

Comment 9 Fedora Update System 2007-12-20 19:50:23 UTC
bodhi-0.4.8-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bodhi'

Comment 10 Fedora Update System 2007-12-20 20:15:06 UTC
bodhi-0.4.8-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update bodhi'

Comment 11 Fedora Update System 2007-12-28 17:14:50 UTC
bodhi-0.4.8-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2007-12-28 17:15:57 UTC
bodhi-0.4.8-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.