aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-05-19 12:04:57 -0400
committerMike Frysinger <vapier@gentoo.org>2015-05-19 12:04:57 -0400
commit28d0df0c3be0042006fbf39ff83d4d0342832caa (patch)
tree9de56aa69151a63a5842eec5c084cd1efe507f6b /qgrep.c
parentquse: use the cache file given and avoid cwd assumptions (diff)
downloadportage-utils-28d0df0c3be0042006fbf39ff83d4d0342832caa.tar.gz
portage-utils-28d0df0c3be0042006fbf39ff83d4d0342832caa.tar.bz2
portage-utils-28d0df0c3be0042006fbf39ff83d4d0342832caa.zip
qgrep/qpkg: use the cache file given
The qgrep code needs a rework to avoid chdir assumptions, but that's much larger than fixing the cache file name, so punt for later.
Diffstat (limited to 'qgrep.c')
-rw-r--r--qgrep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qgrep.c b/qgrep.c
index 982672d..de018ea 100644
--- a/qgrep.c
+++ b/qgrep.c
@@ -371,9 +371,9 @@ int qgrep_main(int argc, char **argv)
/* go look either in ebuilds or eclasses or VDB */
if (!do_eclass && !do_installed) {
- initialize_ebuild_flat(); /* sets our pwd to $PORTDIR */
- if ((fp = fopen(CACHE_EBUILD_FILE, "r")) == NULL)
+ if ((fp = fopen(initialize_ebuild_flat(), "r")) == NULL)
return 1;
+ xchdir(portdir);
} else if (do_eclass) {
xchdir(portdir);
if ((eclass_dir = opendir("eclass")) == NULL)