From: "Mike Frysinger (vapier)" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-projects commit in portage-utils: qdepends.c
Date: Sun, 29 Sep 2013 22:19:39 +0000 (UTC) [thread overview]
Message-ID: <20130929221939.971072004C@flycatcher.gentoo.org> (raw)
vapier 13/09/29 22:19:39
Modified: qdepends.c
Log:
qdepends: warn if no matches were found #459970
Revision Changes Path
1.66 portage-utils/qdepends.c
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/qdepends.c?rev=1.66&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/qdepends.c?rev=1.66&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/portage-utils/qdepends.c?r1=1.65&r2=1.66
Index: qdepends.c
===================================================================
RCS file: /var/cvsroot/gentoo-projects/portage-utils/qdepends.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- qdepends.c 29 Sep 2013 10:36:08 -0000 1.65
+++ qdepends.c 29 Sep 2013 22:19:39 -0000 1.66
@@ -1,7 +1,7 @@
/*
* Copyright 2005-2013 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/portage-utils/qdepends.c,v 1.65 2013/09/29 10:36:08 vapier Exp $
+ * $Header: /var/cvsroot/gentoo-projects/portage-utils/qdepends.c,v 1.66 2013/09/29 22:19:39 vapier Exp $
*
* Copyright 2005-2010 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2013 Mike Frysinger - <vapier@gentoo.org>
@@ -32,7 +32,7 @@
"Pretty format specified depend strings",
COMMON_OPTS_HELP
};
-static const char qdepends_rcsid[] = "$Id: qdepends.c,v 1.65 2013/09/29 10:36:08 vapier Exp $";
+static const char qdepends_rcsid[] = "$Id: qdepends.c,v 1.66 2013/09/29 22:19:39 vapier Exp $";
#define qdepends_usage(ret) usage(ret, QDEPENDS_FLAGS, qdepends_long_opts, qdepends_opts_help, lookup_applet_idx("qdepends"))
static char qdep_name_only = 0;
@@ -465,7 +465,7 @@
dep_burn_tree(dep_tree);
- return EXIT_SUCCESS;
+ return 1;
}
_q_static int qdepends_vdb_deep_cb(q_vdb_pkg_ctx *pkg_ctx, void *priv)
@@ -523,7 +523,7 @@
}
dep_burn_tree(dep_tree);
- return EXIT_SUCCESS;
+ return 1;
}
int qdepends_main(int argc, char **argv)
@@ -533,7 +533,7 @@
.argv = argv,
};
q_vdb_pkg_cb *cb;
- int i;
+ int i, ret;
bool do_format = false;
const char *query = NULL;
const char *depend_file;
@@ -576,16 +576,18 @@
cb = query ? qdepends_vdb_deep_cb : qdepends_main_vdb_cb;
if (!depend_file) {
- int ret = 0;
+ ret = 0;
for (i = 0; depend_files[i]; ++i) {
printf(" %s*%s %s\n", GREEN, NORM, depend_files[i]);
state.depend_file = depend_files[i];
- ret += q_vdb_foreach_pkg(cb, &state, NULL);
+ ret |= q_vdb_foreach_pkg(cb, &state, NULL);
}
- return ret;
- }
+ } else
+ ret = q_vdb_foreach_pkg(cb, &state, NULL);
- return q_vdb_foreach_pkg(cb, &state, NULL);
+ if (!ret && !quiet)
+ warn("no matches found for your query");
+ return ret ? EXIT_SUCCESS : EXIT_FAILURE;
}
#else
next reply other threads:[~2013-09-29 22:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-29 22:19 Mike Frysinger (vapier) [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-09-29 10:36 [gentoo-commits] gentoo-projects commit in portage-utils: qdepends.c Mike Frysinger (vapier)
2013-09-29 10:03 Mike Frysinger (vapier)
2013-09-29 10:01 Mike Frysinger (vapier)
2013-09-29 9:14 Mike Frysinger (vapier)
2013-09-29 6:44 Mike Frysinger (vapier)
2013-09-29 5:09 Mike Frysinger (vapier)
2012-11-10 6:35 Mike Frysinger (vapier)
2011-12-21 21:54 Mike Frysinger (vapier)
2009-08-29 19:43 Ned Ludd (solar)
2008-03-14 23:24 Ned Ludd (solar)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130929221939.971072004C@flycatcher.gentoo.org \
--to=vapier@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox