Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409449 - app-portage/gentoolkit - eshowkw should sort SLOTs
Summary: app-portage/gentoolkit - eshowkw should sort SLOTs
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 346443
  Show dependency tree
 
Reported: 2012-03-23 14:43 UTC by Jeroen Roovers (RETIRED)
Modified: 2012-05-17 20:31 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2012-03-23 14:43:15 UTC
Example:

cvs/gentoo-x86/sys-devel/automake $ eshowkw
Keywords for sys-devel/automake:                                     
             | a a a h i m m p p s s s x | u s    | r                
             | l m r p a 6 i p p 3 h p 8 | n l    | e                
             | p d m p 6 8 p c c 9   a 6 | u o    | p                
             | h 6   a 4 k s   6 0   r   | s t    | o                
             | a 4             4     c   | e      |                  
             |                           | d      |                  
-------------+---------------------------+--------+-------           
[I]1.10.3    | + + + + + + ~ + + + + + + | o 1.10 | gentoo           
-------------+---------------------------+--------+-------           
[I]1.11.1    | + + + + + + ~ + + + + + + | o 1.11 | gentoo           
1.11.1-r1    | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | #      | gentoo           
1.11.2       | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | #      | gentoo           
1.11.2-r1    | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | #      | gentoo           
1.11.3       | ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ | o      | gentoo           
-------------+---------------------------+--------+-------           
1.4_p6-r1    | + + + + + + ~ + + + + + + | o 1.4  | gentoo           
-------------+---------------------------+--------+-------           
1.5-r1       | + + + + + + ~ + + + + + + | o 1.5  | gentoo           
-------------+---------------------------+--------+-------
1.6.3-r1     | + + + + + + ~ + + + + + + | o 1.6  | gentoo
-------------+---------------------------+--------+-------
1.7.9-r2     | + + + + + + ~ + + + + + + | o 1.7  | gentoo
-------------+---------------------------+--------+-------
1.8.5-r4     | + + + + + + ~ + + + + + + | o 1.8  | gentoo
-------------+---------------------------+--------+-------
[I]1.9.6-r3  | + + + + + + ~ + + + + + + | o 1.9  | gentoo
-------------+---------------------------+--------+-------
9999         | o o o o o o o o o o o o o | o 9999 | gentoo
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2012-03-23 15:37:59 UTC
That output is sorted.  It is just not numerically sorted, but normal alphabetically sorted.

In order to sort it numerically it means breaking apart the sections and padding them to more digits.  Then plain sorting the padded slots.

ie. 1.1 ==> 001.001, 1.10 ==> 001.010, 1.1.2 ==> 001.001.002
Comment 2 Paul Varner (RETIRED) gentoo-dev 2012-05-16 22:01:06 UTC
Actually, this looks like a bug in the code.  The function doing the sorting was sorting the list of packages twice.  The first time with vercmp from portage and the second time using python's itemgetter function. I deleted the sort with itemgetter and committed the change.  This produces the correct output.

http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=ba64705ea61bbfe506bee228b56758216ffb987c
Comment 3 Paul Varner (RETIRED) gentoo-dev 2012-05-17 20:31:49 UTC
This was released with gentoolkit-0.3.0.6-r2