Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93525 - bootstrap.sh ignores legal USE flags if set only in package.use
Summary: bootstrap.sh ignores legal USE flags if set only in package.use
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High trivial (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 105941 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-22 02:35 UTC by Leung Ki Chi
Modified: 2006-01-27 14:57 UTC (History)
0 users

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


Attachments
proposed fix (bootstrap.patch,580 bytes, patch)
2005-12-15 17:11 UTC, Mike Green
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leung Ki Chi 2005-05-22 02:35:00 UTC
If any of the USE flags allowed for bootstrapping (nls, nptl, nptlonly,  
multilib) is present only in /etc/portage/package.use without also being set  
in /etc/make.conf, bootstrap.sh will ignore the USE flag for that package.  
  
For example, if "sys-libs/glibc nptlonly" is present in package.use but there  
is no USE="nptlonly" in make.conf, running /usr/portage/scripts/bootstrap.sh  
will emerge glibc without the nptlonly USE flag.  
  
There is no warning about this, either in the Gentoo Handbook or anywhere in  
bootstrap.sh.  

Reproducible: Always
Steps to Reproduce:
1. echo "sys-libs/glibc nptlonly" >> /etc/portage/package.use 
2. Remove nptlonly from USE flags in make.conf. 
3. /usr/portage/scripts/bootstrap.sh -p -v 
 
Actual Results:  
The line in the output showing glibc's USE flags:  
  
[ebuild   N   ] sys-libs/glibc-2.3.4.20041102-r1  -build -debug -erandom  
-hardened (-multilib) +nls -nomalloccheck +nptl -nptlonly -pic -userlocales 0  
kB  

Expected Results:  
bootstrap.sh should build glibc with USE=nptlonly in the above command.  

emerge --info 
Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, 
glibc-2.3.4.20041102-r1, 2.6.11-gentoo-r9 i686) 
================================================================= 
System uname: 2.6.11-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 1.70GHz 
Gentoo Base System version 1.4.16 
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, May 19 2005, 20:01:52)] 
dev-lang/python:     2.3.5 
sys-apps/sandbox:    [Not Present] 
sys-devel/autoconf:  2.13, 2.59-r6 
sys-devel/automake:  1.9.5, 1.6.3, 1.8.5-r3, 1.7.9-r1, 1.5, 1.4_p6 
sys-devel/binutils:  2.15.92.0.2-r7 
sys-devel/libtool:   1.5.16 
virtual/os-headers:  2.6.8.1-r2 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CFLAGS="-mcpu=pentium4 -O2 -fomit-frame-pointer -pipe" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /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/lib/X11/xkb /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-mcpu=pentium4 -O2 -fomit-frame-pointer -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs autoconfig buildpkg ccache distlocks fixpackages sandbox 
sfperms strict userpriv usersandbox" 
GENTOO_MIRRORS="http://mirror.averse.net/pub/gentoo 
http://distfiles.gentoo.org" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
SYNC="rsync://mirror.averse.net/gentoo-portage" 
USE="x86 X alsa arts berkdb bitmap-fonts cjk crypt fam gdbm gif gpm 
imagemagick imlib ithreads jpeg kde kdeenablefinal mmx mmxext ncurses nlsnptl 
ogg oggvorbis opengl oss png qt readline sdl spell sse sse2 ssl tcltk threads 
tiff truetype truetype-fonts type1-fonts unicode vorbis xvzlib userland_GNU 
kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, 
PORTDIR_OVERLAY
Comment 1 Leung Ki Chi 2005-05-23 06:39:53 UTC
Added docs team to CC, since this bug may be worth noting in the Gentoo 
Handbook. 
Comment 2 SpanKY gentoo-dev 2005-09-14 05:54:30 UTC
*** Bug 105941 has been marked as a duplicate of this bug. ***
Comment 3 Mike Green 2005-12-15 17:05:01 UTC
The problem is on line 276 of bootstrap.sh.  STAGE1_USE is overwritten by the 
eval'ed python command on line 278 since STAGE1_USE is empty in the profile.  
STAGE1_USE should not be set by the eval, STAGE1_USE is set up earlier in the 
script. 
 
The solution is possibly to remove STAGE1_USE from the ENV_EXPORTS values. 
 
Comment 4 Łukasz Damentko (RETIRED) gentoo-dev 2005-12-15 17:10:21 UTC
Removing CC, stage1 is not supported and not mentioned in the Handbook. We 
encourage users to use stage3.
Comment 5 Mike Green 2005-12-15 17:11:45 UTC
Created attachment 74848 [details, diff]
proposed fix
Comment 6 Mike Green 2005-12-15 17:36:16 UTC
(In reply to comment #4) 
> Removing CC, stage1 is not supported and not mentioned in the Handbook. We  
> encourage users to use stage3. 
 
References to bootstrap.sh are mentioned in the documentation in the following 
three locations: 
 
http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml 
http://www.gentoo.org/doc/en/altinstall.xml#doc_chap4 
http://www.gentoo.org/doc/en/gentoo-sparc-quickinstall.xml 
 
Comment 7 SpanKY gentoo-dev 2005-12-15 19:12:33 UTC
Comment on attachment 74848 [details, diff]
proposed fix

no
Comment 8 SpanKY gentoo-dev 2005-12-15 19:13:02 UTC
as noted, stage[12] usage is deprecated now
Comment 9 Mike Green 2006-01-15 01:43:54 UTC
(In reply to comment #8)
> as noted, stage[12] usage is deprecated now
> 

Not to beat a dead horse, but bootstrap.sh is still a) mentioned in the FAQ, b) present in portage, and c) used by catalyst.  

The STAGE1_USE bug I mentioned above is a glaring bug - it unsets all bootstrap.sh supported stage1 use variables (nls, nptl, nptlonly, multilib, userlocales) before calling the actual emerge of the packages.  The only way this bug could be circumvented would be to set STAGE1_USE in make.conf (perhaps catalyst does it this way?).  

There are lots of people who still prefer stage1/bootstrap installs, if nothing else simple bugs like this should be fixed for them.  Otherwise, if it is truly deprecated and is no longer supported, why does it remain in portage?
Comment 10 SpanKY gentoo-dev 2006-01-26 06:22:47 UTC
> The problem is on line 276 of bootstrap.sh.  STAGE1_USE is overwritten by the 
> eval'ed python command on line 278 since STAGE1_USE is empty in the profile.  
> STAGE1_USE should not be set by the eval, STAGE1_USE is set up earlier in the 
> script. 

unrelated to this bug report
Comment 11 SpanKY gentoo-dev 2006-01-26 16:21:16 UTC
> If any of the USE flags allowed for bootstrapping (nls, nptl, nptlonly,  
> multilib) is present only in /etc/portage/package.use without also being set  
> in /etc/make.conf, bootstrap.sh will ignore the USE flag for that package.  

due to the way bootstrap.sh is written, i dont think we can really pick out the flags sanely

however, ive added a check to see if package.use is being utilized and if so, the process will halt and warn the user about the issue