Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 200775 - packages merged since portage-2.1.4_rc1 don't properly set ${PN}, ${PR}, or ${PV} in environment.bz2
Summary: packages merged since portage-2.1.4_rc1 don't properly set ${PN}, ${PR}, or $...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
Depends on:
Blocks: 200044
  Show dependency tree
 
Reported: 2007-11-29 20:19 UTC by scott
Modified: 2007-12-03 01:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
save more variables in environment.bz2 (saved_vars.patch,3.21 KB, patch)
2007-11-30 11:30 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description scott 2007-11-29 20:19:28 UTC
Portage-querying tools like epm and dep look in the file /var/db/pkg/${METAPROJECT}/${PROJECT} for a file called environment.bz2 to provide information about packages.  One variable that should be defined in that file is ${PN} to refer to the package name.

This variable doesn't get declared with the latest mozilla-firefox-2.0.0.10 ebuild.  That results in bad behavior.




Reproducible: Always

Steps to Reproduce:
1.  emerge mozilla-firefox-2.0.0.10
2.  try to query the package with dep or epm
3.  scratch head

Actual Results:  
scottfk@debaser ~ $ epm -qi mozilla-firefox
Use of uninitialized value in printf at /usr/bin/epm line 248.
Use of uninitialized value in printf at /usr/bin/epm line 248.
Use of uninitialized value in printf at /usr/bin/epm line 248.
Use of uninitialized value in printf at /usr/bin/epm line 248.
Name        :
Version     :
Release     :                                     Slot: 0
Install date: Thu Nov 29 14:45:20 2007      Build Host:
Group       : www-client                       License: MPL-1.1 GPL-2 LGPL-2.1
Size        : 53990357
Packager    : armin76
URL         : http://www.mozilla.org/projects/firefox/
Summary     : Firefox Web Browser
scottfk@debaser ~ $ dep --versions mozilla-firefox
www-client/mozilla-firefox:
        [   ] 2.0.0.2 (0)
        [   ] 2.0.0.6 (0)
        [   ] 2.0.0.9 (0)
        [ ~ ] 2.0.0.10 (0)

Expected Results:  
The package name should've shown up, and epm should not have kicked up errors.  dep should've shown version 2.0.0.10 as installed.
Comment 1 scott 2007-11-29 20:22:27 UTC
Correction:  The ebuild doesn't set ${PR}, or ${PV} in environment.bz2 either.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-11-29 21:23:11 UTC
Reopen with emerge --info, this has nothing to do w/ ebuild.
Comment 3 scott 2007-11-30 02:48:06 UTC
emerge --info as requested:

scottfk@debaser ~ $ emerge --info
Portage 2.1.4_rc4 (default-linux/amd64/2007.0/desktop, gcc-4.2.2, glibc-2.7-r0, 2.6.23-sfk3-sfk x86_64)
=================================================================
System uname: 2.6.23-sfk3-sfk x86_64 AMD Opteron(tm) Processor 246
Timestamp of tree: Fri, 30 Nov 2007 02:00:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.1.9999
dev-lang/python:     2.5.1-r4
sys-apps/baselayout: 2.0.0_rc6
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=opteron -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs cvs distlocks metadata-transfer noinfo parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://mirror.mcs.anl.gov/pub/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en_US en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="16bit 3dnow 3dnowext X Xaw3d a52 aac acpi aim alsa amazon amd64 ao aotuv asf bash-completion bdf bitmap-fonts boost branding browserplugin bzip2 cairo canvas cdda cddb chardet cli corba cracklib crypt cscope cups curl cursors dbus dga divx djbfft dmi dri dts dv emboss encode erandom evo expat fam fame ffmpeg fftw firefox flac fontconfig freetype gdbm gdm ggi gif glibc-omitfp glitz glut gmedia gmp gpm gs gstreamer gtk gtk2 hal icons iconv icu imagemagick imlib imlib2 isdnlog ithreads java javascript jbig jce jikes jit jp2 jpeg jpeg2k libnotify lzo mad matroska midi mikmod mjpeg mmap mmx mmxext mng modplug mozbranding mozdevelop mozsvg mp2 mp3 mp4 mpeg mpi mplayer msn mudflap musepack ncurses nis no_wxgtk1 nodrm noplugin nptl nptlonly nsplugin numeric nvidia offensive ogg oggvorbis opengl openmp pam pcre pdf perl pic pie png pnm postscript pppd print python qt-copy qt3support qt4 quicktime rar readline realmedia reflection rtc sasl sdl sdl-image session slang smp sndfile sox speex spell spl srt sse sse2 sse3 ssl ssse3 startup-notification svg symlink sysfs t1lib tcpd tetex theora threads threadsafe threadsonly tiff trayicon truetype truetype-fonts type1 type1-fonts unicode upnp usb userlocales vidix vim-syntax visualization vlm vorbis wma wma123 wmf wmp x264 xanim xcomposite xforms xml xml2 xorg xprint xscreensaver xv xvid xvmc yahoo zlib" ALSA_CARDS="snd_intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter 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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Doing a bit of research...  packages merged since I upgraded to portage-2.1.4_rc1 lost the "installed" flag in dep.  Packages merged since I upgraded to portage-2.1.4_rc4 lost the Name, Version, and Release in epm.


Sorry, Firefox-folk, this has absolutely nothing to do with your ebuild.
Comment 4 scott 2007-11-30 02:51:29 UTC
Reverting to portage-2.1.3.19 fixes the issue.
Comment 5 Zac Medico gentoo-dev 2007-11-30 11:30:13 UTC
Created attachment 137389 [details, diff]
save more variables in environment.bz2

If this patch is saved as /tmp/saved_vars.patch, then it can be applied as follows:

cd /usr/lib/portage
patch -p0 < /tmp/saved_vars.patch
Comment 6 Zac Medico gentoo-dev 2007-12-03 01:08:54 UTC
This has been released in 2.1.4_rc5.