Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 471842 - app-portage/porthole-0.6.1-r1 shows unknown USE flags like "video_cards_intel"
Summary: app-portage/porthole-0.6.1-r1 shows unknown USE flags like "video_cards_intel"
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Deadline: 2020-03-18
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2013-05-30 20:12 UTC by Jonas Stein
Modified: 2020-03-19 07:43 UTC (History)
5 users (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 Jonas Stein gentoo-dev 2013-05-30 20:12:06 UTC
Portage shows unknown useflags like "video_cards_intel" for package xorg-drivers, while they are named different in emerge -pv output

$ emerge -pv xorg-drivers

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] x11-base/xorg-drivers-1.13  INPUT_DEVICES="evdev keyboard mouse -acecad -aiptek -elographics -fpit -hyperpen -joystick -mutouch -penmount -synaptics -tslib -vmmouse -void -wacom" VIDEO_CARDS="intel -apm -ark -ast -chips -cirrus -dummy -epson -fbdev -fglrx (-geode) -glint -i128 (-i740) -mach64 -mga -modesetting -neomagic (-newport) -nouveau -nv -nvidia (-omap) (-omapfb) -qxl -r128 -radeon -rendition -s3 -s3virge -savage -siliconmotion -sis -sisusb (-sunbw2) (-suncg14) (-suncg3) (-suncg6) (-sunffb) (-sunleo) (-suntcx) -tdfx -tga -trident -tseng -v4l -vesa -via -virtualbox -vmware (-voodoo)" 0 kB


Reproducible: Always
Comment 1 Brian Dolbec gentoo-dev 2013-06-01 14:01:39 UTC
These flags are actual use flags as reported by the portage API used.  They are translated from the USE_INPUT= VIDEO_CARDS= statements in make.conf.  They are then expanded into the ones reported by portage and then displayed by porthole.

The majority of USE_EXPAND type use flags are filtered out as they are considered hidden, (by the portage API).  At this time, I do not believe that there is a portage API available that will separate out those.  That "emerge -pv" output was performed by emerge's output formatting, which special cases those.  If I am correct, I would have to special case those also.

I am cc'ing zmedico on this.  Maybe that API has changed since I last worked on that code.

The number of packages using USE_EXPAND type use flags has been growing.
Comment 2 Brian Dolbec gentoo-dev 2013-06-01 14:20:46 UTC
I might also add that these flags can also be set in /etc/portage/package.use like all other USE flags.  One of the now more widely used USE_EXPAND flags is now PYTHON_TARGETS

eg:

big_daddy catalyst # emerge -pv dev-python/astng

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] dev-python/astng-0.24.2  USE="{-test}" PYTHON_TARGETS="python2_6 python2_7 python3_2 -pypy1_9 -pypy2_0" 0 kB

The new python eclasses add those flags to the IUSE in the ebuild using:

PYTHON_COMPAT=( python{2_6,2_7,3_2} pypy{1_9,2_0} )

into:

IUSE: test, python_targets_python2_6, python_targets_python2_7, python_targets_python3_2, python_targets_pypy1_9, python_targets_pypy2_0


Zac, is there a method (API) to get a list of USE_EXPAND variables not hidden, much like portdbapi.settings["categories"]?
That would make it possible to keep up with an ever changing exception list.
Comment 3 Zac Medico gentoo-dev 2013-06-02 00:03:42 UTC
(In reply to Brian Dolbec from comment #1)
> The majority of USE_EXPAND type use flags are filtered out as they are
> considered hidden, (by the portage API).  At this time, I do not believe
> that there is a portage API available that will separate out those.  That
> "emerge -pv" output was performed by emerge's output formatting, which
> special cases those.  If I am correct, I would have to special case those
> also.

There's no public portage API for this. These are the locations of the relevant private portage functions:

pym/_emerge/resolver/output.py: def _display_use(self, pkg, pkg_info):
pym/_emerge/resolver/output.py: def map_to_use_expand(self, myvals, forced_flags=False,
pym/_emerge/UseFlagDisplay.py:def pkg_use_display(pkg, opts, modified_use=None):

(In reply to Brian Dolbec from comment #2)
> Zac, is there a method (API) to get a list of USE_EXPAND variables not
> hidden, much like portdbapi.settings["categories"]?
> That would make it possible to keep up with an ever changing exception list.

For example, see that pkg_use_display function in pym/_emerge/UseFlagDisplay.py. It goes through everything in USE_EXPAND, and searches for flags in IUSE that start with the corresponding lowercase flag_prefix. In the display, it excludes any flags corresponding to USE_EXPAND_HIDDEN variables.
Comment 4 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2020-03-19 07:43:13 UTC
Removed.