Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31932 - [etcat] "etcat -v" doesn't sort well revisions versions
Summary: [etcat] "etcat -v" doesn't sort well revisions versions
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal
Assignee: Alastair Tse (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-24 10:59 UTC by Julien Allanos (RETIRED)
Modified: 2011-10-30 22:18 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixes the vercmp function to work with versions of different lengths. (etcat-vercmp.diff,304 bytes, patch)
2003-10-24 20:27 UTC, Doug Weimer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Allanos (RETIRED) gentoo-dev 2003-10-24 10:59:27 UTC
maybe etcat should handle more carefully the revision versions of a package, in etcat -v output.

~$ etcat -v sys-devel/distcc
[ Results for search key : sys-devel/distcc ]
[ Applications found : 1 ]

*  sys-devel/distcc :
        [   ] sys-devel/distcc-2.5-r1 (0)
        [   ] sys-devel/distcc-2.8-r2 (0)
        [   ] sys-devel/distcc-2.9 (0)
        [M~ ] sys-devel/distcc-2.10-r3 (0)
        [  I] sys-devel/distcc-2.11.1 (0)
        [M~ ] sys-devel/distcc-2.11.1-r1 (0)
        [M~ ] sys-devel/distcc-2.11-r1 (0)
        [M~ ] sys-devel/distcc-2.11-r2 (0)
        [M~ ] sys-devel/distcc-2.11.2 (0)

i would prefer seeing distcc-2.11-r1 and -r2 before distcc-2.11.1, because they are revisions of 2.11 version, so they're related to 2.11, and 2.11.1 is a version that comes after 2.11.
Comment 1 Doug Weimer 2003-10-24 20:27:57 UTC
Created attachment 19752 [details, diff]
Fixes the vercmp function to work with versions of different lengths.

The vercmp function compares versions by looping through len(a_ver), so if
b_ver is longer it isn't handled correctly. This patch handles the case where
b_ver is longer.
Comment 2 Alastair Tse (RETIRED) gentoo-dev 2003-10-30 01:26:26 UTC
just for completeness, can you tell me which version of gentoolkit you have
installed?
Comment 3 Doug Weimer 2003-10-30 07:49:05 UTC
Sorry, I forgot about that. I made the patch against gentoolkit-0.1.33.
Comment 4 Florian Ehrenthal 2004-02-07 07:47:24 UTC
latest gentoolkit  (etcat) is even worse:
etcat -v distcc
[ Results for search key           : distcc ]
[ Candidate applications found : 7 ]

 Only printing found installed programs.

*  sys-devel/distcc-2.5-r1 :
        [   ] 2.5-r1 (0)

*  sys-devel/distcc-2.8-r2 :
        [   ] 2.8-r2 (0)

*  sys-devel/distcc-2.9 :
        [   ] 2.9 (0)

*  sys-devel/distcc-2.11.1 :
        [   ] 2.11.1 (0)

*  sys-devel/distcc-2.11.2 :
        [ ~ ] 2.11.2 (0)

*  sys-devel/distcc-2.11.2-r1 :
        [ ~ ] 2.11.2-r1 (0)

*  sys-devel/distcc-2.12.1 :
        [ ~ ] 2.12.1 (0)


output is really space consuming :(
Comment 5 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2004-02-07 19:31:34 UTC
i agree with comment #4 ... etcat 0.3.1 needlessly repeats the version number of the package.
let's go back to the 'grouped' output as shown in the initial bug report (etcat <= 0.2.0).

thanks
Comment 6 Alastair Tse (RETIRED) gentoo-dev 2004-02-08 00:54:46 UTC
i don't agree with this change either, but it wasn't in my control. karl, any comments?
Comment 7 Julien Allanos (RETIRED) gentoo-dev 2004-02-16 15:55:14 UTC
at least, etcat from gentoolkit-0.2.0_pre6 correct the initial problem. maybe the bug should be marked as resolved.
now it's true, i'd like to see the space consuming problem fixed.
Comment 8 Julien Allanos (RETIRED) gentoo-dev 2004-03-24 07:39:57 UTC
it seems etcat from gentoolkit-0.2.0_pre7 solves both problems:
1-order for revision versions is respected,
2-space consuming problem is solved.
i believe this bug can be closed.
Comment 9 Rajiv Aaron Manglani (RETIRED) gentoo-dev 2004-03-24 22:33:31 UTC
fixed in gentoolkit-0.2.0_pre7