aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2019-04-25 09:56:48 +0200
committerFabian Groffen <grobian@gentoo.org>2019-04-25 09:56:48 +0200
commit1cd2f17f673a790caaa967341b7f2b1072968e51 (patch)
tree0c4d9cfc77a88716c40b3d4edd33b3b2c137cb44 /qgrep.c
parentlibq/cache: add mode for plain ebuilds (not using any cache) (diff)
downloadportage-utils-1cd2f17f673a790caaa967341b7f2b1072968e51.tar.gz
portage-utils-1cd2f17f673a790caaa967341b7f2b1072968e51.tar.bz2
portage-utils-1cd2f17f673a790caaa967341b7f2b1072968e51.zip
reinitialize_flat: remove
remove the flat cache (just a file list of directory contents) - it can easily get stale - traversing a directory isn't that expensive nowadays (and we don't do VAX) the code should switch to using libq/cache instead Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qgrep.c')
-rw-r--r--qgrep.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/qgrep.c b/qgrep.c
index a2b6a98a..16bb4c12 100644
--- a/qgrep.c
+++ b/qgrep.c
@@ -398,11 +398,9 @@ int qgrep_main(int argc, char **argv)
array_for_each(overlays, n, overlay) {
/* go look either in ebuilds or eclasses or VDB */
+ /* FIXME: use libq/vdb and libq/cache here */
if (!do_eclass && !do_installed) {
- fp = fopen(initialize_flat(overlay, CACHE_EBUILD, false), "re");
- if (fp == NULL)
- continue;
- xchdir(overlay);
+ /* TODO: use libq/cache here */ continue;
} else if (do_eclass) {
xchdir(overlay);
if ((eclass_dir = opendir("eclass")) == NULL) {
@@ -411,6 +409,7 @@ int qgrep_main(int argc, char **argv)
continue;
}
} else { /* if (do_install) */
+ /* TODO: use libq/vdb here */
char buf[_Q_PATH_MAX];
snprintf(buf, sizeof(buf), "%s/%s", portroot, portvdb);
xchdir(buf);