Summary: | app-portage/portage-utils-0.74 - qdepends does not catch all reverse dependencies | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Dennis Schridde <dschridde+gentoobugs> |
Component: | Third-Party Tools | Assignee: | Portage Utils Team <portage-utils> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
equery depends virtual/pypy3
q depends -vQ virtual/pypy3 |
Description
Dennis Schridde
2019-03-30 10:49:01 UTC
Created attachment 571236 [details]
equery depends virtual/pypy3
Created attachment 571238 [details]
q depends -vQ virtual/pypy3
`emerge --update --deep --changed-use --newuse @world` also has problems rebuilding the tree, complaining about installed packages depending on virtual/pypy3-7.0.0:0/71 (instead of virtual/pypy3-7.1.0:0/71-py36), conflicting with installed (in a previous emerge run) or to-be-installed packages depending on virtual/pypy3-7.1.0:0/71-py36. Maybe the two issues are related? would you happen to have another example package? I don't have pypy installed at the moment I suspect this is a dupe of https://bugs.gentoo.org/668418 Could you check if the example there works for you? I can reproduce using virtual/perl-Data-Dumper, digging now (In reply to Fabian Groffen from comment #5) > I suspect this is a dupe of https://bugs.gentoo.org/668418 > > Could you check if the example there works for you? bug #668418 is supposed to be fixed in app-portage/portage-utils-0.74, which I have installed. In the comments, -a was recommended to search not only build-time dependencies, but that still does not explain the discrepancy between equery depends and q depends: $ equery depends virtual/pypy3 | wc -l 111 $ q depends -vaQ virtual/pypy3 | wc -l 183 But at least werkzeug appears in the output when using -a: $ q depends -vaQ virtual/pypy3 | rg werkzeug dev-python/werkzeug-0.14.1: >=virtual/pypy3-5:0/71-py36= equery and qdepends behave differently regarding *DEPEND. It seems that equery queries all *DEPEND, whereas qdepends makes a difference between DEPEND, RDEPEND, PDEPEND and BDEPEND. Now if you use -a you get "double" output, e.g.: % ./q depends -avQ virtual/perl-Data-Dumper * DEPEND dev-perl/Module-Build-0.422.400: virtual/perl-Data-Dumper * RDEPEND dev-perl/Module-Build-0.422.400: virtual/perl-Data-Dumper * PDEPEND dev-lang/perl-5.28.0: >=virtual/perl-Data-Dumper-2.154.0 * BDEPEND % That explains why you see more matches with -a than equery. Perhaps I can add an option that prints the unique matches per package which would match more or less equery's output. (In reply to Fabian Groffen from comment #8) > equery and qdepends behave differently regarding *DEPEND. > > It seems that equery queries all *DEPEND, whereas qdepends makes a > difference between DEPEND, RDEPEND, PDEPEND and BDEPEND. > > Now if you use -a you get "double" output, e.g.: > > % ./q depends -avQ virtual/perl-Data-Dumper > * DEPEND > dev-perl/Module-Build-0.422.400: virtual/perl-Data-Dumper > * RDEPEND > dev-perl/Module-Build-0.422.400: virtual/perl-Data-Dumper > * PDEPEND > dev-lang/perl-5.28.0: >=virtual/perl-Data-Dumper-2.154.0 > * BDEPEND > % > > That explains why you see more matches with -a than equery. Perhaps I can > add an option that prints the unique matches per package which would match > more or less equery's output. Thanks. I did not notice. With that knowledge I get: $ equery depends virtual/pypy3 | tail -n+2 | cut -d' ' -f1 | wc -l 109 $ q depends -vaQ virtual/pypy3 | rg -v '^ \*' | cut -d: -f1 | sort -u | wc -l 108 The diff is: --- equery-depends.log 2019-03-30 21:23:48.434152292 +0100 +++ qdepends.log 2019-03-30 21:23:55.717481404 +0100 @@ -1,6 +1,7 @@ dev-python/appdirs-1.4.3 dev-python/asn1crypto-0.24.0 dev-python/attrs-18.2.0 +dev-python/Babel-2.6.0 dev-python/backports-1.0 dev-python/backports-abc-0.5 dev-python/bleach-3.1.0 @@ -98,8 +99,6 @@ dev-python/werkzeug-0.14.1 dev-python/xmltodict-0.11.0 dev-python/zope-interface-4.6.0 -net-im/profanity-0.5.1 -sys-process/systemd-cron-1.5.12-r1 virtual/python-cffi-0 virtual/python-enum34-2 virtual/python-futures-1 Babel seems to have genuine pypy3 support, so it appears to me as a valid match for your query (by qdepends). Out of curiosity, does equery depgraph list pypy3 as dep for dev-python/Babel-2.6.0? Do you have - net-im/profanity-0.5.1 - sys-process/systemd-cron-1.5.12-r1 installed? If so, could paste the contents of /var/pkg/db/<cat>/<p>/*DEPEND for either? $ equery depgraph -AMU dev-python/Babel-2.6.0
* Searching for Babel2.6.0 in dev-python ...
* dependency graph for dev-python/Babel-2.6.0
`-- dev-python/Babel-2.6.0
`-- dev-python/sphinx-1.7.5-r1
`-- dev-python/freezegun-0.3.11
`-- dev-python/pytest-4.3.1
`-- dev-python/pytz-2018.4
`-- dev-python/setuptools-40.8.0
`-- virtual/pypy-7.1.0
`-- virtual/pypy3-7.1.0
`-- dev-lang/python-2.7.16
`-- dev-lang/python-3.5.7
`-- dev-lang/python-3.6.8
`-- dev-lang/python-3.7.3
`-- dev-lang/python-exec-2.4.6
[ dev-python/Babel-2.6.0 stats: packages (13), max depth (1) ]
/var/db/pkg/net-im/profanity-0.5.1/DEPEND:
net-libs/libstrophe:0/0.8= net-misc/curl >=dev-libs/glib-2.26:2 sys-libs/ncurses:0/6=[unicode] dev-libs/openssl:0/1.1= sys-apps/util-linux sys-libs/readline:0/8= >=x11-libs/gtk+-2.24.10:2 x11-libs/libnotify net-libs/libotr app-crypt/gpgme:1/11= x11-libs/libXScrnSaver x11-libs/libX11 dev-lang/python:3.6 >=dev-lang/python-exec-2:2/2=[python_targets_pypy(-),python_targets_pypy3(-),python_targets_python2_7(-),python_targets_python3_6(-),-python_single_target_jython2_7(-),python_single_target_python3_6(+)]
/var/db/pkg/net-im/profanity-0.5.1/RDEPEND:
net-libs/libstrophe:0/0.8= net-misc/curl >=dev-libs/glib-2.26:2 sys-libs/ncurses:0/6=[unicode] dev-libs/openssl:0/1.1= sys-apps/util-linux sys-libs/readline:0/8= >=x11-libs/gtk+-2.24.10:2 x11-libs/libnotify net-libs/libotr app-crypt/gpgme:1/11= x11-libs/libXScrnSaver x11-libs/libX11 dev-lang/python:3.6 >=dev-lang/python-exec-2:2/2=[python_targets_pypy(-),python_targets_pypy3(-),python_targets_python2_7(-),python_targets_python3_6(-),-python_single_target_jython2_7(-),python_single_target_python3_6(+)]
/var/db/pkg/sys-process/systemd-cron-1.5.12-r1/DEPEND:
sys-process/cronbase virtual/pkgconfig
/var/db/pkg/sys-process/systemd-cron-1.5.12-r1/RDEPEND:
>=sys-apps/systemd-217 sys-apps/debianutils !sys-process/dcron dev-lang/python:3.6 >=dev-lang/python-exec-2:2/2=[python_targets_pypy3(-),python_targets_python3_6(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_6(+)] sys-process/cronbase
(In reply to Dennis Schridde from comment #11) > $ equery depgraph -AMU dev-python/Babel-2.6.0 > * Searching for Babel2.6.0 in dev-python ... > > * dependency graph for dev-python/Babel-2.6.0 > `-- dev-python/Babel-2.6.0 > `-- dev-python/sphinx-1.7.5-r1 > `-- dev-python/freezegun-0.3.11 > `-- dev-python/pytest-4.3.1 > `-- dev-python/pytz-2018.4 > `-- dev-python/setuptools-40.8.0 > `-- virtual/pypy-7.1.0 > `-- virtual/pypy3-7.1.0 > `-- dev-lang/python-2.7.16 > `-- dev-lang/python-3.5.7 > `-- dev-lang/python-3.6.8 > `-- dev-lang/python-3.7.3 > `-- dev-lang/python-exec-2.4.6 > [ dev-python/Babel-2.6.0 stats: packages (13), max depth (1) ] This suggests qdepends is right here, IMO. > /var/db/pkg/net-im/profanity-0.5.1/DEPEND: > net-libs/libstrophe:0/0.8= net-misc/curl >=dev-libs/glib-2.26:2 > sys-libs/ncurses:0/6=[unicode] dev-libs/openssl:0/1.1= sys-apps/util-linux > sys-libs/readline:0/8= >=x11-libs/gtk+-2.24.10:2 x11-libs/libnotify > net-libs/libotr app-crypt/gpgme:1/11= x11-libs/libXScrnSaver x11-libs/libX11 > dev-lang/python:3.6 > >=dev-lang/python-exec-2:2/2=[python_targets_pypy(-),python_targets_pypy3(-), > python_targets_python2_7(-),python_targets_python3_6(-),- > python_single_target_jython2_7(-),python_single_target_python3_6(+)] > /var/db/pkg/net-im/profanity-0.5.1/RDEPEND: > net-libs/libstrophe:0/0.8= net-misc/curl >=dev-libs/glib-2.26:2 > sys-libs/ncurses:0/6=[unicode] dev-libs/openssl:0/1.1= sys-apps/util-linux > sys-libs/readline:0/8= >=x11-libs/gtk+-2.24.10:2 x11-libs/libnotify > net-libs/libotr app-crypt/gpgme:1/11= x11-libs/libXScrnSaver x11-libs/libX11 > dev-lang/python:3.6 > >=dev-lang/python-exec-2:2/2=[python_targets_pypy(-),python_targets_pypy3(-), > python_targets_python2_7(-),python_targets_python3_6(-),- > python_single_target_jython2_7(-),python_single_target_python3_6(+)] I don't see a mention of virtual/pypy3 in here. It may have not existed when you originally merged the package? In any case, this is the reason why qdepends doesn't list it, it only looks at var/db/pkg, not the ebuild tree. > /var/db/pkg/sys-process/systemd-cron-1.5.12-r1/DEPEND: > sys-process/cronbase virtual/pkgconfig > /var/db/pkg/sys-process/systemd-cron-1.5.12-r1/RDEPEND: > >=sys-apps/systemd-217 sys-apps/debianutils !sys-process/dcron dev-lang/python:3.6 >=dev-lang/python-exec-2:2/2=[python_targets_pypy3(-),python_targets_python3_6(-),-python_single_target_jython2_7(-),-python_single_target_pypy(-),-python_single_target_python2_7(-),-python_single_target_python3_7(-),python_single_target_python3_6(+)] sys-process/cronbase Same here, no mention of virtual/pypy3. (In reply to Fabian Groffen from comment #6) > I can reproduce using virtual/perl-Data-Dumper, digging now (In reply to Fabian Groffen from comment #12) > [...] So is there an actual bug, or shall we close this report and just note that people should use `q depends -aQ` and a combination of `grep` / `cut` / `sort` / `uniq` to create their list of dependencies? (In reply to Dennis Schridde from comment #13) > (In reply to Fabian Groffen from comment #6) > > I can reproduce using virtual/perl-Data-Dumper, digging now > > (In reply to Fabian Groffen from comment #12) > > [...] > > So is there an actual bug, or shall we close this report and just note that > people should use `q depends -aQ` and a combination of `grep` / `cut` / > `sort` / `uniq` to create their list of dependencies? I don't see an actual bug. But I'll take this bug as feature request to have qdepends print all dependencies in one go in some way, so the sorting and cutting is no longer necessary. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f74766218c33e762e272f9f0129128a9f8ffd4a9 commit f74766218c33e762e272f9f0129128a9f8ffd4a9 Author: Fabian Groffen <grobian@gentoo.org> AuthorDate: 2019-04-07 20:15:31 +0000 Commit: Fabian Groffen <grobian@gentoo.org> CommitDate: 2019-04-07 20:15:31 +0000 qdepends: rewrite to better match forward/backward dependencies - dep: extract dependency functions into separate files for later reuse - by default, report all deps for all *DEPEND combined (duplicates removed) - allow listing per *DEPEND using -v, pretty-print and highlight the atoms seleted or queried for (-Q) - support reverse querying multiple atoms - make -Q output match forward output, highlight the match, to just print the match, use -q Bug: https://bugs.gentoo.org/682056 Signed-off-by: Fabian Groffen <grobian@gentoo.org> TODO.md | 3 + libq/Makefile.am | 1 + libq/Makefile.in | 11 +- libq/dep.c | 334 +++++++++++++++++++ libq/dep.h | 54 ++++ libq/set.c | 22 +- libq/set.h | 1 + qdepends.c | 776 +++++++++++---------------------------------- tests/qdepends/dotest | 11 + tests/qdepends/list02.good | 2 +- tests/qdepends/list03.good | 6 +- tests/qdepends/list04.good | 6 +- tests/qdepends/list05.good | 16 +- tests/qdepends/list06.good | 2 +- tests/qdepends/list07.good | 2 +- tests/qdepends/list08.good | 2 +- 16 files changed, 639 insertions(+), 610 deletions(-) this is available onwards from 0.80_pre* |