Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683430 - app-portage/portage-utils: qdepends -Q no longer usable for subslot matches
Summary: app-portage/portage-utils: qdepends -Q no longer usable for subslot matches
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 683432
  Show dependency tree
 
Reported: 2019-04-16 01:01 UTC by Kent Fredric (IRC: kent\n) (RETIRED)
Modified: 2019-07-19 08:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
qdepends -Q regex fix (portage-utils-0.74-qdepends-Q-regex.patch,2.28 KB, patch)
2019-05-07 08:09 UTC, Fabian Groffen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-04-16 01:01:59 UTC
This looks like a side effect of how bug 608960 was fixed.

In app-admin/gentoo-perl-helpers, I was using -Q to find all packages that depend on slots of perl other than a given one, that is, I was passing to -Q the following regex:

"dev-lang/perl(|-5\.[^: ]+):0/(5\\.26|5\\.24|5\\.22|5\\.20|5\\.18|5\\.16)="

This is intended to match:

- Any dependency that requires any version of perl
- Assuming it binds to a slot other than "0/5.28" ( the target for installation )

On my current system, that expression would, with 0.64, emit a list of 400 packages.

On 0.73 and 0.74, it now returns 0 matches.

The same problems are true for the simpler expressions:

  "dev-lang/perl(|-5[.][^: ]+):0/5.26="  ( Matching anything that depends on subslot 0/5.26, regardless of what version was used in the dep spec )

  "dev-lang/perl:0/5.2[2-6]" ( As above, but no longer supporting an optional version part )

  "dev-lang/perl:0/5.26" ( A simplified version of above that only matches a simple string )

And the *only* thing that seems to work is the string:

  "dev-lang/perl:0/5.26="

This unfortunately means that gentoo-perl-helpers is broken with these new versions of portage-utils, and I either have to 

a) Find a different way of using portage-utils to achieve this
b) Implement this in a much messier way with painful directory traversal and sloppy use of grep

The *intent* here is to find subslot matches that *would* be required to install a *different* new subslot, so I can produce a minimal set of packages for portage to consider for reinstallation.
Comment 1 Fabian Groffen gentoo-dev 2019-04-16 06:39:42 UTC
Which version of portage-utils are you using?  If not -9999 could you please start with that one (I did a full rewrite).

With -9999 you can give multiple packages to -Q, e.g.:

% ./qdepends -Q dev-lang/perl dev-lang/perl:0/5.2{6,4,2,0}=

I did not plan on bringing back the regex behaviour, but instead work with atom syntax.  E.g. the idea is that you can use "depend" syntax to specify what you want to search.

Above query for me matches things like

perl-core/File-Temp-0.230.400-r1: dev-lang/perl:0/5.28=[-build(-)]
app-portage/gentoolkit-dev-0.3.1: sys-apps/diffutils !>=app-portage/gentoolkit-0.4.0 sys-apps/portage[python_targets_python2_7(+),-python_single_target_python2_7(+),-python_single_target_python3_4(+),-python_single_target_python3_5(+)] >=dev-lang/python-exec-2:2/2=[python_targets_python2_7(-),-python_single_target_python2_7(-),-python_single_target_python3_4(-),-python_single_target_python3_5(-)] >=dev-lang/python-2.7.5-r2:2.7[xml] dev-lang/perl
cdev-util/gtk-doc-am-1.25-r1: virtual/pkgconfig !<dev-util/gtk-doc-1.25 app-arch/xz-utils >=dev-lang/perl-5.18

Not sure the SLOT-less ones are correct for this query, I made comparisons of SLOT vs SLOTless in qatom always return EQUAL, but perhaps this needs refinement based on where it comes from.
Comment 2 Fabian Groffen gentoo-dev 2019-04-16 08:30:11 UTC
sorry, -qQ to reduce the clutter:

perl-core/File-Temp-0.230.400-r1: dev-lang/perl:0/5.28=[-build(-)]
app-portage/gentoolkit-dev-0.3.1: dev-lang/perl
dev-util/gtk-doc-am-1.25-r1: >=dev-lang/perl-5.18
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-04-17 19:09:15 UTC
(In reply to Fabian Groffen from comment #1)
> Which version of portage-utils are you using?  If not -9999 could you please
> start with that one (I did a full rewrite).

This was using the ones available in keyworded portage, both 0.73 and 0.74

I locally downgraded to 0.64 as a workaround.

Will try to re-test with -9999 if I get time.
Comment 4 Fabian Groffen gentoo-dev 2019-04-19 11:03:14 UTC
can you point me to the source of where you call qdepends?  I'd like to understand exactly what you're looking for and what results would be correct.
Comment 5 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-04-23 08:03:52 UTC
(In reply to Fabian Groffen from comment #1)
> Which version of portage-utils are you using?  If not -9999 could you please
> start with that one (I did a full rewrite).

I don't have -9999 visible in any overlay I currently have, is there one with it that I don't know of?

I'll get back to you on that other question, its not readily visible the way you'd expect in the source, as the exact match rules are assembled.
Comment 6 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-04-23 08:47:20 UTC
https://github.com/gentoo-perl/gentoo-perl-helpers/blob/master/libexec/gen-upgrade-sets#L62-L63

>  dorun installed-deps-perl-subslot-rebuild "${destsubslot}" | grep -v '^perl-core/' ||\
> die "No packages detected needing recompilation against ${perl_target}, perhaps you've already upgraded to it?"

https://github.com/gentoo-perl/gentoo-perl-helpers/blob/master/libexec/installed-deps-perl-subslot-rebuild#L19-L20

> regex=$(dorun print-excluded-abi-regex "${subslot}")
> dorun installed-deps-atom "${regex}"

$ gentoo-perl print-excluded-abi-regex 5.28
> dev-lang/perl(|-5\.[^: ]+):0/(5\.26|5\.24|5\.22|5\.20|5\.18|5\.16)=


https://github.com/gentoo-perl/gentoo-perl-helpers/blob/master/libexec/installed-deps-atom#L21-L25

>  for PHASE in "depend" "rdepend" "pdepend"; do
>  einfo "revdep ${PHASE^^} scanning for ${atom}"
>  qdepends --nocolor --${PHASE} --quiet --query "${atom}" |\
>           xargs qdepends --nocolor --quiet -k SLOT | sed 's/: /:/'           |\
>           xargs qatom --quiet --nocolor --format "%{CATEGORY}/%{PN}%[SLOT]"  |\
>           sed -r 's|:([^/]*)/[^/]*|:\1|'       || ewarn "No matches in ${PHASE^^}"
> done

The Point here is to solve the situation when portage barfs without a solve due to subslot operator dependencies in VDB.

My "Go-To" solution is to scrape the VDB for all dependencies that depend on a subslot *other* than the to-be-installed target, produce a list, and coerce portage into only considering them for reinstallation.

And it has to match *other* than target to mitigate the problem of a failed partial upgrade, where the target package was upgraded, but VDB is still full of things that need the old subslot, or say, somebody forced an upgrade with slot-operator handling disabled.

This allows the tool to identify packages that are *yet* to be reinstalled and only select those for portage's consideration ( which in practice is more reliable than fussing with --resume or --keep-going )

And the trailing modifiers convert VDB results into reduced CAT/PN:SLOT sets that can be passed to portage, because it doesn't make sense to ask portage to reinstall the same exact version ( that's prone to problems as soon as the VDB has versions that aren't in ::gentoo ), and only ask to install the package of the same slot (and this avoids problems with portage trying to install the wrong slots when multiple slots exist )
Comment 7 Fabian Groffen gentoo-dev 2019-04-23 08:57:36 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #5)
> (In reply to Fabian Groffen from comment #1)
> > Which version of portage-utils are you using?  If not -9999 could you please
> > start with that one (I did a full rewrite).
> 
> I don't have -9999 visible in any overlay I currently have, is there one
> with it that I don't know of?

https://gitweb.gentoo.org/repo/gentoo.git/tree/app-portage/portage-utils

> I'll get back to you on that other question, its not readily visible the way
> you'd expect in the source, as the exact match rules are assembled.

Your description is helpful.  Just one question.

I think I can help you here, a lot of the info is readily available to q*.  Is it a huge problem for you if starting from version X of portage-utils you could use a different approach and the old doesn't work any more?  I'll see to whether adding regex is possible with reasonable work, but I changed some fundamental things in (most of) the tools.
Comment 8 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-04-23 11:03:34 UTC
(In reply to Fabian Groffen from comment #7)
> (In reply to Kent Fredric (IRC: kent\n) from comment #5)
> > (In reply to Fabian Groffen from comment #1)
> > > Which version of portage-utils are you using?  If not -9999 could you please
> > > start with that one (I did a full rewrite).
> > 
> > I don't have -9999 visible in any overlay I currently have, is there one
> > with it that I don't know of?
> 
> https://gitweb.gentoo.org/repo/gentoo.git/tree/app-portage/portage-utils


Yeah, that was my mistake, eix hadn't updated its index properly and didn't show it. :)

> > I'll get back to you on that other question, its not readily visible the way
> > you'd expect in the source, as the exact match rules are assembled.
> 
> Your description is helpful.  Just one question.
> 
> I think I can help you here, a lot of the info is readily available to q*. 
> Is it a huge problem for you if starting from version X of portage-utils you
> could use a different approach and the old doesn't work any more?  I'll see
> to whether adding regex is possible with reasonable work, but I changed some
> fundamental things in (most of) the tools.

Yeah, *ideally* a solution for this that involves substantially fewer steps would be greatly welcome. 

If there was a simple interface that could answer the question: 

"What is the list of CAT/PN:SLOT that needs to be reinstalled to satisfy an installation of CAT/PN:SLOT/SUBSLOT" (considering all RDEPEND,PDEPEND,DEPEND, etc automatically in a single pass), I would gladly use that instead.

*Most* of my tooling as-is exists mostly to implement an approximation of this.

I'm completely fine with adding a minimum portage-utils version dep to make this work.
Comment 9 Fabian Groffen gentoo-dev 2019-04-23 12:33:36 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #8)
> If there was a simple interface that could answer the question: 
> 
> "What is the list of CAT/PN:SLOT that needs to be reinstalled to satisfy an
> installation of CAT/PN:SLOT/SUBSLOT" (considering all
> RDEPEND,PDEPEND,DEPEND, etc automatically in a single pass), I would gladly
> use that instead.

If this is the core question, then it seems to me:
- CAT/PN:SLOT is just a custom format (as seen with qatom)
- match for CAT/PN:SLOT/SUBSLOT is qdepends -Qa work

I actually think (but there's probably a pitfall somewhere) this is very simple to put together.
Comment 10 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-04-24 11:15:20 UTC
Hmm, I also just noticed qdepends no longer supports -k :/
Comment 11 Fabian Groffen gentoo-dev 2019-04-24 12:19:11 UTC
what key were you using?
Comment 12 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-04-26 18:47:23 UTC
(In reply to Fabian Groffen from comment #11)
> what key were you using?

SLOT
Comment 13 Fabian Groffen gentoo-dev 2019-05-06 16:06:29 UTC
(In reply to Fabian Groffen from comment #9)
> (In reply to Kent Fredric (IRC: kent\n) from comment #8)
> > If there was a simple interface that could answer the question: 
> > 
> > "What is the list of CAT/PN:SLOT that needs to be reinstalled to satisfy an
> > installation of CAT/PN:SLOT/SUBSLOT" (considering all
> > RDEPEND,PDEPEND,DEPEND, etc automatically in a single pass), I would gladly
> > use that instead.
> 
> If this is the core question, then it seems to me:
> - CAT/PN:SLOT is just a custom format (as seen with qatom)
> - match for CAT/PN:SLOT/SUBSLOT is qdepends -Qa work
> 
> I actually think (but there's probably a pitfall somewhere) this is very
> simple to put together.

Is this what you're after?

% ./qdepends -qQF"%[CATEGORY]%[PF]%[SLOT]" dev-lang/perl:0/5.28=
net-misc/keychain-2.8.5:0: dev-lang/perl
virtual/perl-version-0.992.300:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-Digest-MD5-2.550.0:0: =dev-lang/perl-5.28* =dev-lang/perl-5.26* dev-lang/perl:0/5.28=
virtual/perl-Text-ParseWords-3.300.0-r4:0: =dev-lang/perl-5.28* =dev-lang/perl-5.26* =dev-lang/perl-5.24* dev-lang/perl:0/5.28=
virtual/perl-MIME-Base64-3.150.0-r4:0: =dev-lang/perl-5.28* =dev-lang/perl-5.26* =dev-lang/perl-5.24* dev-lang/perl:0/5.28=
virtual/perl-CPAN-Meta-2.150.10-r1:0: =dev-lang/perl-5.28* =dev-lang/perl-5.26* dev-lang/perl:0/5.28=
virtual/perl-IO-1.390.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-CPAN-Meta-YAML-0.18.0-r3:0: =dev-lang/perl-5.28* =dev-lang/perl-5.26* =dev-lang/perl-5.24* dev-lang/perl:0/5.28=
virtual/perl-XSLoader-0.300.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-libnet-3.110.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-ExtUtils-MakeMaker-7.340.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-Perl-OSType-1.10.0-r1:0: =dev-lang/perl-5.28* =dev-lang/perl-5.26* dev-lang/perl:0/5.28=
virtual/perl-File-Temp-0.230.400-r5:0: dev-lang/perl:0/5.28=
virtual/perl-ExtUtils-CBuilder-0.280.230:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-Digest-SHA-6.10.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-Data-Dumper-2.170.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-Scalar-List-Utils-1.500.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-Parse-CPAN-Meta-2.150.10-r1:0: =dev-lang/perl-5.28* =dev-lang/perl-5.26* dev-lang/perl:0/5.28=
virtual/perl-Test-Harness-3.420.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-File-Spec-3.740.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-ExtUtils-Manifest-1.700.0-r5:0: =dev-lang/perl-5.28* =dev-lang/perl-5.26* =dev-lang/perl-5.24* dev-lang/perl:0/5.28=
virtual/perl-JSON-PP-2.970.10:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-podlators-4.100.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-Module-Metadata-1.0.33-r1:0: =dev-lang/perl-5.28* =dev-lang/perl-5.26* dev-lang/perl:0/5.28=
virtual/perl-Exporter-5.730.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-ExtUtils-Install-2.140.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-Getopt-Long-2.500.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
virtual/perl-ExtUtils-ParseXS-3.390.0:0: =dev-lang/perl-5.28* dev-lang/perl:0/5.28=
net-dns/libidn2-2.1.1a:0: dev-lang/perl
sys-apps/texinfo-6.0:0: dev-lang/perl
sys-apps/groff-1.22.4:0: dev-lang/perl
sys-apps/help2man-1.47.8:0: dev-lang/perl
dev-libs/libtasn1-4.13:0/6: >=dev-lang/perl-5.6
dev-libs/openssl-1.1.0j-r1:0/1.1: >=dev-lang/perl-5
sys-devel/automake-1.15.1-r2:1.15: dev-lang/perl
sys-devel/autoconf-2.69-r4:2.69: >=dev-lang/perl-5.6
sys-devel/automake-1.16.1-r1:1.16: dev-lang/perl
dev-perl/Net-SSLeay-1.850.0:0: dev-lang/perl:0/5.28=
dev-perl/Module-Build-0.422.400:0: dev-lang/perl:0/5.28=
dev-perl/IO-Socket-SSL-2.52.0:0: dev-lang/perl:0/5.28=
dev-perl/Error-0.170.250:0: dev-lang/perl:0/5.28=
dev-perl/Locale-gettext-1.70.0:0: dev-lang/perl:0/5.28=
dev-perl/Net-SMTP-SSL-1.40.0:0: dev-lang/perl:0/5.28=
dev-perl/Text-Unidecode-1.300.0:0: dev-lang/perl:0/5.28=
dev-perl/libintl-perl-1.280.0:0: dev-lang/perl:0/5.28=
dev-perl/MailTools-2.190.0:0: dev-lang/perl:0/5.28=
dev-perl/Text-CSV_XS-1.340.0:0: dev-lang/perl:0/5.28=
app-portage/gentoolkit-dev-0.3.1:0: dev-lang/perl
dev-util/gtk-doc-am-1.25-r1:0: >=dev-lang/perl-5.18
dev-util/intltool-0.51.0-r2:0: dev-lang/perl
app-admin/perl-cleaner-2.27:0: dev-lang/perl
Comment 14 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-05-07 06:00:01 UTC
Mine doesn't emit any SLOT when I do that:

 qdepends -qQF"%[CATEGORY]%[PF]%[SLOT]" dev-lang/perl:0/5.28= | grep 'dev-qt/' 
dev-qt/qtpaths-5.12.2: dev-lang/perl
dev-qt/qtwebchannel-5.12.2: dev-lang/perl
dev-qt/designer-5.12.2: dev-lang/perl
dev-qt/qtgui-5.12.2: dev-lang/perl
dev-qt/qtx11extras-5.12.2: dev-lang/perl
dev-qt/qtwebengine-5.12.2: dev-lang/perl
dev-qt/qtxmlpatterns-5.12.2: dev-lang/perl
dev-qt/qtdeclarative-5.12.2: dev-lang/perl
dev-qt/qttest-5.12.2: dev-lang/perl
dev-qt/linguist-tools-5.12.2: dev-lang/perl
dev-qt/qtmultimedia-5.12.2: dev-lang/perl
dev-qt/qtconcurrent-5.12.2: dev-lang/perl
dev-qt/qtquickcontrols-5.12.2: dev-lang/perl
dev-qt/qtgraphicaleffects-5.12.2: dev-lang/perl
dev-qt/qtwayland-5.12.2: dev-lang/perl
dev-qt/qtvirtualkeyboard-5.12.2: dev-lang/perl
dev-qt/qtopengl-5.12.2: dev-lang/perl
dev-qt/qtxml-5.12.2: dev-lang/perl
dev-qt/qdbus-5.12.2: dev-lang/perl
dev-qt/qtwebkit-5.212.0_pre20180120: dev-lang/perl
dev-qt/qtsql-5.12.2: dev-lang/perl
dev-qt/qtnetwork-5.12.2: dev-lang/perl
dev-qt/qtprintsupport-5.12.2: dev-lang/perl
dev-qt/qtcore-5.12.2: dev-lang/perl
dev-qt/qtwidgets-5.12.2: dev-lang/perl
dev-qt/qtsvg-5.12.2: dev-lang/perl
dev-qt/qtquickcontrols2-5.12.2: dev-lang/perl
dev-qt/qtsensors-5.12.2: dev-lang/perl
dev-qt/qtscript-5.12.2: dev-lang/perl
dev-qt/qtdbus-5.12.2: dev-lang/perl


All those dev-qt/ things should be  :5 

qdepends -qQF"%[CATEGORY]%[PF]%[SLOT]" dev-lang/perl:0/5.28= | grep 'automake'
sys-devel/automake-1.16.1-r1: dev-lang/perl
sys-devel/automake-1.15.1-r2: dev-lang/perl
sys-devel/automake-1.11.6-r3: dev-lang/perl

These should all have unique slot values ( 1.11, 1.15 and 1.16 respectively )
Comment 15 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-05-07 06:02:46 UTC
( Actually, I'm not sure they should match at all, given there is no subslot bound in the output, but I'll have to look into it )
Comment 16 Fabian Groffen gentoo-dev 2019-05-07 06:22:01 UTC
since 

commit 96a398aa2a3f63af154b3af12da5d5103b37b613
Author: Fabian Groffen <grobian@gentoo.org>
Date:   Mon May 6 18:03:19 2019 +0200

%[SLOT] will return something

with current HEAD (d26a4c6fab322e4310fad304258300e548384115) SLOT parsing can be confirmed with something simple as

% ./qdepends -F"%[CATEGORY]%[PF]%[SLOT]" sed
sys-apps/sed-4.5:0: virtual/libintl sys-devel/gettext
Comment 17 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-05-07 06:28:11 UTC
Opps,  my bad, didn't realise your reply was recent and hadn't synced yet:

 qdepends -qQF"%[CATEGORY]%[PF]%[SLOT]" dev-lang/perl:0/5.28= | grep 'automake'
sys-devel/automake-1.16.1-r1:1.16: dev-lang/perl
sys-devel/automake-1.15.1-r2:1.15: dev-lang/perl
sys-devel/automake-1.11.6-r3:1.11: dev-lang/perl


This is good in formatting, but I think its over-matching, I can't see any inherent slot dep.


qdepends -qQF"%[CATEGORY]%[PF]%[SLOT]" dev-lang/perl:0/5.2{0,2,4,6}= | grep 'automake'
sys-devel/automake-1.16.1-r1:1.16: dev-lang/perl
sys-devel/automake-1.15.1-r2:1.15: dev-lang/perl
sys-devel/automake-1.11.6-r3:1.11: dev-lang/perl

qdepends -qQF"%[CATEGORY]%[PF]%[SLOT]" dev-lang/perl:0/5.2{0,2,4,6}= | grep 'dev-qt'
dev-qt/qtpaths-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtwebchannel-5.12.2:5/5.12: dev-lang/perl
dev-qt/designer-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtgui-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtx11extras-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtwebengine-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtxmlpatterns-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtdeclarative-5.12.2:5/5.12: dev-lang/perl
dev-qt/qttest-5.12.2:5/5.12: dev-lang/perl
dev-qt/linguist-tools-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtmultimedia-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtconcurrent-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtquickcontrols-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtgraphicaleffects-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtwayland-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtvirtualkeyboard-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtopengl-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtxml-5.12.2:5/5.12: dev-lang/perl
dev-qt/qdbus-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtwebkit-5.212.0_pre20180120:5/5.212: dev-lang/perl
dev-qt/qtsql-5.12.2:5/5.12.2: dev-lang/perl
dev-qt/qtnetwork-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtprintsupport-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtcore-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtwidgets-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtsvg-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtquickcontrols2-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtsensors-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtscript-5.12.2:5/5.12: dev-lang/perl
dev-qt/qtdbus-5.12.2:5/5.12: dev-lang/perl

The matching here on only "dev-lang/perl" is also apparently overmatching, and I wasn't expecting the subslot, but I guess I can filter that aspect with sed.

But the previously mentioned multi-match approach gives completely wrong results:


qdepends -qQF"%[CATEGORY]%[PN]%[SLOT]" 'dev-lang/perl:0/5.2{8,6}='   | grep '5.28'
virtual/perl-ExtUtils-ParseXS:0: =dev-lang/perl-5.28*
virtual/perl-Socket:0: =dev-lang/perl-5.28*
virtual/perl-Compress-Raw-Bzip2:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-libnet:0: =dev-lang/perl-5.28*
virtual/perl-Text-Tabs+Wrap:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Carp:0: =dev-lang/perl-5.28*
virtual/perl-Digest-MD5:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-Test:0: =dev-lang/perl-5.28*
virtual/perl-Time-Piece:0: =dev-lang/perl-5.28*
virtual/perl-IO-Socket-IP:0: =dev-lang/perl-5.28*
virtual/perl-autodie:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Math-BigInt:0: =dev-lang/perl-5.28*
virtual/perl-parent:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-ExtUtils-MakeMaker:0: =dev-lang/perl-5.28*
virtual/perl-Digest-SHA:0: =dev-lang/perl-5.28*
virtual/perl-Compress-Raw-Zlib:0: =dev-lang/perl-5.28*
virtual/perl-Pod-Escapes:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Parse-CPAN-Meta:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-File-Path:0: =dev-lang/perl-5.28*
virtual/perl-Scalar-List-Utils:0: =dev-lang/perl-5.28*
virtual/perl-IO-Zlib:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Sys-Syslog:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-MIME-Base64:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Time-HiRes:0: =dev-lang/perl-5.28*
virtual/perl-Module-Load:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Time-Local:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-if:0: =dev-lang/perl-5.28*
virtual/perl-Safe:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-Params-Check:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Pod-Parser:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-version:0: =dev-lang/perl-5.28*
virtual/perl-Digest:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24.4* =dev-lang/perl-5.24.3* =dev-lang/perl-5.28*
virtual/perl-Locale-Maketext-Simple:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24.4* =dev-lang/perl-5.24.3* =dev-lang/perl-5.28*
virtual/perl-Test-Harness:0: =dev-lang/perl-5.28*
virtual/perl-Test-Simple:0: =dev-lang/perl-5.28*
virtual/perl-JSON-PP:0: =dev-lang/perl-5.28*
virtual/perl-CPAN-Meta:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-CPAN-Meta-YAML:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-ExtUtils-Manifest:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Storable:0: =dev-lang/perl-5.28.0*
virtual/perl-Perl-OSType:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-XSLoader:0: =dev-lang/perl-5.28*
virtual/perl-ExtUtils-CBuilder:0: =dev-lang/perl-5.28*
virtual/perl-CPAN:0: =dev-lang/perl-5.28*
virtual/perl-Text-ParseWords:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Archive-Tar:0: =dev-lang/perl-5.28*
virtual/perl-HTTP-Tiny:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-ExtUtils-Install:0: =dev-lang/perl-5.28*
virtual/perl-Term-ANSIColor:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-Getopt-Long:0: =dev-lang/perl-5.28*
virtual/perl-Term-ReadLine:0: =dev-lang/perl-5.26.2* =dev-lang/perl-5.28*
virtual/perl-File-Spec:0: =dev-lang/perl-5.28*
virtual/perl-Text-Balanced:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Exporter:0: =dev-lang/perl-5.28*
virtual/perl-IO:0: =dev-lang/perl-5.28*
virtual/perl-IPC-Cmd:0: =dev-lang/perl-5.28*
virtual/perl-podlators:0: =dev-lang/perl-5.28*
virtual/perl-Attribute-Handlers:0: =dev-lang/perl-5.28*
virtual/perl-Encode:0: =dev-lang/perl-5.28*
virtual/perl-CPAN-Meta-Requirements:0: =dev-lang/perl-5.26* =dev-lang/perl-5.24* =dev-lang/perl-5.28*
virtual/perl-Data-Dumper:0: =dev-lang/perl-5.28*
virtual/perl-Pod-Simple:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-Module-Metadata:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
virtual/perl-IO-Compress:0: =dev-lang/perl-5.26* =dev-lang/perl-5.28*
Comment 18 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-05-07 07:04:25 UTC
As a temporary solution so people using current ::gentoo ( and so we can get a bit of time buffer so we don't need too much co-stabilization ), can we either:

a) Resurrect the most recent version of the 0.60 family with full keywording
b) Restore keywords for portage-utils-0.62

At least that way I can specify a max version on current gentoo-perl-helpers until I release soemthing that works with the new behaviour which I can stipulate a min version for?
Comment 19 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2019-05-07 07:05:17 UTC
Infra is tracking this because it broke some systems for the Perl upgrade.

The breakage was introduced between 0.65 and 0.70. Infra is downgrading to portage-utils-0.65 for now for getting the Perl upgrade done
Comment 20 Fabian Groffen gentoo-dev 2019-05-07 08:09:42 UTC
Created attachment 575450 [details, diff]
qdepends -Q regex fix

My apologies, I didn't realise this was a pressing issue.

Next portage-utils release is not going to be soon, so it's either trying to patch up 0.74, or downgrade.
I think I see what the problem is.  The assumption was that atom_explode would fail for your regex, but it just likes your expression fine, so the regular expression matching code is never triggered any more.
Can you try attached patch for 0.74?  It makes your expression result in matches with 0.74 locally.  If it works correctly for you, I'm more than happy to commit it to -r1 and request stabling of that one.


Now as for the overmatching, this is coming from the atom comparisons.

dev-lang/perl:<slot> will match dev-lang/perl (and vice-versa)

What you want here, it seems, is to exact match a slot.  I need to think about this, but I guess this is actually what = and * can be used for.
Comment 21 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-05-08 04:27:31 UTC
> What you want here, it seems, is to exact match a slot.  I need to think
> about this, but I guess this is actually what = and * can be used for.

Well, I rather want to match the *antislot*.

That is, for a given installation target( eg: perl:0/5.28= ):
 - packages without any slotting I don't care for
    ( by reason of them having no ABI dependency on a given perl )
 - Packages with slotting matching "0/5.28=" I also don't care for
    ( by reason of them already being installed for the target )

But all other versions that have a bound slot, and that bound slot does not match the installation target, I want that version ( as these are the reinstallation candidates, both when you're about to install the given target, *and* when you've had emerge exit() somewhere midway through the installation )
Comment 22 Fabian Groffen gentoo-dev 2019-05-08 16:13:52 UTC
is the attached patch usable for this problem?
Comment 23 Larry the Git Cow gentoo-dev 2019-06-09 08:41:18 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=9fefd6f786ebb4d546a43e1b600659361efd3cb3

commit 9fefd6f786ebb4d546a43e1b600659361efd3cb3
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-06-09 08:39:03 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-06-09 08:39:03 +0000

    libq/atom: add the antislot
    
    Introduce antislot matching.  This allows to match a SLOT, but not the
    given one.  This is mostly useful for finding packages to rebuild after
    upgrading a dependant package.
    
    Bug: https://bugs.gentoo.org/683430
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 libq/atom.c                           | 338 +++++++++++++++++++++-------------
 libq/atom.h                           |   3 +-
 man/include/qatom-01-antislot.include |  37 ++++
 man/include/qdepends.optdesc.yaml     |   6 +-
 man/qatom.1                           |  38 +++-
 man/qdepends.1                        |   8 +-
 qatom.c                               |  30 ++-
 qdepends.c                            |   8 +-
 tests/qatom/dotest                    |   8 +-
 9 files changed, 330 insertions(+), 146 deletions(-)
Comment 24 Fabian Groffen gentoo-dev 2019-06-09 08:43:41 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #21)
> > What you want here, it seems, is to exact match a slot.  I need to think
> > about this, but I guess this is actually what = and * can be used for.
> 
> Well, I rather want to match the *antislot*.
> 
> That is, for a given installation target( eg: perl:0/5.28= ):
>  - packages without any slotting I don't care for
>     ( by reason of them having no ABI dependency on a given perl )
>  - Packages with slotting matching "0/5.28=" I also don't care for
>     ( by reason of them already being installed for the target )
> 
> But all other versions that have a bound slot, and that bound slot does not
> match the installation target, I want that version ( as these are the
> reinstallation candidates, both when you're about to install the given
> target, *and* when you've had emerge exit() somewhere midway through the
> installation )

Ok, previous commit should be attempt 2 to implement this behaviour for you.  My anticipated usecase being "qdepends -Q ^perl:0/5.28"
Comment 25 Fabian Groffen gentoo-dev 2019-06-17 19:05:59 UTC
Ok, I upgraded perl as dep here (Portage did, not me), afterwards ran:
% qdepends -Qq ^perl:0/5.30
dev-vcs/git-2.19.2: dev-lang/perl:0/5.26=[-build(+)]
dev-perl/Module-Build-0.422.400: dev-lang/perl:0/5.26=
dev-perl/Net-SMTP-SSL-1.40.0: dev-lang/perl:0/5.26=
dev-perl/Authen-SASL-2.160.0-r1: dev-lang/perl:0/5.26=[-build(+)]
dev-perl/MailTools-2.190.0: dev-lang/perl:0/5.26=
dev-perl/TimeDate-2.300.0: dev-lang/perl:0/5.26=[-build(+)]
dev-perl/Digest-HMAC-1.30.0-r1: dev-lang/perl:0/5.26=[-build(+)]
dev-perl/IO-Socket-SSL-2.52.0: dev-lang/perl:0/5.26=
dev-perl/Error-0.170.250: dev-lang/perl:0/5.26=
dev-perl/Net-SSLeay-1.850.0: dev-lang/perl:0/5.28=
virtual/perl-ExtUtils-ParseXS-3.340.0: dev-lang/perl:0/5.26=
virtual/perl-ExtUtils-CBuilder-0.280.225-r2: dev-lang/perl:0/5.26=
virtual/perl-podlators-4.90.0: dev-lang/perl:0/5.26=
virtual/perl-version-0.991.700: dev-lang/perl:0/5.26=
virtual/perl-Digest-SHA-5.960.0: dev-lang/perl:0/5.26=
virtual/perl-Getopt-Long-2.490.0: dev-lang/perl:0/5.26=
virtual/perl-Digest-MD5-2.550.0: dev-lang/perl:0/5.26=
virtual/perl-Scalar-List-Utils-1.460.200_rc: dev-lang/perl:0/5.26=
virtual/perl-ExtUtils-Install-2.40.0-r3: dev-lang/perl:0/5.26=
virtual/perl-Parse-CPAN-Meta-2.150.10-r1: dev-lang/perl:0/5.26=
virtual/perl-ExtUtils-Manifest-1.700.0-r5: dev-lang/perl:0/5.26=
virtual/perl-Perl-OSType-1.10.0-r1: dev-lang/perl:0/5.26=
virtual/perl-Text-ParseWords-3.300.0-r4: dev-lang/perl:0/5.26=
virtual/perl-MIME-Base64-3.150.0-r4: dev-lang/perl:0/5.26=
virtual/perl-Module-Metadata-1.0.33-r1: dev-lang/perl:0/5.26=
virtual/perl-CPAN-Meta-2.150.10-r1: dev-lang/perl:0/5.26=
virtual/perl-JSON-PP-2.274.0.200_rc: dev-lang/perl:0/5.26=
virtual/perl-CPAN-Meta-YAML-0.18.0-r3: dev-lang/perl:0/5.26=
virtual/perl-libnet-3.100.0: dev-lang/perl:0/5.26=

(that is, most 0/5.26 but also one 0/5.28)
(this output perhaps needs a tweak so it only includes the slot I think so the next thing isn't necessary)

% emerge -1av `qdepends -Qq ^perl:0/5.30 | sed -e 's/:.*//' -e 's/^/>=/'`
...
Total: 29 packages (20 upgrades, 9 reinstalls), Size of downloads: 5,912 KiB
...
<<<          dir /Users/fabian/Gentoo-10.13/usr/lib/perl5/vendor_perl/5.28.1
...
<<<          dir /Users/fabian/Gentoo-10.13/usr/lib/perl5/vendor_perl/5.26.2

so that seemed to be successful (yet useful)?
Comment 26 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-06-19 05:08:45 UTC
(In reply to Fabian Groffen from comment #25)
> Ok, I upgraded perl as dep here (Portage did, not me), afterwards ran:
> % qdepends -Qq ^perl:0/5.30
> dev-vcs/git-2.19.2: dev-lang/perl:0/5.26=[-build(+)]
> dev-perl/Module-Build-0.422.400: dev-lang/perl:0/5.26=
> dev-perl/Net-SMTP-SSL-1.40.0: dev-lang/perl:0/5.26=
> dev-perl/Authen-SASL-2.160.0-r1: dev-lang/perl:0/5.26=[-build(+)]
> dev-perl/MailTools-2.190.0: dev-lang/perl:0/5.26=
> dev-perl/TimeDate-2.300.0: dev-lang/perl:0/5.26=[-build(+)]
> dev-perl/Digest-HMAC-1.30.0-r1: dev-lang/perl:0/5.26=[-build(+)]
> dev-perl/IO-Socket-SSL-2.52.0: dev-lang/perl:0/5.26=
> dev-perl/Error-0.170.250: dev-lang/perl:0/5.26=
> dev-perl/Net-SSLeay-1.850.0: dev-lang/perl:0/5.28=
> virtual/perl-ExtUtils-ParseXS-3.340.0: dev-lang/perl:0/5.26=
> virtual/perl-ExtUtils-CBuilder-0.280.225-r2: dev-lang/perl:0/5.26=
> virtual/perl-podlators-4.90.0: dev-lang/perl:0/5.26=
> virtual/perl-version-0.991.700: dev-lang/perl:0/5.26=
> virtual/perl-Digest-SHA-5.960.0: dev-lang/perl:0/5.26=
> virtual/perl-Getopt-Long-2.490.0: dev-lang/perl:0/5.26=
> virtual/perl-Digest-MD5-2.550.0: dev-lang/perl:0/5.26=
> virtual/perl-Scalar-List-Utils-1.460.200_rc: dev-lang/perl:0/5.26=
> virtual/perl-ExtUtils-Install-2.40.0-r3: dev-lang/perl:0/5.26=
> virtual/perl-Parse-CPAN-Meta-2.150.10-r1: dev-lang/perl:0/5.26=
> virtual/perl-ExtUtils-Manifest-1.700.0-r5: dev-lang/perl:0/5.26=
> virtual/perl-Perl-OSType-1.10.0-r1: dev-lang/perl:0/5.26=
> virtual/perl-Text-ParseWords-3.300.0-r4: dev-lang/perl:0/5.26=
> virtual/perl-MIME-Base64-3.150.0-r4: dev-lang/perl:0/5.26=
> virtual/perl-Module-Metadata-1.0.33-r1: dev-lang/perl:0/5.26=
> virtual/perl-CPAN-Meta-2.150.10-r1: dev-lang/perl:0/5.26=
> virtual/perl-JSON-PP-2.274.0.200_rc: dev-lang/perl:0/5.26=
> virtual/perl-CPAN-Meta-YAML-0.18.0-r3: dev-lang/perl:0/5.26=
> virtual/perl-libnet-3.100.0: dev-lang/perl:0/5.26=
> 
> (that is, most 0/5.26 but also one 0/5.28)
> (this output perhaps needs a tweak so it only includes the slot I think so
> the next thing isn't necessary)
> 
> % emerge -1av `qdepends -Qq ^perl:0/5.30 | sed -e 's/:.*//' -e 's/^/>=/'`
> ...
> Total: 29 packages (20 upgrades, 9 reinstalls), Size of downloads: 5,912 KiB
> ...
> <<<          dir /Users/fabian/Gentoo-10.13/usr/lib/perl5/vendor_perl/5.28.1
> ...
> <<<          dir /Users/fabian/Gentoo-10.13/usr/lib/perl5/vendor_perl/5.26.2
> 
> so that seemed to be successful (yet useful)?

It looks promising, will have to test.
Comment 27 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-06-19 05:13:39 UTC
What concerns me so far is that none of the matches show situations where the dep was stated as something like:


   >=dev-lang/perl-5.20.0:0/5.28

Which is what I'd expect if somebody did:

   >=dev-lang/perl-5.20.0:5:=

I do need to match these as well "Somehow", but it might just be that I don't have any example cases on my system that exhibit this.
Comment 28 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-06-19 05:16:30 UTC
 grep "[><=]dev-lang/perl[^: ]*:" --include "*DEPEND" -r /var/db/pkg/
/var/db/pkg/media-gfx/imagemagick-7.0.8.36/RDEPEND:dev-libs/libltdl:0 app-arch/bzip2 media-fonts/corefonts sci-libs/fftw:3.0 media-libs/fontconfig media-gfx/graphviz virtual/jpeg:0 >=media-libs/openjpeg-2.1.0:2 media-libs/lcms:2/2= media-libs/liblqr media-libs/openexr:0/24= x11-libs/pango >=dev-lang/perl-5.8.8:0/5.28= media-libs/libpng:0/16= app-text/ghostscript-gpl media-libs/libraw:0/19= gnome-base/librsvg media-libs/tiff:0/0= media-fonts/urw-fonts >=media-libs/freetype-2 media-libs/libwebp:0/7= media-libs/libwmf x11-libs/libICE x11-libs/libSM x11-libs/libXext x11-libs/libXt dev-libs/libxml2:2/2= app-arch/xz-utils sys-libs/zlib:0/1=
/var/db/pkg/media-gfx/imagemagick-7.0.8.36/DEPEND:dev-libs/libltdl:0 app-arch/bzip2 media-fonts/corefonts sci-libs/fftw:3.0 media-libs/fontconfig media-gfx/graphviz virtual/jpeg:0 >=media-libs/openjpeg-2.1.0:2 media-libs/lcms:2/2= media-libs/liblqr media-libs/openexr:0/24= x11-libs/pango >=dev-lang/perl-5.8.8:0/5.28= media-libs/libpng:0/16= app-text/ghostscript-gpl media-libs/libraw:0/19= gnome-base/librsvg media-libs/tiff:0/0= media-fonts/urw-fonts >=media-libs/freetype-2 media-libs/libwebp:0/7= media-libs/libwmf x11-libs/libICE x11-libs/libSM x11-libs/libXext x11-libs/libXt dev-libs/libxml2:2/2= app-arch/xz-utils sys-libs/zlib:0/1= !media-gfx/graphicsmagick[imagemagick] virtual/pkgconfig x11-base/xorg-proto >=app-portage/elt-patches-20170815



$ qdepends -Qq ^dev-lang/perl:0/5.30
media-gfx/graphviz-2.40.1-r1: dev-lang/perl:0/5.28=
media-gfx/imagemagick-7.0.8.36: >=dev-lang/perl-5.8.8:0/5.28=


Ah, there we go, perfect :)
Comment 29 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-06-19 05:23:14 UTC
qdepends -CQq ^dev-libs/icu:0/64.2 -F "%{CAT}/%{PN}:%{SLOT}" | sed 's/: .*$//'


app-office/libreoffice:0
dev-libs/libical:0
dev-libs/beecrypt:0
dev-libs/libxml2:2
app-text/texlive-core:0
app-text/libebook:0
app-text/libqxp:0
app-text/libmspub:0
dev-qt/qtwebengine:5
dev-qt/qtwebkit:5
dev-qt/qtcore:5
dev-lang/spidermonkey:60
dev-lang/spidermonkey:52
media-libs/libfreehand:0
media-libs/libzmf:0
media-libs/libvisio:0
media-libs/harfbuzz:0
media-libs/libcdr:0
media-libs/raptor:2
dev-tex/bibtexu:0


\o/
Comment 30 Fabian Groffen gentoo-dev 2019-06-19 07:09:24 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #29)
> qdepends -CQq ^dev-libs/icu:0/64.2 -F "%{CAT}/%{PN}:%{SLOT}" | sed 's/:
> .*$//'
> 
> 
> app-office/libreoffice:0
> dev-libs/libical:0
> dev-libs/beecrypt:0
> dev-libs/libxml2:2
> app-text/texlive-core:0
> app-text/libebook:0
> app-text/libqxp:0
> app-text/libmspub:0
> dev-qt/qtwebengine:5
> dev-qt/qtwebkit:5
> dev-qt/qtcore:5
> dev-lang/spidermonkey:60
> dev-lang/spidermonkey:52
> media-libs/libfreehand:0
> media-libs/libzmf:0
> media-libs/libvisio:0
> media-libs/harfbuzz:0
> media-libs/libcdr:0
> media-libs/raptor:2
> dev-tex/bibtexu:0
> 
> 
> \o/

Oh man, I even forgot myself I already implemented -F here.  Given that's done, how about I implement some flag to remove the need for the sed.  I'm thinking of -qq (double q).
Comment 31 Fabian Groffen gentoo-dev 2019-06-19 07:16:32 UTC
% ./qdepends -CQqq mime-types -F '%[CATEGORY]%[PN]%[SLOT]'
mail-client/mutt:0
dev-lang/python:2.7
dev-lang/python:3.6
Comment 32 Larry the Git Cow gentoo-dev 2019-06-19 07:31:23 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=057ffaead77a168f14861b0cce51c69332ab4ae1

commit 057ffaead77a168f14861b0cce51c69332ab4ae1
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-06-19 07:30:44 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-06-19 07:30:44 +0000

    qdepends: make -qq with -Q just print list of packages
    
    Bug: https://bugs.gentoo.org/683430
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>

 man/include/qdepends-05-examples.include | 17 +++++++++++++++++
 man/include/qdepends.optdesc.yaml        |  3 ++-
 man/qdepends.1                           | 19 ++++++++++++++++++-
 qdepends.c                               |  6 ++++--
 4 files changed, 41 insertions(+), 4 deletions(-)
Comment 33 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-06-21 08:27:01 UTC
(In reply to Larry the Git Cow from comment #32)
> The bug has been referenced in the following commit(s):
> 
> https://gitweb.gentoo.org/proj/portage-utils.git/commit/
> ?id=057ffaead77a168f14861b0cce51c69332ab4ae1
> 
> commit 057ffaead77a168f14861b0cce51c69332ab4ae1
> Author:     Fabian Groffen <grobian@gentoo.org>
> AuthorDate: 2019-06-19 07:30:44 +0000
> Commit:     Fabian Groffen <grobian@gentoo.org>
> CommitDate: 2019-06-19 07:30:44 +0000
> 
>     qdepends: make -qq with -Q just print list of packages
>     
>     Bug: https://bugs.gentoo.org/683430
>     Signed-off-by: Fabian Groffen <grobian@gentoo.org>
> 
>  man/include/qdepends-05-examples.include | 17 +++++++++++++++++
>  man/include/qdepends.optdesc.yaml        |  3 ++-
>  man/qdepends.1                           | 19 ++++++++++++++++++-
>  qdepends.c                               |  6 ++++--
>  4 files changed, 41 insertions(+), 4 deletions(-)

I'd love to see a snapshot release with this feature, then I can possibly consider updating my tooling to use it, and spec a min-version on it :)
Comment 34 Larry the Git Cow gentoo-dev 2019-06-21 09:06:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=885b5f9da9880141ff6120e7a7bdc60b428362a3

commit 885b5f9da9880141ff6120e7a7bdc60b428362a3
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-06-21 09:05:50 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-06-21 09:05:50 +0000

    app-portage/portage-utils: version bump 0.80 RC
    
    Bug: https://bugs.gentoo.org/683430
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>
    Package-Manager: Portage-2.3.66, Repoman-2.3.11

 app-portage/portage-utils/Manifest                                      | 2 +-
 ...ls-0.80_pre20190613.ebuild => portage-utils-0.80_pre20190620.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 35 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-06-21 14:46:11 UTC
Hmm, -qq doesn't work without -Q

I mean, given how qdepends works, it makes sense, kinda.

But turns out I was using it somewhere else as follows:

 portageq match "${EPREFIX:-/}" "${atom}"                            |\
  xargs qdepends --nocolor --quiet -k SLOT | sed 's/: /:/'          |\
  xargs qatom --quiet --nocolor --format "%{CATEGORY}/%{PN}%[SLOT]" |\
  sed -r 's|:([^/]*)/[^/]*|:\1|'


This was simply used to enumerate installed slots of things, as in, "${atom}" would be "virtual/perl-*" (for example)

Is there a better way to do this sort of thing with portage-utils as-is?
Comment 36 Fabian Groffen gentoo-dev 2019-06-21 14:55:52 UTC
(In reply to Kent Fredric (IRC: kent\n) from comment #35)
> Hmm, -qq doesn't work without -Q
> 
> I mean, given how qdepends works, it makes sense, kinda.

it's also as documented

> But turns out I was using it somewhere else as follows:
> 
>  portageq match "${EPREFIX:-/}" "${atom}"                            |\
>   xargs qdepends --nocolor --quiet -k SLOT | sed 's/: /:/'          |\
>   xargs qatom --quiet --nocolor --format "%{CATEGORY}/%{PN}%[SLOT]" |\
>   sed -r 's|:([^/]*)/[^/]*|:\1|'
> 
> 
> This was simply used to enumerate installed slots of things, as in,
> "${atom}" would be "virtual/perl-*" (for example)
> 
> Is there a better way to do this sort of thing with portage-utils as-is?

Something like this?

% qlist -CIS virtual/perl-
virtual/perl-CPAN-Meta:0
virtual/perl-CPAN-Meta-YAML:0
virtual/perl-Data-Dumper:0
...


That is, I plan on making -F global, so you could just use qlist -F ...
Comment 37 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2019-06-23 07:08:12 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4d7ceb22b26f9f684af9e8d60bc1ffb7ddea5a6

commit e4d7ceb22b26f9f684af9e8d60bc1ffb7ddea5a6
Author:     Kent Fredric <kentnl@gentoo.org>
AuthorDate: 2019-06-22 11:00:55 +0000
Commit:     Kent Fredric <kentnl@gentoo.org>
CommitDate: 2019-06-23 06:41:38 +0000

    app-admin/gentoo-perl-helpers: Bump to version 0.4.0 re bug #683432
    
    Reworked to make use of recent changes in portage-utils
    
    Bug: https://bugs.gentoo.org/683432
    Bug: https://bugs.gentoo.org/688442
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Kent Fredric <kentnl@gentoo.org>

 app-admin/gentoo-perl-helpers/Manifest             |  1 +
 .../gentoo-perl-helpers-0.4.0.ebuild               | 53 ++++++++++++++++++++++
 2 files changed, 54 insertions(+)


^ should have said bug #683430 , but I'm only human :(
Comment 38 Larry the Git Cow gentoo-dev 2019-07-19 07:55:50 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6daa407388e63b9f072a9934470cce37618f194

commit c6daa407388e63b9f072a9934470cce37618f194
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-07-19 07:51:00 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-07-19 07:52:49 +0000

    app-portage/portage-utils: bump 0.80 RC
    
    This release adds -F (custom formatting) support for about any applet
    (https://bugs.gentoo.org/683430#c36), improves qlop's running output
    somewhat and fixes a linking error with USE=-qtegrity.
    
    Bug: https://bugs.gentoo.org/683430
    Closes: https://bugs.gentoo.org/689896
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>
    Package-Manager: Portage-2.3.66, Repoman-2.3.11

 app-portage/portage-utils/Manifest                                      | 2 +-
 ...ls-0.80_pre20190714.ebuild => portage-utils-0.80_pre20190719.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 39 Fabian Groffen gentoo-dev 2019-07-19 08:08:44 UTC
I think everything from this bug is fixed/implemented now.  If you feel something is missing still, please reopen or file a new bug.  Thanks!