Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23851 - [TRACKER] Portage should validate ability to install before installing
Summary: [TRACKER] Portage should validate ability to install before installing
Status: IN_PROGRESS
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: Tracker
: 9849 28578 29015 48395 52809 67464 83379 89306 96351 117590 137751 147147 149904 156928 159718 181821 190554 (view as bug list)
Depends on: 451024 584760 664380 667226 690904
Blocks: 472746
  Show dependency tree
 
Reported: 2003-07-01 22:46 UTC by SpanKY
Modified: 2019-07-28 22:23 UTC (History)
21 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 SpanKY gentoo-dev 2003-07-01 22:46:07 UTC
root@vapier quake3-nsco # emerge -C quake3-osp 
 
 app-games/quake3-osp 
    selected: 1.03a 
   protected: none 
     omitted: none 
 
>>> Packages in red are slated for removal. 
>>> Packages in green will not be removed. 
 
>>> Waiting 5 seconds before starting... 
>>> (Control-C to abort)... 
>>> Unmerging in: 5 4 3 2 1  
>>> Unmerging app-games/quake3-osp-1.03a... 
No package files given... Grabbing a set. 
<<<        obj /usr/games/bin/quake3-osp 
<<<        obj /usr/games/bin/q3ded-osp 
<<<        obj /opt/quake3/osp/zz-osp-server3a.pk3 
<<<        obj /opt/quake3/osp/zz-osp-pak3.pk3 
<<<        obj /opt/quake3/osp/zz-osp-pak2.pk3 
<<<        obj /opt/quake3/osp/zz-osp-pak1.pk3 
!!! Unable to copy file ' /opt/quake3/osp/zz-osp-pak0.pk3 '. 
!!! [Errno 28] No space left on device 
 
root@vapier tmp # emerge info 
Portage 2.0.48-r1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1,2.3.2-r2) 
================================================================= 
System uname: 2.4.21 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz 
GENTOO_MIRRORS="        http://192.168.0.3/gentoo " 
CONFIG_PROTECT="/etc /var/qmail/control /var/qmail/alias /usr/kde/2/share/config 
/usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config 
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ 
/opt/glftpd/etc /usr/share/config" 
CONFIG_PROTECT_MASK="/etc/X11/xkb /usr/X11R6/lib/X11/xkb /etc/gconf 
/etc/env.d" 
PORTDIR="/usr/portage" 
DISTDIR="/usr/portage/distfiles" 
PKGDIR="/root/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR_OVERLAY="/usr/local/portage" 
USE="x86 dedicated nptl cdr scanner -3dfx -3dnow aalib -acl -afs -alsa apm -arts 
-atlas avi -berkdb -bonobo -canna -cjk crypt cups dga directfb -doc dvd encode esd 
-evo fbcon flash -freewnn -gb gd gdbm ggi -ggz gif -gnome -gnome-libs gphoto2 gpm 
gtk gtk2 -gtkhtml -guile -icc -icc-pgo imap imlib -innodb ipv6 java jpeg kde kerberos 
-lcms -ldap -libg++ -libgda libwww -matrox -maildir -mbox -mikmod mmx -motif 
mozilla mpeg -mule mysql nas ncurses -nls nocardbus -oci8 -odbc oggvorbis opengl 
-oss pam -pcmcia pda pdflib perl pic plotutils png pnp -postgres python qt qtmt 
quicktime readline -ruby samba sasl sdl -slang slp snmp socks5 spell sse ssl -static 
svga tcltk tcpd -tetex tiff truetype -trusted -voodoo3 wavelan X -xface xml xml2 
xmms xv -zeo zlib" 
COMPILER="gcc3" 
CHOST="i686-pc-linux-gnu" 
CFLAGS="-march=i686 -O9 -pipe -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" 
CXXFLAGS="-march=i686 -O9 -pipe -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE" 
ACCEPT_KEYWORDS="x86 ~x86" 
MAKEOPTS="-j2" 
AUTOCLEAN="yes" 
SYNC="rsync://192.168.0.3/gentoo-portage" 
FEATURES="sandbox ccache noauto"
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2004-01-08 12:45:49 UTC
still an issue ?
Comment 2 Brian Harring gentoo-dev 2004-08-17 00:44:50 UTC
Err... why the hell was it copying?
Comment 3 Alec Warner archtester Gentoo Infrastructure gentoo-dev Security 2005-08-06 09:40:51 UTC
(In reply to comment #2)
> Err... why the hell was it copying?

Only thing I can see is the prelink stuff trying to un-prelink files to get the 
correct on-disk md5sum.  Since there is no space to copy the file to to un-
prelink it things fail.

From portage_exec: 
                # Create non-prelinked temporary file to md5sum.
                # Raw data is returned on stdout, errors on stderr.
                # Non-prelinks are just returned.
                try:
                        shutil.copy2(filename,prelink_tmpfile)
                except SystemExit, e:
                        raise
                except Exception,e:
                        portage_util.writemsg("!!! Unable to copy file 
'"+str(filename)+"'.\n")
                        portage_util.writemsg("!!! "+str(e)+"\n")
                        sys.exit(1)

Comment 4 Zac Medico gentoo-dev 2005-08-06 16:57:55 UTC
Inside portage.dblink.unmerge() it does portage_checksum.perform_md5(obj,
calc_prelink=1) which copies the file to a tempfile and runs "prelink --undo". 
This is inefficient because when prelink_capable==True, the copy is done for
*every* obj file regardless of whether or not it is truly a prelinked binary.
Comment 5 Zac Medico gentoo-dev 2005-08-09 01:27:41 UTC
(In reply to comment #4)
> This is inefficient because when prelink_capable==True, the copy is done for
> *every* obj file regardless of whether or not it is truly a prelinked binary.

I have attached an optimization patch to bug 83379.
Comment 6 Zac Medico gentoo-dev 2005-09-03 00:39:04 UTC
*** Bug 83379 has been marked as a duplicate of this bug. ***
Comment 7 Zac Medico gentoo-dev 2005-09-03 00:39:49 UTC
*** Bug 67464 has been marked as a duplicate of this bug. ***
Comment 8 Zac Medico gentoo-dev 2005-09-03 00:40:33 UTC
The patch attached to bug 83379 should mostly alleviate this problem because
non-elf files are checksummed in place rather than copied.
Comment 9 Jason Stubbs (RETIRED) gentoo-dev 2005-10-07 07:58:29 UTC
*** Bug 9849 has been marked as a duplicate of this bug. ***
Comment 10 Jason Stubbs (RETIRED) gentoo-dev 2005-10-07 08:11:54 UTC
*** Bug 28578 has been marked as a duplicate of this bug. ***
Comment 11 Jason Stubbs (RETIRED) gentoo-dev 2005-10-07 08:13:06 UTC
*** Bug 29015 has been marked as a duplicate of this bug. ***
Comment 12 Jason Stubbs (RETIRED) gentoo-dev 2005-10-07 09:15:18 UTC
*** Bug 48395 has been marked as a duplicate of this bug. ***
Comment 13 Jason Stubbs (RETIRED) gentoo-dev 2005-10-07 09:25:44 UTC
*** Bug 52809 has been marked as a duplicate of this bug. ***
Comment 14 SpanKY gentoo-dev 2006-01-03 06:32:00 UTC
*** Bug 117590 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2006-06-24 15:28:11 UTC
*** Bug 137751 has been marked as a duplicate of this bug. ***
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2006-09-11 01:42:50 UTC
*** Bug 147147 has been marked as a duplicate of this bug. ***
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2006-12-02 10:55:34 UTC
*** Bug 156928 has been marked as a duplicate of this bug. ***
Comment 18 Jakub Moc (RETIRED) gentoo-dev 2007-01-02 07:41:19 UTC
*** Bug 159718 has been marked as a duplicate of this bug. ***
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2007-01-02 07:41:47 UTC
*** Bug 149904 has been marked as a duplicate of this bug. ***
Comment 20 Marius Mauch (RETIRED) gentoo-dev 2007-01-10 07:02:44 UTC
I assume this is fixed by now (the code in question doesn't exist anymore).
Comment 21 Marius Mauch (RETIRED) gentoo-dev 2007-01-10 07:02:58 UTC
I assume this is fixed by now (the code in question doesn't exist anymore).
Comment 22 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 14:59:16 UTC
Reopening for duping.
Comment 23 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 15:00:53 UTC
Ehm, reopening yes, duping no
Comment 24 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 15:01:20 UTC
*** Bug 89306 has been marked as a duplicate of this bug. ***
Comment 25 Jakub Moc (RETIRED) gentoo-dev 2007-04-01 20:15:20 UTC
*** Bug 96351 has been marked as a duplicate of this bug. ***
Comment 26 Jakub Moc (RETIRED) gentoo-dev 2007-06-12 20:02:55 UTC
*** Bug 181821 has been marked as a duplicate of this bug. ***
Comment 27 Jakub Moc (RETIRED) gentoo-dev 2007-08-28 18:14:28 UTC
*** Bug 190554 has been marked as a duplicate of this bug. ***
Comment 28 Martin Doucha 2011-02-12 14:07:04 UTC
Could you please check if there's enough disk space for installation of the package before installing from /var/tmp to live system? I've just had a failed glibc merge because there was not enough space to copy all glibc files which made the machine unusable. This is the third time one of my machines ran out of disk space while installing glibc.
Comment 29 Zac Medico gentoo-dev 2011-02-12 23:20:27 UTC
(In reply to comment #28)
> Could you please check if there's enough disk space for installation of the
> package before installing from /var/tmp to live system?

Yes, it can be done with statvfs. However, the fact that separate partitions are often used for things like /usr and /var makes the calculation a bit tricky.
Comment 30 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-07-06 19:04:06 UTC
Ping, is this still a problem? This bug is not tracking anything; if it is meant to track the bug listed in the "See Also" field then please add it to "Depends on", thank you in advance.