Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75277 - ebuild: 'use x86' returns 1 on an x86 machine
Summary: ebuild: 'use x86' returns 1 on an x86 machine
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 75302 75363 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-21 23:30 UTC by Andy Dalton
Modified: 2005-07-14 06:58 UTC (History)
2 users (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 Andy Dalton 2004-12-21 23:30:00 UTC
Attempting to emerge sun-jdk-1.5.0.01 fails with the following error:

# emerge sun-jdk
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-java/sun-jdk-1.5.0.01 to /
>>> Unpacking source...
tail: +: invalid number of lines

!!! ERROR: dev-java/sun-jdk-1.5.0.01 failed.
!!! Function src_unpack, Line 101, Exitcode 1
!!! unpack not found
!!! If you need support, post the topmost build error, NOT this status message.


After tracing through the ebuild, I find that for some reason the ${At} variable isn't getting set:

   if use x86; then
        At=${x86file}
   ...

I tested this, and 'use x86' is returning 1, not 0 on my x86 machine.  I couldn't find the implementation of the use function to trace the problem any further.

# emerge --info
Portage 2.0.51-r3 (default-linux/x86/2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r9 i686)
=================================================================
System uname: 2.6.9-gentoo-r9 i686 AMD Athlon(tm) processor
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.90.0.1.1-r3
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-tbird -O2 -fforce-addr -fomit-frame-pointer -frename-registers -ftracer -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-tbird -O2 -fforce-addr -fomit-frame-pointer -frename-registers -ftracer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.osuosl.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X Xaw3dxml acl acpi alsa apache2 apm arts avi berkdb bitmap-fonts cdr cjk crypt cscope cups curl dga encode ethereal evo f77 fbcon foomaticdb fortran gd gdbm gif gpm gtk gtk2 imap imlib innodb ipv6 java jpeg kde lcms libwww live lzo mad mbox memlimit mikmod mmx mmx2 motif mpeg mysql nas ncurses network nls nptl offensive oggvorbis opengl oss pam pdflib perl plotutils png pythonqt quicktime readline rtc ruby samba sasl sdl snmp spell sse ssl svga tcltk tcpd tetex theora threads truetype usb videos wmf xml2 xmms xv xvid zlib"
Comment 1 Andy Dalton 2004-12-21 23:49:35 UTC
Please note, this problem is not isolated to the dev-java/sun-jdk ebuild.  I get the same behavior from media-video/nvidia-kernel.

I'm running both of these packages ~x86 via /etc/portage/package.keywords

# emerge -pv sun-jdk nvidia-kernel

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild    fU ] dev-java/sun-jdk-1.5.0.01 [1.5.0] -doc -gnome -jce +kde -mozilla 0 kB
[ebuild     U ] media-video/nvidia-kernel-1.0.6629-r1 [1.0.6629] 0 kB

Total size of downloads: 0 kB
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2004-12-21 23:51:03 UTC
You're USE listed in the emerge info output should contain x86 but does not. Please check the following:

env | grep ARCH              <-- should show nothing
emerge -v info | grep ARCH   <-- should show ARCH="x86"

If either of those are wrong, first try syncing your portage tree. If that doesn't fix it, check that ARCH isn't set anywhere other than /etc/profile/make.defaults (and that is in fact set there).
Comment 3 Brian Harring (RETIRED) gentoo-dev 2004-12-22 00:13:33 UTC
updating bug with info, garibaldi doesn't have ARCH set in the env, emerge --info correctly shows it (strangely, with portage-cvs it doesn't show it on my system, strictly accept_keywords)
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2004-12-22 00:28:02 UTC
[17:27] <jstubbs> PROFILE_PATH 
Comment 5 Jason Stubbs (RETIRED) gentoo-dev 2004-12-22 00:28:02 UTC
[17:27] <jstubbs> PROFILE_PATH            = "/etc/make.profile"
[17:27] <jstubbs> MAKE_DEFAULTS_FILE      = PROFILE_PATH + "/make.defaults"
[17:28] <jstubbs> profiledir=None
[17:28] <jstubbs> if os.path.exists(MAKE_DEFAULTS_FILE):
[17:28] <jstubbs>         profiledir = PROFILE_PATH
[17:28] <jstubbs> # Pre-Pend ARCH variable to USE settings so '-*' in env doesn't kill arch.
[17:28] <jstubbs>                 if profiledir:
[17:28] <jstubbs>                         if self.configdict["defaults"].has_key("ARCH"):


No longer valid assumptions... :/
Comment 6 Brian Harring (RETIRED) gentoo-dev 2004-12-22 05:34:26 UTC
empty files commited-
profiles/default-linux/x86/2004.0/make.defaults profiles/default-linux/x86/2004.2/make.defaults profiles/default-linux/x86/2004.2/gcc34/make.defaults profiles/default-linux/x86/2004.2/gcc34/2.6/make.defaults profiles/default-linux/x86/2004.3/make.defaults profiles/default-linux/x86/2005.0/make.defaults profiles/default-linux/x86/gcc2/make.defaults profiles/default-linux/x86/gcc31/make.defaults

This will correct the use x86 issues (which jason figured out).

