Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 399551 - sys-apps/portage: emerge --info CPV doesn't respect /etc/portage/package.env
Summary: sys-apps/portage: emerge --info CPV doesn't respect /etc/portage/package.env
Status: RESOLVED DUPLICATE of bug 410069
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-20 20:42 UTC by Alex Brandt (RETIRED)
Modified: 2012-06-17 03:44 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 Alex Brandt (RETIRED) gentoo-dev 2012-01-20 20:42:41 UTC
I use /etc/portage/package.env to change PORTAGE_TMPDIR and a few other variables (starting to look into using it to for PORTAGE_NICENESS as well).  The issue I ran into while trying to troubleshoot whether portage is respecting PORTAGE_NICENESS from /etc/portage/package.env was that I can't view the value assigned (for a particular CPV) using emerge --info CPV as I would expect.  Upon further investigation I found that my verified working PORTAGE_TMPDIR variable was also not being reflected in the emerge --info for the CPV (in this case www-client/chromium).  I think this is expected behavior but am open to hearing why this isn't the case if this has already been raised.

Reproducible: Always

Steps to Reproduce:
1. echo "PORTAGE_TMPDIR="/var/tmp/alt" > /etc/portage/env/tmpdir.conf
2. echo "www-client/chromium tmpdir.conf" >> /etc/portage/package.env
3. emerge --info www-client/chromium
Actual Results:  
The information printed by emerge --info doesn't accurately reflect the differences acted upon by portage when the package is built.  This is very evident from the following diff of the outputs (where /etc/portage/package.env contains the above information):


elijah alunduil # diff -u <(emerge --info) <(emerge --info www-client/chromium)
--- /dev/fd/63  2012-01-20 14:38:58.144882656 -0600
+++ /dev/fd/62  2012-01-20 14:38:58.145882623 -0600
@@ -1,5 +1,7 @@
 Portage 2.1.10.44 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.3, glibc-2.14.1-r2, 3.2.0-gentoo-r1 x86_64)
 =================================================================
+                        System Settings
+=================================================================
 System uname: Linux-3.2.0-gentoo-r1-x86_64-AMD_Turion-tm-_64_X2_Mobile_Technology_TL-60-with-gentoo-2.1
 Timestamp of tree: Fri, 20 Jan 2012 15:45:01 +0000
 app-shells/bash:          4.2_p20
@@ -47,3 +49,12 @@
 USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 avahi berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus declarative doc dri dts dvd dvdr emboss encode examples exif fam firefox flac fortran gdbm gdu gif gpm gtk handbook iconv ipv6 jpeg kde kipi lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses networkmanager nls nptl nptlonly ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds pppd pulseaudio qt3support qt4 readline samba sdl semantic-desktop session spell sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb vim-syntax vorbis x264 xcb xcomposite xinerama xml xorg xscreensaver xulrunner xv xvid zeroconf zlib zsh-completion" ALSA_CARDS="hda-intel" 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" 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="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau" 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, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
 
+=================================================================
+                        Package Settings
+=================================================================
+
+www-client/chromium-17.0.963.33 was built with the following:
+USE="(consolekit) cups (multilib) (policykit) -bindist -custom-cflags -gnome -gnome-keyring -kerberos (-pulseaudio) -test" LINGUAS="-am -ar -bg -bn -ca -cs -da -de -el -en_GB -es -es_LA -et -fa -fi -fil -fr -gu -he -hi -hr -hu -id -it -ja -kn -ko -lt -lv -ml -mr -nb -nl -pl -pt_BR -pt_PT -ro -ru -sk -sl -sr -sv -sw -ta -te -th -tr -uk -vi -zh_CN -zh_TW"
+CFLAGS="-O2 -pipe -march=native"
+CXXFLAGS="-O2 -pipe -march=native"
+


Expected Results:  
Portage should show this variable with the appropriate value in emerge --info CPV. 

All of this is based off of my understanding of what I would expect to happen from this information so if I'm completely off base or there is a good reason why this isn't the case I would love to hear that argument.  I believe this would help with debugging problems in /etc/portage/package.env that users may introduce during customization and could be a very useful function of portage.
Comment 1 Zac Medico gentoo-dev 2012-01-21 03:51:44 UTC
(In reply to comment #0)
> I use /etc/portage/package.env to change PORTAGE_TMPDIR and a few other
> variables (starting to look into using it to for PORTAGE_NICENESS as well). 
> The issue I ran into while trying to troubleshoot whether portage is respecting
> PORTAGE_NICENESS from /etc/portage/package.env was that 

It won't work for PORTAGE_NICENESS because only the global value is applied once to the main emerge process when it starts up.

> I can't view the value
> assigned (for a particular CPV) using emerge --info CPV as I would expect. 
> Upon further investigation I found that my verified working PORTAGE_TMPDIR
> variable was also not being reflected in the emerge --info for the CPV (in this
> case www-client/chromium).  I think this is expected behavior but am open to
> hearing why this isn't the case if this has already been raised.

The existing emerge --info code wasn't really designed for that. I was written before package.env existed, and was mainly intended to show package.use settings.
Comment 2 Alex Brandt (RETIRED) gentoo-dev 2012-01-21 16:42:08 UTC
(In reply to comment #1)
> It won't work for PORTAGE_NICENESS because only the global value is applied
> once to the main emerge process when it starts up.

That makes sense and was kind of what I was expecting based on the descriptions of PORTAGE_NICENESS I saw.  I'll explore that separately and see if it's something worth pursuing by seeing how large the patch would be.

> The existing emerge --info code wasn't really designed for that. I was written
> before package.env existed, and was mainly intended to show package.use
> settings.

Would it be reasonable to upgrade this bug to a feature request for that information to be included in emerge --info CPV?

Thanks for the information Zac.
Comment 3 Zac Medico gentoo-dev 2012-01-22 22:06:58 UTC
(In reply to comment #2)
> Would it be reasonable to upgrade this bug to a feature request for that
> information to be included in emerge --info CPV?

Sure, sounds reasonable.
Comment 4 Zac Medico gentoo-dev 2012-06-17 03:44:31 UTC

*** This bug has been marked as a duplicate of bug 410069 ***