diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-05-19 12:04:57 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-05-19 12:04:57 -0400 |
commit | 28d0df0c3be0042006fbf39ff83d4d0342832caa (patch) | |
tree | 9de56aa69151a63a5842eec5c084cd1efe507f6b /qgrep.c | |
parent | quse: use the cache file given and avoid cwd assumptions (diff) | |
download | portage-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |