Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949335 - app-portage/gentoolkit-0.6.8: depgraph: USE flag is lost
Summary: app-portage/gentoolkit-0.6.8: depgraph: USE flag is lost
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-05 12:23 UTC by Alexander Kurakin
Modified: 2025-02-06 21:06 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 Alexander Kurakin 2025-02-05 12:23:30 UTC
```console
$ equery depgraph =kde-frameworks/kwindowsystem-6.9.0
 * Searching for kwindowsystem6.9.0 in kde-frameworks ...

 * dependency graph for kde-frameworks/kwindowsystem-6.9.0
 `--  kde-frameworks/kwindowsystem-6.9.0  amd64 
<...>
   `--  dev-qt/qttools-6.8.1  (>=dev-qt/qttools-6.7.2) amd64  [linguist]
<...>
```

but

```console
$ equery depends dev-qt/qttools
 * These packages depend on dev-qt/qttools:
<...>
kde-frameworks/kwindowsystem-6.9.0 (>=dev-qt/qttools-6.7.2:6[linguist])
                                   (dev-qt/qttools:6[assistant])
<...>
```

Has the `assistant` flag of the `dev-qt/qttools` been lost?

equery 0.6.8
Comment 1 Matt Turner gentoo-dev 2025-02-06 03:36:11 UTC
I think the qttools[assistant] dependency comes through ecm.eclass, which kwindowsystem inherits. I'm guessing that's somehow why this happens.
Comment 2 Mike Gilbert gentoo-dev 2025-02-06 21:06:01 UTC
The depgraph builder currently deduplicates packages based on cpv.

This simple change will make it output both qttools deps.

diff --git a/pym/gentoolkit/dependencies.py b/pym/gentoolkit/dependencies.py
index be5c71f..23980f2 100644
--- a/pym/gentoolkit/dependencies.py
+++ b/pym/gentoolkit/dependencies.py
@@ -163,8 +163,6 @@ class Dependencies(Query):
                 depcache[dep.atom] = pkgdep
             if not pkgdep:
                 continue
-            elif pkgdep.cpv in seen:
-                continue
             if depth <= max_depth or max_depth == 0:
                 if printer_fn is not None:
                     printer_fn(depth, pkgdep, dep)


An alternate approach would be to include additional package metadata (like USE flags) in the "seen" key instead of just dropping it entirely.