Summary: | portage-utils-0.87: qlist -F output mangles USE flags. | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Robin Johnson <robbat2> |
Component: | Unclassified | Assignee: | Portage Utils Team <portage-utils> |
Status: | CONFIRMED --- | ||
Severity: | major | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Robin Johnson
2020-05-24 05:16:16 UTC
This is an interesting case. Thanks, will review the README directions too. Ok, just to clarify what happens here. qlist -U adds a list of USE-flags enabled for the package after printing the package, that is, the string as given in -F. qlist -vU adds a list of all USE-flags, and flags those not enabled by prefixing them with a '-'. The %{USE} formatter in -F would print the USE-dependencies specified for the atom. E.g. this is what would be found in a dependency string: foo/bar-4[-fnord,ssl:=] For example: % ./qatom -F '{"cp": "%{CAT}/%{PN}", "pv":"%{PV}", pvr:"%{PVR}", slot: "%{SLOT}", subslot:"%[SUBSLOT]", repo:"%{REPO}", use:"%[USE]"}' "foo/bar-4[-fnord,ssl:=]" {"cp": "foo/bar", "pv":"4", pvr:"4", slot: "<unset>", subslot:"", repo:"<unset>", use:"-fnord ssl:="} What you seem to have found is that %{USE} always prints the starting '[', but doesn't bother to close it if there's no USE-deps specified. That needs fixing, both your queries should show an empty expansion when used with [] and "<unset>" when used with {}. What you seem to want to do, is not just possible with qlist right now. It seems currently a separate step is required. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=a68b9b4ebc840805f504fe681196e7f15737985d commit a68b9b4ebc840805f504fe681196e7f15737985d Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2020-05-25 11:03:36 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2020-05-25 11:03:36 +0000 libq/atom: fixup USE-dep printing in atom_format Bug: https://bugs.gentoo.org/724892 Signed-off-by: Fabian Groffen <grobian@gentoo.org> libq/atom.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) |