Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 530222

Summary: sys-apps/portage: treats USE_EXPAND variables in make.defaults as semi-incremental
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: CoreAssignee: Portage team <dev-portage>
Severity: normal CC: cdf123, pms
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
See Also:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 484436    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-11-23 19:16:23 UTC
Let's say I have two profiles: base and subprofile, with subprofile inheriting base. If base has:

  PYTHON_TARGETS="python2_7 python3_4"

and subprofile has:


Portage appends 3.3 as if PYTHON_TARGETS were incremental. However, if I do:

  PYTHON_TARGETS="-* python3_3"

It complains:

  Invalid '-' operator in non-incremental variable 'PYTHON_TARGETS': '-*'

and ignores the unset.

Now, reading PMS. '5.3.2 Specific variables and their meanings' says:

    Defines a list of variables which are to be treated incrementally
    and whose contents are to be expanded into the USE variable as passed
    to ebuilds. See section 11.1.1 for details.

So I'd say Portage should treat it fully incrementally, and respect '-flag' incl. '-*'. CC-ing pms-bugs@ to confirm.
Comment 1 Zac Medico gentoo-dev 2014-11-23 21:05:35 UTC
I have a patch in this branch:

I'll post it for review after I've added some unit tests.
Comment 2 Zac Medico gentoo-dev 2014-11-27 07:36:14 UTC
I've posted a patch with tests for review here:
Comment 3 Zac Medico gentoo-dev 2014-11-27 08:05:55 UTC
This is in the master branch now:
Comment 4 Zac Medico gentoo-dev 2014-11-27 08:20:55 UTC
(In reply to Zac Medico from comment #3)
> This is in the master branch now:
> ffbc3416f535752e50a60adfaf0d64486c50a035

The above commit broke tests strangely somehow, so here it is with fixup:
Comment 5 Zac Medico gentoo-dev 2014-11-27 08:51:54 UTC
Here's the final version which uses filter(None, self.make_defaults_use) to fix the previously mentioned test failure:
Comment 6 Brian Dolbec gentoo-dev 2014-12-04 05:36:49 UTC
This is in the portage-2.2.15 release.
Comment 7 Zac Medico gentoo-dev 2015-03-04 22:26:35 UTC
*** Bug 351591 has been marked as a duplicate of this bug. ***