Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17688 - emerge -k <packagename> (maybe) broken
Summary: emerge -k <packagename> (maybe) broken
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-17 09:13 UTC by Tobias Eichert
Modified: 2011-10-30 22:20 UTC (History)
1 user (show)

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


Attachments
xpak.py.patch (xpak.py.patch,532 bytes, patch)
2003-08-07 19:27 UTC, SpanKY
Details | Diff
emerge.patch (emerge.patch,702 bytes, patch)
2003-08-07 19:28 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Eichert 2003-03-17 09:13:43 UTC
When I tried to install an already built package via emerge -k <packagename>
I got the following errors:

root@idoru:~# emerge -k kdeartwork
Traceback (most recent call last):
  File "/usr/bin/emerge", line 1823, in ?
    mydepgraph=depgraph(myaction,myopts)
  File "/usr/bin/emerge", line 509, in __init__
    portage.db["/"]["bintree"].populate()
  File "/usr/lib/python2.2/site-packages/portage.py", line 3466, in populate
    mycat=mytbz2.getfile("CATEGORY")
  File "/usr/lib/python2.2/site-packages/xpak.py", line 183, in getfile
    self.scan()
  File "/usr/lib/python2.2/site-packages/xpak.py", line 161, in scan
    a.seek(-16,2)
IOError: [Errno 22] Invalid argument

This happens with other already built packages as well.

Reproducible: Always
Steps to Reproduce:

1. emerge -k <package you've already built and which isn't installed> 
2.
3.

Actual Results:  
see above.

