diff options
author | Fabian Groffen <grobian@gentoo.org> | 2019-04-25 09:56:48 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2019-04-25 09:56:48 +0200 |
commit | 1cd2f17f673a790caaa967341b7f2b1072968e51 (patch) | |
tree | 0c4d9cfc77a88716c40b3d4edd33b3b2c137cb44 /qgrep.c | |
parent | libq/cache: add mode for plain ebuilds (not using any cache) (diff) | |
download | portage-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.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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); |