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

Bug 546512

Summary: USE_EXPAND affects subsequent lines of same atom in package.use
Product: Portage Development Reporter: Albert Safin <xzfcpw+gentoo>
Component: Core - ConfigurationAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: minor CC: xzfcpw+gentoo
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 484436    
Attachments: log
Make USE_EXPAND do not affect subsequent lines of same atom in package.use

Description Albert Safin 2015-04-14 02:44:10 UTC
If you have
    cat/pkg use1
    cat/pkg FOO: use2
    cat/pkg use3
in your package.use, portage handles this as
    cat/pkg use1 foo_use2 foo_use3
, not
    cat/pkg use1 foo_use2 use3

Reproducible: Always

Steps to Reproduce:
1. Replace package.use contents with these two lines:
    */* ABI_X86: 32 64
    */* sqlite3
2. Run `emerge --info`
Actual Results:  
USE does not contains sqlite3, but ABI_X86 does (i.e. ABI_X86="64 32 sqlite3")

Expected Results:  
USE should countain "sqlite3", ABI_X86 should be "64 32"
Comment 1 Albert Safin 2015-04-14 02:50:40 UTC
Created attachment 401194 [details]
log
Comment 2 Albert Safin 2015-04-14 21:14:19 UTC
Created attachment 401272 [details, diff]
Make USE_EXPAND do not affect subsequent lines of same atom  in package.use

Patch for latest git version (9b74a79004288572e42140c8084126a4c223fa0d)
Comment 3 Zac Medico gentoo-dev 2015-04-16 17:37:43 UTC
Your patch looks pretty reasonable to me. However, when adding new function parameters please use True/False for boolean values rather than integers. The use of integers for boolean values is a style quirk that we should not propagate.
Comment 4 Brian Dolbec (RETIRED) gentoo-dev 2015-04-16 17:44:38 UTC
Yeah, patch looks good otherwise.

Zac, do you want to make an additional patch to change those 0/1 to True/False while we're in here making changes?
Comment 5 Zac Medico gentoo-dev 2015-04-19 20:01:54 UTC
(In reply to Brian Dolbec from comment #4)
> Zac, do you want to make an additional patch to change those 0/1 to
> True/False while we're in here making changes?

Yeah, maybe later today. I've started a branch here:

https://github.com/zmedico/portage/tree/bug_546512

And I've posted the first patch for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/44505cbb0d4d10301f511cd1f7a40c90
Comment 7 Brian Dolbec (RETIRED) gentoo-dev 2015-05-19 19:41:46 UTC
Released in portage-2.2.19