Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131319 - Portage chooses virtuals from base system, not ROOT
Summary: Portage chooses virtuals from base system, not ROOT
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 137867 136244
  Show dependency tree
 
Reported: 2006-04-26 04:51 UTC by James Le Cuirot
Modified: 2006-07-05 11:25 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 James Le Cuirot gentoo-dev 2006-04-26 04:51:00 UTC
Portage uses already-installed packages to override the virtuals specified in the profile. For example, when specifying linux-sources, suspend2-sources will be chosen over gentoo-sources if suspend2-sources is already installed. I consider this to be expected behaviour. However, this behaviour is broken when using the ROOT env. Instead of looking at what packages are installed within ROOT, it looks at what packages are installed on the base system. I was trying to create a new profile for a different architecture and I found that it kept choosing suspend2-sources over the sources I'd specified in the profile until I removed suspend2-sources.

This has probably only come to light now because Portage currently uses the base make.profile instead of ${ROOT}/etc/make.profile. I've only noticed it because I'm using the http://arcanux.org/rmerge script that deals with the issues discussed in bug #73350.


Portage 2.1_pre9-r4 (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.3.6-r2, 2.6.11.12 i686)
=================================================================
System uname: 2.6.11.12 i686 Mobile Intel(R) Pentium(R) 4     CPU 2.80GHz
Gentoo Base System version 1.12.0_pre13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2
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-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer noauto sandbox sfperms"
GENTOO_MIRRORS="http://download.mirror.ac.uk/sites/distro.ibiblio.org/pub/linux/distributions/gentoo http://distro.ibiblio.org/pub/linux/distributions/gentoo http://gentoo.oregonstate.edu"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /home/chewi/chewi-overlay /home/chewi/gentoo-experimental/migration"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="16bit 3ds 7zip S3TC X X509 Xaw3d a52 aac aalib acpi aim allegro alsa amd amr apache2 bash-completion bcp berkdb bitmap-fonts bjam blender-game bzip2 cap cardbus ccache cdda cddb cdparanoia cdr cdrom cli crosscompile crypt css cups curl dba dbus dga dhcp dillo directfb dri dv dvd dvdr dvdread emoticon encode examples exif fastcgi fb fbcon fbdev fbsplash ffmpeg fftw firefox fluidsynth fmod fontconfig foomaticdb ftp gd gdbm gif gimp gimpprint gkrellm gpm gstreamer gtk gtk2 icq ieee1394 image imagemagick imap imlib inkjar isdnlog ithreads jabber jack jack-tmpfs javascript joystick jpeg jpeg2k kqemu ladcca ladspa lcms libg++ libsamplerate libwww linguas_en_GB live lj lufsusermount lzo m17n-lib mad madwifi maildir mbox mbrola mikmod ming mmx mmxext mng motif moznocompose moznoirc moznomail mozp3p mozsvg mp3 mpeg mpeg2 mpeg4 mplayer mppe-mppc msn music mysql ncurses network nfs nls nocd nptl nsplugin ntfs offensive ogg oggvorbis opengl oss pcmcia pcre pdflib png pnp posix ppds pppd python qt quicktime readline real reflection reiserfs rtc ruby samba sasl sdl session simplexml soap sockets socks5 sounds sox spamassassin spell spl sse sse2 ssl startup-notification subversion svg svgz sysfs tcpd tga theora threads tiff timidity transparent-proxy truetype truetype-fonts type1 type1-fonts unicode userlocales utf8 v4l v4l2 vcd vhosts video_cards_ati videos vim vim-pager vim-with-x vnc vorbis wifi win32codecs wma wmf wxwindows x86 xanim xchattext xface xml xml2 xmms xorg xosd xpm xprint xrandr xscreensaver xsl xv xvid xvmc yahoo zip zlib elibc_glibc kernel_linux userland_GNU video_cards_radeon"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 solar (RETIRED) gentoo-dev 2006-04-26 04:54:20 UTC
${ROOT}/etc/make.profile is not something we want portage todo. 
Comment 2 James Le Cuirot gentoo-dev 2006-04-26 05:00:52 UTC
I see that alternative options were discussed in bug #73350 and you seem to support them since you said it was a "vital feature". But regardless of how that bug is tackled, I think this is still an issue.
Comment 3 James Le Cuirot gentoo-dev 2006-04-26 05:57:34 UTC
Just to clarify my last point, imagine you are creating a ROOT system that has the same architecture as the base system. You wouldn't expect the packages installed on the base system to influence which packages are chosen for the ROOT system. For example, if you install suspend2-sources on the base system, you would still expect "emerge linux-sources" to select gentoo-sources for the ROOT system.
Comment 4 solar (RETIRED) gentoo-dev 2006-04-26 07:23:42 UTC
The host systems virtuals are used as a preference.
Consider the following example using an older portage-2.1_preX:

