Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97049 - genlop -c incorrectly lists ETA as "any time now"
Summary: genlop -c incorrectly lists ETA as "any time now"
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 117908
Blocks:
  Show dependency tree
 
Reported: 2005-06-25 09:54 UTC by David Morton
Modified: 2006-05-27 20:59 UTC (History)
2 users (show)

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 David Morton 2005-06-25 09:54:17 UTC
Due to incorrectly using a string comparison (ge) instead of a binary comparison
(>=) to compare numbers the current() function returns an ETA of "any time now"
when it should return the estimated time left in the emerge.

Reproducible: Always
Steps to Reproduce:
1. Emerge a package
2. run "genlop -c"
3. When the number of digits in the number of seconds the emerge has been
running is less than the number of digits in the number of seconds in the
average emerge time, genlop returns "any time now"

Actual Results:  
genlop -c printed "any time now"

Expected Results:  
genlop should have printed the difference between the time the emerge has been
running and the average emerge times of that package from emerge.log.

Portage 2.0.51.22-r1 (default-linux/x86/2004.2/gcc34, gcc-3.4.4, glibc-2.3.5-r0,
2.6.12-rc4-mm1 i686)
=================================================================
System uname: 2.6.12-rc4-mm1 i686 AMD Athlon(tm) XP 2800+
Gentoo Base System version 1.6.12
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.9
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.5
sys-devel/binutils:  2.16-r1
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -mtune=athlon-xp -fprefetch-loop-arrays
-momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -mtune=athlon-xp -fprefetch-loop-arrays
-momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks parallel-fetch prelink sandbox sfperms
strict userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/bmg-main"
SYNC="rsync://192.168.0.1/gentoo-portage"
USE="x86 3dnow 3dnowext X aalib acpi alsa apm audiofile avi bash-completion
berkdb bitmap-fonts bzlib cddb cdparanoia cdr chroot cjk cups curl editor emboss
encode ffmpeg flac foomaticdb fortran freetype gcj gd gdbm gif gtk2 guile
ignore-glep31 imagemagick imap imlib java jpeg junit ldap libcaca libg++ libwww
live mad maildir matroska matrox mikmod mmx mmxext motif mozsvg mozxmlterm mp3
mpeg nas ncurses nls nocd nojoystick nptl nvidia objc ogg oggvorbis opengl oss
pam pdflib perl png posix ppds python qt quicktime readline real rplay ruby
samba scanner sdl slang spell sse sse2 ssl stream stroke svga tcltk tcpd theora
truetype truetype-fonts type1-fonts usb videos vim-with-x virus-scan vorbis
win32codecs wxwindows xanim xine xml xml2 xmms xosd xprint xv xvid xvmc zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS

The fix is to change 'ge' to '>=' in line 601 of v. 0.30.3 to get the following:

if (($e_end - $e_start) >= ($tm_secondi / $e_count)) {
   print colored("any time now.\n", $COLORS{'green'});
}
Comment 1 Ivan Yosifov 2005-06-25 11:01:37 UTC
Either the homepage 'emerge --search genlop' points to (
http://pollycoke.org/genlop.html ) is wrong or the upstream is dead.
Comment 2 Antonio Dolcetta 2005-07-29 07:31:11 UTC
fixed in next release
the homepage will hopefully be up soon
Comment 3 Pawel Madej aka Nysander 2006-01-05 09:43:35 UTC
request for closing this bug as there are newer releases which are fixed in case of this bug
Comment 4 Petteri Räty (RETIRED) gentoo-dev 2006-01-05 09:53:01 UTC
(In reply to comment #3)
> request for closing this bug as there are newer releases which are fixed in
> case of this bug
> 

From original report:
The fix is to change 'ge' to '>=' in line 601 of v. 0.30.3 to get the
following:

if (($e_end - $e_start) >= ($tm_secondi / $e_count)) {
   print colored("any time now.\n", $COLORS{'green'});
}

So this would probably still affect stable versions?
Comment 5 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-05-27 20:59:44 UTC
released in genlop-0.30.5