Probably should follow this one up by announcing it on -dev so devs know to not do this again :)
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2004-12-22 06:34:23 UTC
*** Bug 75302 has been marked as a duplicate of this bug. ***
Comment 8 Carsten Lohrke (RETIRED) gentoo-dev 2004-12-22 06:35:19 UTC
"nice" bug
Comment 9 Marius Mauch (RETIRED) gentoo-dev 2004-12-22 15:33:36 UTC
*** Bug 75363 has been marked as a duplicate of this bug. ***
Comment 10 Jason Stubbs (RETIRED) gentoo-dev 2004-12-22 19:28:35 UTC
I wouldn't call adding files to bypass a bug in portage "FIXED"...
Comment 11 SpanKY gentoo-dev 2004-12-22 20:04:20 UTC
use.defaults also seems to be affected:
(1) remove USE from make.conf
(2) `emerge info | grep ^USE=`
USE="x86 X aalib acl adns alsa apm arts avi berkdb bitmap-fonts bonobo cdr crypt cscope cups directfb encode esd flac foomaticdb fortran gdbm ggi gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imlib ipv6 jpeg kde ldap libwww mad mikmod motif mozilla mpeg mysql nas ncurses nls oggvorbis opengl oss pam pdflib perl plotutils png python qt quicktime readline samba sdl snmp speex spell sqlite ssl svga tcltk tcpd tetex tiff truetype xml xml2 xmms xv zlib video_cards_nvidia"
(3) rm /etc/make.profile/make.defaults
(4) `emerge info | grep ^USE=`
USE="X acl apm arts avi berkdb bitmap-fonts crypt cups encode foomaticdb fortran gdbm gif gnome gpm gtk gtk2 ipv6 jpeg kde libwww mad mikmod motif mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl spell ssl svga tcpd truetype xml2 xmms xv zlib video_cards_nvidia"

notice that adns is missing from the second USE ... i have adns emerged, so use.defaults adds that to my USE for me in the first part
Comment 12 hodak 2004-12-22 23:28:34 UTC
This has not been directly mentioned here, but commiting make.defaults as empty files killed for me and other people (see Bug 75302) the /etc/make.profile/make.defaults file, which is really important (I am using 2004.2 profile).
Now my USE flags have changed, acl and ipv6 have been added and I do not even know what was taken out. At any rate, running "emerge -upDv --newuse world" wants to reemerge quite a few packages because of missing  empty make.profile.

Can this be fixed ASAP?
Comment 13 mrsteven 2004-12-23 02:50:23 UTC
Same problem here again. Really annoying... :(
Comment 14 SpanKY gentoo-dev 2004-12-23 06:04:07 UTC
i doubt what you're seeing is a bug

acl was added to a few profiles that were missing it ... if you dont want acl, put -acl into your USE
Comment 15 hodak 2004-12-23 10:45:32 UTC
So you are saying this was intentional? Sure I can set -acl and -ipv6, but it is confusing, since /etc/make.profile/make.defaults is now empty. According to Handbook this is where default USE flags are set. If the file does not exist, where are the default USE flags set?

Notice that in Bug 75302 people also complain about alsa, mozilla and cdr being unset.  Can you give some more information about all this (changing default USE flags, and why is make.defaults empty)? I have seen several posts in forums about this, so not only me, but other people are confused as well.
  
Comment 16 SpanKY gentoo-dev 2004-12-23 13:38:20 UTC
of course it was intentional

those profiles should have had acl/ipv6 in them, someone just neglected to add them

in terms of other USE flags, that's probably what i was talking about in comment # 10 (which jason also has since fixed in cvs)
Comment 17 mrsteven 2004-12-23 13:42:42 UTC
ufed doesn't work correctly anymore. It displays acl and ipv6 as if they were turned off, but they are turned on. I don't know if it works with profuse. Exit & Save broke my USE-Flags
Comment 18 SpanKY gentoo-dev 2004-12-23 13:52:03 UTC
ufed has never worked with cascading profiles, search bugzilla
Comment 19 hodak 2004-12-23 15:12:21 UTC
OK, if /etc/make.profile/make.defaults is now empty on purpose, where are the default USE flags set?

Also, wouldn't it be better if change like this (adding USE flags to existiong profiles that are in use for quite a while, emptying make.defaults), which many people will notice, would be announced in advance - on the main website or in the forums or perhaps in the Newsletter? I do not want to complain, but I think that changes like these should be announced before they happen.
Comment 20 SpanKY gentoo-dev 2004-12-23 15:19:32 UTC
see Bug 61275

in terms of docs, read http://www.gentoo.org/proj/en/releng/docs/cascading-profiles.xml
Comment 21 SpanKY gentoo-dev 2004-12-24 02:17:19 UTC
*** Bug 75152 has been marked as a duplicate of this bug. ***
Comment 22 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 05:48:10 UTC
Fixed on or before 2.0.51.22-r1 
Comment 23 Jason Stubbs (RETIRED) gentoo-dev 2005-07-14 06:58:48 UTC
Looking through the batch of bugs, I'm not sure that some of these are 
actually fixed in stable. Others, the requirements have possibly changed after 
the initial fix was committed. 
 
If you think this bug has been closed incorrectly, please reopen or ask that 
it be reopened.