commit:     4101984f7367d6730e69a38ced5db578d21d6e2c
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  7 14:36:21 2026 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sat Feb  7 14:36:21 2026 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=4101984f

qdepends: enable all *DEPEND when none are given

with a possible growing set of flags, just check for any of the specific
*DEPEND flags being given, for it makes no sense to run without printing
any

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 qdepends.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/qdepends.c b/qdepends.c
index d4558811..068ea619 100644
--- a/qdepends.c
+++ b/qdepends.c
@@ -334,8 +334,13 @@ int qdepends_main(int argc, char **argv)
                }
        }
 
-       if ((state.qmode & ~(QMODE_REVERSE | QMODE_INSTALLED | QMODE_TREE)) == 
0) {
-               /* default mode of operation: -drpb (also for just -Q) */
+       if ((state.qmode & (QMODE_DEPEND  |
+                                               QMODE_RDEPEND |
+                                               QMODE_PDEPEND |
+                                               QMODE_BDEPEND |
+                                               QMODE_IDEPEND )) == 0)
+       {
+               /* default mode of printing: -drpb */
                state.qmode |= QMODE_DEPEND  |
                                           QMODE_RDEPEND |
                                           QMODE_PDEPEND |

Reply via email to