ROOT=~/ROOT/
rm -rf ${ROOT}
mkdir -p ${ROOT}
ACCEPT_KEYWORDS="x86" emerge gcc -pv

Notice how it incorrectly attempts to pull in eselect-compiler vs gcc-config 
and you can't merge it cuz it's not marked stable. this is how the || ( ) 
worked before. Now the only way to correct the preference of virtuals is to preload them. 

Having a CONFIGROOT= would indeed allow you to override these to your endless 
desires.
Comment 5 Zac Medico gentoo-dev 2006-04-26 13:45:50 UTC
Can we mark this as a duplicate of bug 73350 then?
Comment 6 James Le Cuirot gentoo-dev 2006-04-26 16:02:48 UTC
Someone in #gentoo-embedded suggested that and I suppose he had a point, this is one of the many issues that falls under that bug. However, I feel that fixing this particular issue would be much easier than fixing the rest of it and it would offer some immediate benefits. I have no way of telling, short of checking on a package by package basis, whether the virtuals that are being installed in my new ROOT system are actually the default choices.
Comment 7 James Le Cuirot gentoo-dev 2006-04-28 10:32:46 UTC
It seems that blockers are also picked up from the base system instead of from ROOT.

schwartz ~ # emerge-ps2 -pv ps2-headers
 * Redirecting hostfs Portage environment to rootfs ...    [ ok ]
These are the packages that would be merged, in order:

Calculating dependencies... done!
[blocks B     ] sys-kernel/linux-headers (is blocking sys-kernel/ps2-headers-2.4.17)
[ebuild  N    ] sys-kernel/ps2-headers-2.4.17  to /mnt/br/gentoo/ 0 kB

Total size of downloads: 0 kB
 * Restoring hostfs Portage environment ...                [ ok ] 
 * Restoring rootfs Portage environment ...                [ ok ]
 >>> Regenerating /mnt/br/gentoo/etc/ld.so.cache...
 
 
schwartz ~ # emerge-ps2 -C linux-headers
 * Redirecting hostfs Portage environment to rootfs ...    [ ok ]
>>> Using system located in ROOT tree /mnt/br/gentoo

--- Couldn't find linux-headers to unmerge.

>>> No packages selected for removal by unmerge.

 * Restoring hostfs Portage environment ...                [ ok ]
 * Restoring rootfs Portage environment ...                [ ok ]
 >>> Regenerating /mnt/br/gentoo/etc/ld.so.cache...
Comment 8 James Le Cuirot gentoo-dev 2006-06-11 05:38:00 UTC
Well I have now switched from using the rmerge script to using the new PORTAGE_CONFIGROOT feature but this is still an issue.

root@schwartz # emerge-ps2 -upD system

These are the packages that would be merged, in order:

Calculating system dependencies... done!
[blocks B     ] sys-kernel/linux-headers (is blocking sys-kernel/ps2-headers-2.4.17)
[blocks B     ] sys-apps/module-init-tools (is blocking sys-apps/modutils-2.4.27-r1)
[ebuild     U ] dev-lang/python-2.4.3-r1 [2.4.2-r1] to /mnt/gentoo-ps2/ USE="-nocxx*"
[ebuild     U ] sys-apps/sandbox-1.2.18 [1.2.17] to /mnt/gentoo-ps2/
[ebuild     U ] app-misc/pax-utils-0.1.12 [0.1.11-r1] to /mnt/gentoo-ps2/
[ebuild  N    ] sys-process/psmisc-22.2 to /mnt/gentoo-ps2/ USE="-X -ipv6 -nls"
[ebuild  N    ] sys-apps/busybox-1.1.2 to /mnt/gentoo-ps2/ USE="-debug -floppyboot -make-symlinks -netboot -savedconfig -static"
[ebuild  N    ] sys-apps/kbd-1.12-r6 to /mnt/gentoo-ps2/ USE="-nls"
Comment 9 Zac Medico gentoo-dev 2006-07-04 19:51:37 UTC
I'm pretty sure this is fixed in svn r3785.  It needs testing though.
Comment 10 Zac Medico gentoo-dev 2006-07-05 11:25:12 UTC
This has been released in 2.1.1_pre2-r3.  Please test and reopen if there are any remaining issues.