Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236492 - gentoolkit-0.2.4: equery depgraph only works correctly when all dependencies are installed
Summary: gentoolkit-0.2.4: equery depgraph only works correctly when all dependencies ...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 170220
  Show dependency tree
 
Reported: 2008-09-02 20:27 UTC by Paul Varner (RETIRED)
Modified: 2008-09-04 03:35 UTC (History)
2 users (show)

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


Attachments
equery patch (equery.236492.patch,446 bytes, patch)
2008-09-02 21:14 UTC, Paul Varner (RETIRED)
Details | Diff
equery patch (equery.236492-1.patch,441 bytes, patch)
2008-09-02 21:36 UTC, Paul Varner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Varner (RETIRED) gentoo-dev 2008-09-02 20:27:57 UTC
[15:14] <rbu> find_best_match is using vartree
[15:15] <rbu> should it not be using porttree. ?
[15:15] <rbu> the one from __init__
[15:15] <rbu> or.. wait, probably not.
[15:16] <rbu> from the docstring that's not what it is supposed to do
[15:16] <rbu> but then depgraph should not call it
[15:17] <FuzzyRay> That's what I'm looking at right now
[15:21] <FuzzyRay> I've got your behavior on one of my other machines.  So current behavior is to work correctly only when all of the dependencies are installed.

Machine with dependencies installed:
# equery depgraph =kde-base/kdetoys-meta-3.5.9 --depth=1
[ Searching for packages matching =kde-base/kdetoys-meta-3.5.9... ]
* dependency graph for kde-base/kdetoys-meta-3.5.9
`-- kde-base/kdetoys-meta-3.5.9
 `-- kde-base/amor-3.5.9
 `-- kde-base/eyesapplet-3.5.9
 `-- kde-base/fifteenapplet-3.5.9
 `-- kde-base/kmoon-3.5.9
 `-- kde-base/kodo-3.5.9
 `-- kde-base/kteatime-3.5.9
 `-- kde-base/ktux-3.5.9
 `-- kde-base/kweather-3.5.9
 `-- kde-base/kworldclock-3.5.9
[ kde-base/kdetoys-meta-3.5.9 stats: packages (10), max depth (1) ]

Machine without:
$ equery depgraph =kde-base/kdetoys-meta-3.5.9 --depth=1

[ Searching for packages matching =kde-base/kdetoys-meta-3.5.9... ]
* dependency graph for kde-base/kdetoys-meta-3.5.9
`-- kde-base/kdetoys-meta-3.5.9
[ kde-base/kdetoys-meta-3.5.9 stats: packages (1), max depth (0) ]


Reproducible: Always

Steps to Reproduce:
Comment 1 Paul Varner (RETIRED) gentoo-dev 2008-09-02 21:14:14 UTC
Created attachment 164416 [details, diff]
equery patch

Proposed patch. I need to do some more in-depth testing before committing to subversion.
Comment 2 Paul Varner (RETIRED) gentoo-dev 2008-09-02 21:36:57 UTC
Created attachment 164426 [details, diff]
equery patch

Updated patch. I changed it to use find_packages as a fallback since find_best_match is quicker.  Secondly, find_packages returns a sorted list of packages, so I am selecting the last package in the list. This may not necessarily match what portage would install, since it is disregarding the masked status of a package in order to get a result.
Comment 3 Paul Varner (RETIRED) gentoo-dev 2008-09-03 20:14:58 UTC
$ svn commit -m "Fix depgraph function to print out dependencies that don't resolve to a package (Bug #236492)"
Sending        trunk/ChangeLog
Sending        trunk/src/equery/equery
Transmitting file data ..
Committed revision 512.
Comment 4 Paul Varner (RETIRED) gentoo-dev 2008-09-04 03:35:51 UTC
Released in gentoolkit-0.2.4.1