Bug 423251 - Feature request: Make bodhi -l a bit more usable
Summary: Feature request: Make bodhi -l a bit more usable
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: bodhi
Version: 8
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-13 12:12 UTC by Lubomir Kundrak
Modified: 2016-09-20 02:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-18 20:02:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.