aboutsummaryrefslogtreecommitdiff
path: root/qpkg.c
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-01-02 10:44:33 +0100
committerFabian Groffen <grobian@gentoo.org>2020-01-02 10:44:33 +0100
commit56a4f36cf6325323068397b0b510b8e8340c25d9 (patch)
treea8d232b473972b70e2eda455872d0d4632381d09 /qpkg.c
parentTODO: remove finished items (diff)
downloadportage-utils-56a4f36cf6325323068397b0b510b8e8340c25d9.tar.gz
portage-utils-56a4f36cf6325323068397b0b510b8e8340c25d9.tar.bz2
portage-utils-56a4f36cf6325323068397b0b510b8e8340c25d9.zip
qlop: improve description for -c, fix -E
-c could use a bit better explanation -E included installed packages for no good reason Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qpkg.c')
-rw-r--r--qpkg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/qpkg.c b/qpkg.c
index 9d2d82a..771241c 100644
--- a/qpkg.c
+++ b/qpkg.c
@@ -41,8 +41,8 @@ static struct option const qpkg_long_opts[] = {
COMMON_LONG_OPTS
};
static const char * const qpkg_opts_help[] = {
- "clean pkgdir of unused binary files",
- "clean pkgdir of files not in the tree anymore (slow)",
+ "clean pkgdir of files that are not installed",
+ "clean pkgdir of files that are not in the tree anymore",
"pretend only",
"alternate package directory",
COMMON_OPTS_HELP
@@ -134,12 +134,6 @@ qpkg_clean(char *dirp)
if ((count = scandir(".", &dnames, filter_hidden, alphasort)) < 0)
return 1;
- t = tree_open_vdb(portroot, portvdb);
- if (t != NULL) {
- vdb = tree_get_atoms(t, true, vdb);
- tree_close(t);
- }
-
if (eclean) {
size_t n;
const char *overlay;
@@ -151,6 +145,12 @@ qpkg_clean(char *dirp)
tree_close(t);
}
}
+ } else {
+ t = tree_open_vdb(portroot, portvdb);
+ if (t != NULL) {
+ vdb = tree_get_atoms(t, true, vdb);
+ tree_close(t);
+ }
}
num_all_bytes = qpkg_clean_dir(dirp, vdb);