Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150876 - emerge --info | head -1 output differs from actual first line
Summary: emerge --info | head -1 output differs from actual first line
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 147007
  Show dependency tree
 
Reported: 2006-10-11 04:40 UTC by Robert Förster
Modified: 2006-10-11 20:25 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 Robert Förster 2006-10-11 04:40:36 UTC
Beatrix ~ # emerge --info | head -1
Gentoo Base System version 1.12.5

Beatrix ~ # emerge --info
Portage 2.1.2_pre2-r8 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.18-Beatrix x86_64)
=================================================================
System uname: 2.6.18-Beatrix x86_64 Intel(R) Pentium(R) D CPU 2.80GHz
Gentoo Base System version 1.12.5
Last Sync: Wed, 11 Oct 2006 08:00:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: [Not Present]
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O3 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=nocona -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="de 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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/gentoo-syscp-overlay/experimental /usr/portage/local/layman/portage-xgl"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acpi alsa arts bash-completion berkdb bitmap-fonts cairo cdr cli crypt cups dbus dlloader dri dvd dvdr eds elibc_glibc emboss encode esd fam firefox fortran gdbm gif glitz gnome gpm gtk gtk2 hal input_devices_keyboard input_devices_mouse ipv6 isdnlog ithreads jpeg kde kdehiddenvisibility kernel_linux libg++ linguas_de linguas_en mad mikmod mp3 mpeg mysql ncurses nls no-old-linux nptl nptlonly offensive ogg opengl oss pam pcre perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl svg symlink tcpd truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_nvidia vorbis xine xml xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Bo Ørsted Andresen (RETIRED) gentoo-dev 2006-10-11 04:46:59 UTC
# cat /usr/bin/emerge
[...]
     if os.path.exists("/etc/gentoo-release"):
         os.system("cat /etc/gentoo-release")
[...]

Should probably be converted to use print...
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2006-10-11 05:01:58 UTC
Yeah, that's pretty poor :P

if os.path.exists("/etc/gentoo-release"):
  print open("/etc/gentoo-release", "r").readline().strip()

That will accomplish the same thing. Also:

try:
  print open("/etc/gentoo-release", "r").readline().strip()
except:
  pass
Comment 3 Bo Ørsted Andresen (RETIRED) gentoo-dev 2006-10-11 05:08:42 UTC
I've just tested both and obviously either solves the issue.
Comment 4 Zac Medico gentoo-dev 2006-10-11 09:35:22 UTC
Thanks, this is fixed in svn r4658.
Comment 5 Zac Medico gentoo-dev 2006-10-11 20:25:50 UTC
This has been released in 2.1.2_pre2-r9.