Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133732 - eix-0.5.5 puts 2006 before 2005
Summary: eix-0.5.5 puts 2006 before 2005
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Stefan Schweizer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-18 15:37 UTC by Benno Schulenberg
Modified: 2006-07-11 17:46 UTC (History)
2 users (show)

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


Attachments
Patch to get long version elements like 2006xxyy to be compared correctly (eix-long-versions.patch,1.91 KB, patch)
2006-07-07 05:24 UTC, Vlastimil Babka (Caster) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benno Schulenberg 2006-05-18 15:37:20 UTC
'eix -e bash-completion' gives:

* app-shells/bash-completion
     Available versions:  20060301 20050121-r10 20050721
     Installed:           20060301
     Homepage:            http://www.caliban.org/bash/index.shtml#completion
     Description:         Programmable Completion for bash

Expected order of versions is: 20050121-r10 20050721 20060301.

emerge --info

Gentoo Base System version 1.12.0_pre18
Portage 2.0.54-r2 (default-linux/x86/2006.0, gcc-3.4.6-hardenednopie, glibc-2.3.6-r4, 2.6.16 i686)
=================================================================
System uname: 2.6.16 i686 AMD Athlon(tm) XP 2800+
dev-lang/python:     2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -Os -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks notitles sandbox sfperms strict test userpriv usersandbox"
LANG="en_GB.utf8"
LINGUAS="en eo es nl"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 3dnow X aac aim alsa apm arts asf audiofile avi bash-completion berkdb bitmap-fonts bzip2 cdparanoia cdr cli crypt curl dga dio dri dv dvb eds emboss encode esd ethereal exif expat fam fbcon ffmpeg flac gd gdbm gif glut glx gpm gstreamer gtk gtk2 gtkhtml hardened icq idn imagemagick imap imlib isdnlog jabber jpeg jpeg2k kde kdeenablefinal lcms libg++ libwww lm_sensors lua mad mbox mbrola memlimit mikmod mime mmap mmx mng mp3 mpeg musepack nas ncurses nls nptl nsplugin ogg openal opengl oscar pam pcre pdflib pic png pppd python qt quicktime readline recode reflection sasl scanner sdl session shorten slang sndfile sox speex spell spl sqlite sse ssl svg svga tcltk test theora threads tidy tiff truetype truetype-fonts type1-fonts unicode usb vcd vorbis win32codecs wmf xface xine xml xml2 xmms xorg xpm xsl xv xvid yahoo zlib video_cards_via video_cards_vesa video_cards_fbdev linguas_en linguas_eo linguas_es linguas_nl userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-07-07 04:25:35 UTC
It's not just 2006 vs 2005 but look at this:

* media-video/nvidia-settings
     Available versions:  1.0.6111 1.0.20060516 1.0.6629 1.0.7167 1.0.20050525 1.0.20050729 1.0.20051122 1.0.20051122-r1 1.0.20051122-r2 1.0.20051122-r3                                                                
     Installed:           1.0.20060516

No idea why 1.0.20060516 is where it is, but it should be last in the list :)
Looks strange to be overflow, it's nowhere near 32bit limit...
Comment 2 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-07-07 05:24:58 UTC
Created attachment 91119 [details, diff]
Patch to get long version elements like 2006xxyy to be compared correctly

Well actually it was an overflow :) unsigned short was used for version elements which can be only 16bit large, causing it to overflow 300 times for stuff like 2006xxyy :)) This effectively turned it into hash function, not good for comparing :) This patch changes it to unsigned long which is at least 32bit, should be enough... Also raised index file format version to 14 to force users to regenerate their index, as it's incompatible (the larger version numbers are stored there).
Comment 3 Benno Schulenberg 2006-07-07 07:24:50 UTC
Thanks for the patch.  It works for me.
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2006-07-11 17:46:45 UTC
thanks, this is fixed in 0.5.6