Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 104414 - catalyst handles use flags incorrectly
Summary: catalyst handles use flags incorrectly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2005-08-31 12:21 UTC by Jason Pepas
Modified: 2005-12-20 09:16 UTC (History)
0 users

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


Attachments
wrapper script for catalyst (catalyst.sh,2.29 KB, text/plain)
2005-09-01 07:04 UTC, Jason Pepas
Details
host specific config file (digits-catalyst-config,361 bytes, text/plain)
2005-09-01 07:05 UTC, Jason Pepas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Pepas 2005-08-31 12:21:12 UTC
catalyst incorrectly handles use flags when creating make.conf for the chroot of
a stage1 livecd build.  the result looks like USE=o p e n g l  g n o m e...

Reproducible: Always
Steps to Reproduce:
1. use catalyst with the --cli option, with the livecd/use="..." command line
option.

Actual Results:  
borked /etc/make.conf USE setting.


the problem is in generic_stage_target.py, around line 345, when myusevars is
being extended with self.settings["use"]:

if self.settings.has_key("use"):
    myusevars.extend(self.settings["use"])
    myf.write('USE="'+string.join(myusevars)+'"\n')

at this point, self.settings["use"] is a string (ie, "opengl gnome -ipv6"). 
passing a string to extend() creates a list like ['o','p','e','n','g','l'...,
which then gets turned back into a space delimited string in the following line
by a call to string.join(), which results in a USE setting of "o p e n g l...".

all we need to do is add a call to split() to fix this:

if self.settings.has_key("use"):
    myusevars.extend(self.settings["use"].split())
    myf.write('USE="'+string.join(myusevars)+'"\n')
Comment 1 Chris Gianelloni (RETIRED) gentoo-dev 2005-09-01 06:42:46 UTC
Sorry, you mean livecd-stage1, not stage1, correct?

By the way, in case you haven't noticed, I don't think any of us actually use
--cli for doing *everything* from the spec files, so I really appreciate all the
work (and fixes!) you're doing.
Comment 2 Jason Pepas 2005-09-01 07:04:12 UTC
Created attachment 67409 [details]
wrapper script for catalyst
Comment 3 Jason Pepas 2005-09-01 07:05:59 UTC
Created attachment 67410 [details]
host specific config file
Comment 4 Jason Pepas 2005-09-01 07:06:20 UTC
oops, yeah, I meant livced-stage1.

Yeah, I use the cli options because I am working up a wrapper script for
catalyst, as there are a bunch of config items common to livecd stage 1 and 2. 
I am using this to create a "server on livecd".  The advantages there are that
if you get hacked, you can simply reboot to (temporarily) unhack your system. 
Also, if anything goes wrong with an upgraded piece of software, you can simply
revert to the previous livecd.

I have attached what I have so far, in case any of you are interested.
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2005-09-01 08:01:41 UTC
This has been added to catalyst 2's CVS and will be RESOLVED when the first cat2
version is released.
Comment 6 Jason Pepas 2005-09-22 12:57:13 UTC
by the way, I put up a page with my patches for catalyst 1.x

http://www.ices.utexas.edu/~cell/gentoo/catalyst/
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2005-12-20 09:16:09 UTC
Since the catalyst 2.0_rc* series is no longer in package.mask, I am marking this one as RESOLVED...