Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645560 - app-portage/portage-utils: qdepends does not parse patterns obtained
Summary: app-portage/portage-utils: qdepends does not parse patterns obtained
Status: RESOLVED DUPLICATE of bug 608960
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-24 15:08 UTC by Kevin Vigouroux
Modified: 2018-03-25 16:38 UTC (History)
1 user (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 Kevin Vigouroux 2018-01-24 15:08:41 UTC
The utility does not search exact full string and therefore provides unexpected matches. Moreover, the string obtained must be parsed because the result may not be suitable (matching patterns).

Reproducible: Always

Steps to Reproduce:
1. Look at the examples.
Actual Results:  
The application displays wrong reverse dependencies.

Expected Results:  
The utility should parse the results.

larry $ qdepends -Q dev-libs/gobject-introspection
dev-libs/gobject-introspection-1.50.0
media-libs/harfbuzz-1.7.2
larry $ grep -n dev-libs/gobject-introspection /usr/portage/dev-libs/gobject-introspection/gobject-introspection-1.50.0.ebuild
25: >=gobject-introspection-common-${PV}

larry $ qdepends -aQ logrotate
sys-apps/portage-2.3.13-r1
larry $ grep logrotate /usr/portage/sys-apps/portage/portage-2.3.13-r1.ebuild
!<app-admin/logrotate-3.8.0"
larry $ emerge -pv sys-apps/portage
[ebuild R] sys-apps/portage-2.3.13-r1
larry $ emerge -pv -O logrotate
[ebuild N] app-admin/logrotate-3.13.0

larry $ qdepends -aQ dev-lang/yasm
media-libs/libjpeg-turbo-1.5.1
larry $ grep -n dev-lang/yasm /usr/portage/media-libs/libjpeg-turbo/libjpeg-turbo-1.5.1.ebuild
18:ASM_DEPEND="|| ( dev-lang/nasm dev-lang/yasm )"
larry $ emerge -pv dev-lang/nasm
[ebuild R  ] dev-lang/nasm-2.12.01
larry $ emerge -pv dev-lang/yasm
[ebuild N ] dev-lang/yasm-1.3.0
Comment 1 Kevin Vigouroux 2018-01-24 15:17:56 UTC
Originally, I reported this bug in another bug report: bug #390749
Comment 2 Kevin Vigouroux 2018-01-24 15:36:53 UTC
This bug may concerned the bug #608960
Comment 3 Fabian Groffen gentoo-dev 2018-03-23 15:20:43 UTC
The utility actually does nothing more than exact (regular expression) matching on the *DEPEND data from vdb.  It does match substrings, though, which is what makes this thing pretty odd.
Comment 4 Fabian Groffen gentoo-dev 2018-03-25 14:13:39 UTC
https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=3d00cad1 adds atom parsing, in your case it is unclear to me what you actually want.


larry $ qdepends -aQ logrotate
sys-apps/portage-2.3.13-r1

yes it returns, because logrotate atom is in there:

% ./qdepends -vaQ logrotate
 * DEPEND
 * RDEPEND
sys-apps/portage-2.3.18: >=app-admin/logrotate-3.8.0
 * PDEPEND

in git now, one can say:
% ./qdepends -aQ "logrotate-3"
 * DEPEND
 * RDEPEND
 * PDEPEND
% ./qdepends -aQ "logrotate-4"
 * DEPEND
 * RDEPEND
sys-apps/portage-2.3.18
 * PDEPEND
Comment 5 Kevin Vigouroux 2018-03-25 16:38:52 UTC

*** This bug has been marked as a duplicate of bug 608960 ***