Expected Results:  
emerge -k should install the given packages.

Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r2)
=================================================================
System uname: 2.4.20-wolk4.0s-rc2 i686 AMD Athlon(tm) Processor
GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://gentoo.orego                                            
nstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share                                            
/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY="/usr/local/portage"
USE="x86 apm avi imlib libg++ libwww nls pdflib spell zlib gdbm berkdb slang rea                                            
dline java tcpd perl python 3dnow mmx X gtk gtk2 qt -gnome kde esd arts alsa mik                                            
mod dvd mpeg encode motif nas ncurses oggvorbis oss pam png jpeg tiff quicktime                                             
ruby sdl ssl svga truetype usb xml xml2 xmms xv maildir crypt aalib gif -gpm ope                                            
ngl cups"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O2 -pipe"
CXXFLAGS="-march=athlon-tbird -O2 -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="ccache sandbox buildpkg"
Comment 1 Tobias Eichert 2003-03-17 13:08:36 UTC
Some updates and a strange situation ;) 
I've recently tried to start xpdf which hasn't been in /usr/bin anymore..that's quite strange as I 
installed it yesterday and really didn't delete it by myself via "rm /usr/bin/xpdf" and all 
other files belonging to xpdf ;). 
So I did an "emerge -s xpdf" and portage told me that it'd be installed (which isn't the case); 
okey, "uninstalled" xpdf and remerged it.  
Now: After doing this I tried an "emerge -k kdeartwork" again and now everything's working 
again. 
I've absolutely no idea what could've caused this..just to let you know. 
Comment 2 Wayne Davison 2003-03-17 14:42:44 UTC
An additional data point:  I tried "emerge -k" on my home setup (I use it
on two machines to keep them synchronizedd with a 3rd machine), and it's
working fine for me as well using portage-2.0.47-r10.
Comment 3 Seemant Kulleen (RETIRED) gentoo-dev 2003-03-17 22:13:36 UTC
what filesystems?
Comment 4 Tobias Eichert 2003-03-21 09:33:38 UTC
Seemant: I'm using reiserfs.
Comment 5 Tony Clark 2003-03-23 03:01:34 UTC
power root # emerge -k system 
Calculating system dependencies | 
emerge: there are no masked or unmasked ebuilds to satisfy "sys-devel/perl". 
!!! Problem with binary sys-apps/util-linux-2.11y 
!!! Possibly a DEPEND/*DEPEND problem. 
 
!!! Depgraph creation failed. 
 
power root # emerge -k util-linux 
Calculating dependencies \ 
emerge: there are no masked or unmasked ebuilds to satisfy "sys-devel/perl". 
 
!!! Error calculating dependancies. Please correct. 
 
power root # emerge sys-devel/perl 
Calculating dependencies 
emerge: there are no masked or unmasked ebuilds to satisfy "sys-devel/perl". 
 
!!! Error calculating dependancies. Please correct. 
 
power root # emerge -s dev-lang/perl 
Searching... 
[ Results for search key : dev-lang/perl ] 
[ Applications found : 0 ] 
 
power root # emerge -p perl 
 
These are the packages that I would merge, in order: 
 
Calculating dependencies ...done! 
[ebuild   R  ] dev-lang/perl-5.8.0-r9 
 
So emerge -k is causing me problems, but diferent to the original bug.  For somethings it 
seems to work ok.  I think this is when there are current binary packages existing and 
this bug may show up as soon as a package needs to be built from source. 
 
a little more 
 
power root # emerge -p system 
 
These are the packages that I would merge, in order: 
 
Calculating system dependencies ...done! 
 
power root # emerge -kp kde 
 
These are the packages that I would merge, in order: 
 
Calculating dependencies / 
emerge: there are no masked or unmasked ebuilds to satisfy "sys-devel/perl". 
 
!!! Error calculating dependancies. Please correct. 
 
power root # emerge -k Audio-Tools 
Calculating dependencies \ 
emerge: there are no masked or unmasked ebuilds to satisfy "sys-devel/perl". 
 
!!! Error calculating dependancies. Please correct. 
power root # emerge Audio-Tools 
Calculating dependencies ...done! 
>>> emerge (1 of 1) dev-perl/Audio-Tools-0.01 to / 
>>> md5 ;-) Audio-Tools-0.01.tar.gz 
>>> Unpacking source... 
>>> Unpacking Audio-Tools-0.01.tar.gz to /pub/tmp/portage/Audio-Tools-0.01/work 
>>> Source unpacked. 
 
 
 
tony@power tony $ emerge info 
Portage 2.0.47-r10 (default-x86-1.4, gcc-3.2.2, glibc-2.3.1-r2) 
================================================================= 
System uname: 2.4.20 i686 AMD Athlon(TM) MP 1900+ 
GENTOO_MIRRORS="http://gentoo.linux.no/ http://gentoo.oregonstate.edu/ 
http://www.ibiblio.org/pub/Linux/distributions/gentoo" 
CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config 
/usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/kde/3/share/config 
/usr/share/config" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" 
PORTDIR="/usr/portage" 
DISTDIR="/pub2/portage/distfiles" 
PKGDIR="/pub2/portage/packages" 
PORTAGE_TMPDIR="/pub/tmp" 
PORTDIR_OVERLAY="/pub2/portage_local" 
USE="x86 oss 3dnow apm avi crypt gif gpm imlib jpeg libg++ libwww mikmod mmx mpeg 
ncurses nls pdflib png quicktime spell xml2 zlib gdbm berkdb slang readline svga java sdl 
tcpd pam perl python oggvorbis gtk qt opengl X gtk2 -gnome -alsa kde mozilla mysql ssl 
xmms xv dvd motif acpi cdr -pcmcia -arts -cups -esd truetype encode" 
COMPILER="gcc3" 
CHOST="i686-pc-linux-gnu" 
CFLAGS="-march=athlon-xp -O3 -pipe" 
CXXFLAGS="-march=athlon-xp -O3 -pipe" 
ACCEPT_KEYWORDS="x86" 
MAKEOPTS="-j4" 
AUTOCLEAN="yes" 
SYNC="rsync://rsync1.no.gentoo.org/gentoo-portage" 
FEATURES="sandbox ccache buildpkg" 
 
Comment 6 Martin Holzer (RETIRED) gentoo-dev 2003-03-23 04:30:19 UTC
Tony: please sync, try another rsync server
Comment 7 Seemant Kulleen (RETIRED) gentoo-dev 2003-03-25 02:59:29 UTC
yeah, we know about this issue, and the next portage release will fix this,
Comment 8 Nicholas Jones (RETIRED) gentoo-dev 2003-04-28 05:41:35 UTC
Seems to be all cleared up.
Comment 9 SpanKY gentoo-dev 2003-08-07 18:59:17 UTC
original bug (emerging invalid binary pkg) is still broken ...

fix is to check filesize before trying to seek back 16 bytes (which will fail if file is ... oh say less than 16 bytes :D)
Comment 10 SpanKY gentoo-dev 2003-08-07 19:27:18 UTC
Created attachment 15724 [details, diff]
xpak.py.patch

this will fix the error the user originally reported (if you make a binary file
of <16 bytes you'll get that traceback)
Comment 11 SpanKY gentoo-dev 2003-08-07 19:28:37 UTC
Created attachment 15725 [details, diff]
emerge.patch

problem is that emerge never handles xpak.py failing ... this changes that ...

probably should be done through raising errors except i have no idea how to do
that :)

this checks return values since thats what the rest of the scan() function did
when it found errors ... returned 0 ...
Comment 12 Andrew Cooks (RETIRED) gentoo-dev 2003-11-21 06:10:45 UTC
I just tried to reproduce this bug with portage-2.0.49-r15, but couldn't. Portage did exactly the right thing.

What I did:
0. I used a package which I didn't have installed. (lcrzo)
0.1 I installed a version older than the current stable version.

1. emerge -b /usr/portage/net-libs/lcrzo/lcrzo-4.16.0.ebuild
 -> built a package and installed it.

2. emerge -kp lcrzo

--snip-snip--
These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild     U ] net-libs/lcrzo-4.17.0 [4.16.0] 
--snip-snip--

3. emerge -k lcrzo
 -> Fetched latest source and compiled it.

So I presume this bug is fixed and can be closed?
Comment 13 Marius Mauch (RETIRED) gentoo-dev 2003-11-21 07:35:52 UTC
AFAICS it's fixed.