[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-dev] [Bug #2458] sorting order
From: |
nobody |
Subject: |
[Savannah-dev] [Bug #2458] sorting order |
Date: |
Wed, 23 Apr 2003 07:17:48 -0400 |
=================== BUG #2458: LATEST MODIFICATIONS ==================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2458&group_id=11
Changes by: Mathieu Roy <address@hidden>
Date: Wed 04/23/03 at 13:17 (Europe/Paris)
------------------ Additional Follow-up Comments ----------------------------
By oldest-file date can be problematic because we cannot be sure that people
will/have only add/added files in a chronological order (people who started the
project outside savannah).
So we cannot fix that this way. As currently the file list works without
database request and I to keep it that way, maybe we can have an easy
workaround :
how about, when listing subdirectories for a /upload/*.pkg/ , looking for a
.option file? If in this file, Savannah found "DATE_ORDER", it will list
content by date, instead of by number.
It may be a good solution, until we add a parser for package versions name
(which I technically would like to avoid, because it may consume lot of CPU and
be anyway very slow for a big list - PHP do not handle well this kind of
operations, unlike perl).
What do you think?
We may even add more options, like "DO_NOT_LIST" to ignore a subdirectory etc.
=================== BUG #2458: FULL BUG SNAPSHOT ===================
Submitted by: lalo Project: Savannah
Submitted on: Mon 02/03/03 at 22:18
Category: Download area Severity: 1 - Enhancement
Priority: None Bug Group: None
Resolution: Later Assigned to: yeupou
Status: Open Effort: 0.00
Summary: sorting order
Original Submission: The sorting order seems to be ascii now. It should sort
so that "1.0alpha1" is earlier than "1.0beta1" and both are earlier than "1.0"
which is earlier than "1.0.1".
A good source for how to do this is Debian's (as seen in dpkg) sorting order.
Follow-up Comments
*******************
-------------------------------------------------------
Date: Wed 04/23/03 at 13:17 By: yeupou
By oldest-file date can be problematic because we cannot be sure that people
will/have only add/added files in a chronological order (people who started the
project outside savannah).
So we cannot fix that this way. As currently the file list works without
database request and I to keep it that way, maybe we can have an easy
workaround :
how about, when listing subdirectories for a /upload/*.pkg/ , looking for a
.option file? If in this file, Savannah found "DATE_ORDER", it will list
content by date, instead of by number.
It may be a good solution, until we add a parser for package versions name
(which I technically would like to avoid, because it may consume lot of CPU and
be anyway very slow for a big list - PHP do not handle well this kind of
operations, unlike perl).
What do you think?
We may even add more options, like "DO_NOT_LIST" to ignore a subdirectory etc.
-------------------------------------------------------
Date: Wed 04/23/03 at 11:59 By: ydirson
I have a worse case with sgml2x
(https://savannah.nongnu.org/files/?group=alcovebook), where 0.99.10 is listed
between 0.99.1 and 0.99.2, which makes it completely hidden to the quick-glance
type of person.
Why not sorting by oldest-file date ? That should be accurate enough ?
-------------------------------------------------------
Date: Mon 02/10/03 at 18:01 By: lalo
don't feel any hurry, Severity: Enhancement and Resolution: Later sound good
for me. Thanks for your attention
-------------------------------------------------------
Date: Mon 02/10/03 at 17:44 By: yeupou
Ok, I'll try to fix that in this way.
-------------------------------------------------------
Date: Mon 02/10/03 at 17:13 By: lalo
How is it correct? 1.0 should be listed first, that's what this request is
about.
There is a simple algorythim to correctly sort as I described, dpkg implements
it and the Debian developers documentation describes it. Let me search for a
link... http://www.debian.org/doc/debian-policy/ch-versions.html
I was wrong on one account: dpkg sorts 1.0 as smaller than 1.0alpha. This is
easy to fix if the algorythim described above is used; it says "all letters
sort lower than non-letters", I would add, letters also sort lower than NULL.
This is, in my experience, a "coherent" naming policy, similar to what I've
seen used in the last 15 years.
(I could, and probably will, get around my personal itch by renaming 1.0 to
1.0.0, so don't see this as a personal request.)
-------------------------------------------------------
Date: Mon 02/10/03 at 16:28 By: yeupou
Ok, I seen the error message.
But the sorting in itself is ok, no ?
We have
1.0a2
pax-1.0a2.tar.bz2 19.16KB tar.bz2 2003-02-03
1.0a1
pax-1.0a1.tar.bz2 15.17KB tar.bz2 2003-02-03
1.0
Which is correct.
But for " 1.0alpha1" is earlier than "1.0beta1" and both are earlier than "1.0"
which is earlier than "1.0.1" ", I'm not convinced : it means implementing a
complex way to sort files by asking the software to interpret version's name.
Which is a bloat: we would have to guess every cases possibles, which is not
feasible in the long run and which generate extra load.
The better solution is for developers to stick to coherent naming policy: and
number and alphabet is I think to more coherent choice in latin-based societies.
Other arguments?
The bug in pax is in fact just the fact that the content of 1.0 is empty. The
message would be more explicit but it not right now a priority.
-------------------------------------------------------
Date: Tue 02/04/03 at 15:48 By: lalo
http://savannah.nongnu.org/files/?group=opental on the "pax" thread below. It
even gives an error message: "Warning: Wrong datatype in sort() call in
/subversions/sourceforge/src/savannah/www/files/index.php on line 122"
-------------------------------------------------------
Date: Tue 02/04/03 at 12:17 By: yeupou
Can you show me an example of incorrect sorting?
-------------------------------------------------------
Date: Mon 02/03/03 at 22:23 By: lalo
I suppose I could try to understand how it does sorting based on the code on
cvs, but php reads more or less like an alien language to me (alien as on, from
other planet, not other country)
CC List
*******
CC Address | Comment
------------------------------------+-----------------------------
address@hidden | I'm hit !
No files currently attached
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2458&group_id=11