Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 68460 - minor error from portage portage-2.0.51 emerge
Summary: minor error from portage portage-2.0.51 emerge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-21 14:35 UTC by Elan Ruusamäe
Modified: 2005-02-28 09:41 UTC (History)
1 user (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 Elan Ruusamäe 2004-10-21 14:35:47 UTC
* Checking //var/lib/portage for bad/illegal files:
ln: `//var/lib/portage/world': File exists

# ls -l /var/cache/edb/world /var/lib/portage/world
ls: /var/cache/edb/world: No such file or directory
-rw-r--r--  1 root portage 5690 Oct 22 00:28 /var/lib/portage/world

i guess the backward compat symlink creation is done too early. as soon i noticed this error, i suspended emerge, and i have two portages installed:
# epm -q portage
portage-2.0.51
portage-2.0.50-r11



Reproducible: Didn't try
Steps to Reproduce:




and emerge info, when these two portages installed: 
 
# emerge info 
Portage 2.0.51 (default-linux/x86/2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r2, 
2.4.22-1.2115.nptlsmp i686) 
================================================================= 
System uname: 2.4.22-1.2115.nptlsmp i686 Intel(R) Xeon(TM) CPU 2.80GHz 
Gentoo Base System version 1.4.16 
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) 
[enabled] 
ccache version 2.3 [enabled] 
Autoconf: sys-devel/autoconf-2.59-r5 
Automake: sys-devel/automake-1.8.5-r1 
Binutils: sys-devel/binutils-2.14.90.0.8-r1 
Headers:  
sys-kernel/linux-headers-2.4.19-r1,sys-kernel/linux-headers-2.4.21-r1 
Libtools: sys-devel/libtool-1.5.2-r5 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-Os -mcpu=pentium2 -march=pentium2 -pipe -fomit-frame-pointer 
-ffast-math" 
CHOST="i686-pc-linux-gnu" 
COMPILER="" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/qmail/alias /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-Os -mcpu=pentium2 -march=pentium2 -pipe -fomit-frame-pointer 
-ffast-math" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs buildpkg ccache distcc noinfo sandbox sfperms userpriv 
usersandbox" 
GENTOO_MIRRORS="ftp://ftp.linux.ee/pub/gentoo/distfiles 
http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://gentoo.linux.no/ 
ftp://gentoo.linux.no/pub/gentoo/ http://ftp.easynet.nl/mirror/gentoo/" 
MAKEOPTS="-j25" 
PKGDIR="/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/gentoo/portage" 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" 
USE="X aalib alsa apache2 apm arts artswrappersuid avi bitmap-fonts chroot 
crypt cups dga directfb divx4linux dvd encodefam flac foomaticdb ggi gif 
gphoto2 gpm gstreamer gtk2 imagemagick imlib jpeg kde libg++ libwww lirc mad 
maildir memlimit mmx mng motif mozilla mpeg ncurses oggvorbis opengl oss pam 
perl png pthreads qt quicktime samba sdl slang speex spell ssl tiff truetype 
wmf x86 xinerama xml xml2 xprint xv xvid zlib video_cards_rage128 linguas_et"
Comment 1 Alec Warner (RETIRED) archtester gentoo-dev Security 2005-01-06 22:00:45 UTC
    install -o root -g portage -m 2770 -d "${ROOT}/var/lib/portage"
        einfo "Checking ${ROOT}/var/lib/portage for bad/illegal files:"
        find "${ROOT}/var/lib/portage" ! -group portage -o -perm -002 -print0 | $$

        OLDWORLD="${ROOT}/var/cache/edb/world"
        NEWWORLD="${ROOT}/var/lib/portage/world"

        if [ ! -f "${NEWWORLD}" ]; then
                cp "${OLDWORLD}" "${NEWWORLD}" && \
                rm -f "${OLDWORLD}" && \
                ln ../../lib/portage/world "${NEWWORLD}"
        fi
 This is the offending code.  Basically if NEWWORLD is not a regular file then copy the OLDWORLD over the NEWWORLD ( Creating NEWWORLD if necessary ) and remove the OLDWORLD.  Then hard link something to the new world.  The odd case is that on your box ../../lib/portage/world and NEWWORLD are the same, resulting in the ebuild hardlinking a file to itself, which is illegal.  The question is why.
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2005-02-28 09:41:31 UTC
Modified the code for new portage release...
Hardlink, if possible. Copy if that fails.