Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352904 - Strange behaviour with --root option
Summary: Strange behaviour with --root option
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-27 08:07 UTC by Christian Faulhammer (RETIRED)
Modified: 2011-01-27 12:39 UTC (History)
0 users

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 Christian Faulhammer (RETIRED) gentoo-dev 2011-01-27 08:07:37 UTC
Tow strange things:

1.) "autounmasking" with ACCEPT_KEYWORDS does not work in connection with --root
2.) News item appear out of nowhere with --root.

sol fauli # ACCEPT_KEYWORDS="**" emerge grub -av

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

Calculating dependencies... done!
[ebuild  N    ] media-fonts/unifont-5.1.20080914  USE="X" 8,351 kB
[ebuild  N    ] dev-scheme/guile-1.8.8  USE="deprecated emacs nls regex threads -debug -debug-freelist -debug-malloc -discouraged -elisp -networking" 3,864 kB
[ebuild  N    ] sys-devel/autogen-5.11.5  1,016 kB
[ebuild     U ] sys-boot/grub-9999 [0.97-r10] USE="custom-cflags truetype%* -debug% -multislot% -static (-ncurses%*) (-netboot%)" 0 kB

Total: 4 packages (1 upgrade, 3 new), Size of downloads: 13,230 kB 

Would you like to merge these packages? [Yes/No] ^C

Exiting on signal 2
sol fauli # ACCEPT_KEYWORDS="**" emerge grub -av --root=/tmp/target

 * IMPORTANT: 2 news items need reading for repository 'gentoo'.   
 * Use eselect news to read news items.


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

Calculating dependencies... done!

!!! All ebuilds that could satisfy ">=sys-devel/autogen-5.10" have been masked.
!!! One of the following masked packages is required to complete your request:
- sys-devel/autogen-5.11.5 (masked by: ~x86 keyword)
- sys-devel/autogen-5.11.4 (masked by: ~x86 keyword)
- sys-devel/autogen-5.11.3 (masked by: ~x86 keyword)
- sys-devel/autogen-5.11.1 (masked by: ~x86 keyword)
- sys-devel/autogen-5.10.2 (masked by: ~x86 keyword)
- sys-devel/autogen-5.10.1 (masked by: ~x86 keyword)

(dependency required by "sys-boot/grub-9999" [ebuild])
(dependency required by "grub" [argument])
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.


 * IMPORTANT: 2 news items need reading for repository 'gentoo'.   
 * Use eselect news to read news items.

sol fauli # eselect news read
No news is good news.
Comment 1 Christian Faulhammer (RETIRED) gentoo-dev 2011-01-27 08:15:25 UTC
Portage 2.1.9.35 (default/linux/x86/10.0/desktop, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.36-gentoo-r5-i686-AMD_Athlon-tm-_X2_Dual_Core_Processor_BE-2400-with-gentoo-2.0.1
Timestamp of tree: Thu, 27 Jan 2011 06:30:22 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r1, 3.1.2-r4
dev-util/ccache:     2.4-r9
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.7.0
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10 AdobeFlash-10.1 dlj-1.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -msse3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS=""
FEATURES="assume-digests binpkg-logs buildpkg ccache distlocks fixlafiles fixpackages metadata-transfer news parallel-fetch protect-owned sandbox sfperms sign strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo/"
LANG="de_DE.UTF8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/bazaar /var/lib/layman/sunrise /var/lib/layman/emacs /var/lib/layman/ruby /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aiglx alsa applet artworkextra asf audiofile bash-completion berkdb bidi bogofilter bootsplash branding bzip2 cairo ccache cdda cddb cdparanoia cdr cleartype cli console consolekit cracklib crypt css cups curl custom-cflags dbus deskbar dga directfb divx4linux djvu dri dts dvd dvdr dvdread dvi emacs emboss encode evince exif fam fat fbcon fbcondecor fdftk ffmpeg foomaticdb fortran ftp gb gcj gdbm gdu gif glitz gphoto2 gpm gsf gtk gtk2 gtkhtml howl iconv icq idn imagemagick imlib ipv6 java javascript jpeg jpeg2k kpathsea libnotify libotf lirc lm_sensors mad matroska mikmod mime mmx mmxext mng modules mp3 mp4 mpeg mpeg2 mudflap mule nautilus ncurses nforce2 nls noaudio nocardbus nocxx novideo nowebdav nptl nptlonly nvidia objc objc++ objc-gc offensive ogg opengl openmp pam pango passwordsave pcre pdf plotutils pmu png policykit ppds pppd prediction preview-latex print publishers python qt-static readline samba sdk session slang smp spell sse ssl startup-notification svg svga sysfs t1lib tcpd theora threads thumbnailing tiff toolkit-scroll-bars totem truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd videos vorbis win32codecs wmf wxwindows x264 x86 xcb xface xft xml xorg xosd xpm xulrunner xv xvid zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="mouse keyboard evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" LIRC_DEVICES="atiusb" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Zac Medico gentoo-dev 2011-01-27 08:42:45 UTC
(In reply to comment #0)
> 1.) "autounmasking" with ACCEPT_KEYWORDS does not work in connection with
> --root

This due to environment isolation between the host and target roots. This is necessary since the ability to pass in variables via the calling environment tends to be heavily relied upon by embedded users, and in many cases these variables can cause damage if applied to the host root. So, most variables from the calling environment (aside from a small whitelisted group) are applied only to the target root. Since ACCEPT_KEYWORDS is not in the existing whitelist,  it is only applied to the target root and you end up with masking messages from the host root. I suppose we can add ACCEPT_KEYWORDS to the whitelist (in case you wonder, the whitelist happens to be located inside the portage.create_trees() function).

If you're curious, you can look in $PORTDIR/profiles/embedded to see the minimal embedded profile which is incomplete unless lots of variables are provided via the calling environment.

> 2.) News item appear out of nowhere with --root.

This is because the list of read news items is stored in $ROOT/var/lib/gentoo/news/, so setting $ROOT via --root means that suddenly you have unread news items. I'm not sure what to do about this offhand, but at least we probably want to check if the eselect news module has support for $ROOT so that it's possible to read the items and/or mark them as read.
Comment 3 Christian Faulhammer (RETIRED) gentoo-dev 2011-01-27 12:39:08 UTC
Something along the lines crept along when I did further testing.  Thanks.