=================== BUG #2458: FULL BUG SNAPSHOT =================== http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2458&group_id=11
Soumis par: lalo Projet: Savannah Signalé le: lun 03.02.2003 à 22:18 Category: Download area Severity: 1 - Enhancement Priority: None Resolution: Later Assigned to: yeupou Status: Open Fixed Release: 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: mer 23.04.2003 à 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: mer 23.04.2003 à 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: lun 10.02.2003 à 18:01 By: lalo don't feel any hurry, Severity: Enhancement and Resolution: Later sound good for me. Thanks for your attention ------------------------------------------------------- Date: lun 10.02.2003 à 17:44 By: yeupou Ok, I'll try to fix that in this way. ------------------------------------------------------- Date: lun 10.02.2003 à 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: lun 10.02.2003 à 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: mar 04.02.2003 à 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: mar 04.02.2003 à 12:17 By: yeupou Can you show me an example of incorrect sorting? ------------------------------------------------------- Date: lun 03.02.2003 à 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 ------------------------------------+----------------------------- [EMAIL PROTECTED] | I'm hit ! Il n'y a aucun fichier attaché actuellement For detailed info, follow this link: http://savannah.gnu.org/bugs/?func=detailbug&bug_id=2458&group_id=11 _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
