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 /qpkg.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 'qpkg.c')
-rw-r--r-- | qpkg.c | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -122,19 +122,7 @@ int qpkg_clean(char *dirp) } if (eclean) { - char fname[_Q_PATH_MAX] = ""; - const char *ecache; - - /* CACHE_EBUILD_FILE is a macro so don't put it in the .bss */ - ecache = CACHE_EBUILD_FILE; - - if (ecache) { - if (*ecache != '/') - snprintf(fname, sizeof(fname), "%s/%s", portdir, ecache); - else - strncpy(fname, ecache, sizeof(fname)); - } - if ((fp = fopen(fname, "r")) != NULL) { + if ((fp = fopen(initialize_ebuild_flat(), "r")) != NULL) { size_t buflen; char *buf; |