Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132338 - portage wipes $FEATURES on cloned configs if FEATURES is in environment
Summary: portage wipes $FEATURES on cloned configs if FEATURES is in environment
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
: 132196 (view as bug list)
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2006-05-05 06:00 UTC by Marius Mauch (RETIRED)
Modified: 2006-05-05 15:45 UTC (History)
1 user (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 Marius Mauch (RETIRED) gentoo-dev 2006-05-05 06:00:53 UTC
$ export FEATURES="foo"
$ python
Python 2.4.3 (#1, May  5 2006, 12:56:02) 
[GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import portage
>>> c=portage.config(clone=portage.settings)
>>> c["FEATURES"]
'-* foo'
>>> portage.settings["FEATURES"]
'autoconfig distlocks foo metadata-transfer nostrip sandbox sfperms sign strict userpriv usersandbox verify-rdepend'
>>> 
$ emerge -V
Portage 2.1_pre10-r2 (default-linux/amd64/2005.1, gcc-3.4.6, glibc-2.4-r2, 2.6.16-gentoo-r3 x86_64)

Noticed as this caused my last few repoman commits to go unsigned.
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2006-05-05 06:04:27 UTC
Doesn't seem to happen with other incrementals btw.
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2006-05-05 06:46:37 UTC
looking a bit closer this seems to be caused by the following parts in config.__init__():

self.features = portage_util.unique_array(self["FEATURES"].split())
self.regenerate()
self["FEATURES"] = " ".join(self.features)
self.backup_changes("FEATURES")

and later on (but earlier at runtime):

self.features.sort()
self["FEATURES"] = " ".join(["-*"]+self.features)
self.backup_changes("FEATURES")

The -* in the second part was a fix/workaround for bug #79566 (still from the cvs era), this worked until recently, at a guess either r3292, r3293 or r3318 broke it.
Comment 3 Zac Medico gentoo-dev 2006-05-05 10:16:52 UTC
This seems like a duplicate of bug 132196 (though it would be hard to guess from the summary).  I believe it's fixed in svn r3318.  I was wondering about the -* being added and I'd like to take that out if it's safe.
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2006-05-05 11:13:11 UTC
(In reply to comment #3)
> This seems like a duplicate of bug 132196 (though it would be hard to guess
> from the summary).  I believe it's fixed in svn r3318.  I was wondering about
> the -* being added and I'd like to take that out if it's safe.

Not quite the same bug AFAICT, it's more the opposite of it, but probably the same cause. But yeah, r3318 seems to fix it, though it gets -* preprended twice with it (but that's cosmetic), sorry for not testing that earlier.
As for taking the -* out, well you now have the bug that added it, so if you remove it make sure you don't reopen that bug.
Comment 5 Zac Medico gentoo-dev 2006-05-05 11:42:39 UTC
I've had quite a bit of trouble getting this fixed properly (while not breaking other things) but I believe that it's properly fixed as of svn r3320.

For reference, these bugs are related:

bug 79566
bug 132196
bug 131820
Comment 6 Zac Medico gentoo-dev 2006-05-05 15:19:58 UTC
*** Bug 132196 has been marked as a duplicate of this bug. ***
Comment 7 Zac Medico gentoo-dev 2006-05-05 15:45:46 UTC
This has been released in 2.1_pre10-r3.