commit: 56a4f36cf6325323068397b0b510b8e8340c25d9
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 2 09:44:33 2020 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jan 2 09:44:33 2020 +0000
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=56a4f36c
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 <AT> gentoo.org>
TODO.md | 5 +++++
qpkg.c | 16 ++++++++--------
2 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/TODO.md b/TODO.md
index 602d17a..d89dda1 100644
--- a/TODO.md
+++ b/TODO.md
@@ -18,6 +18,10 @@
so we can
- parse package.accept\_keywords such that we can provide the latest
"available" version like Portage
+- check timestamps in libq/tree for choosing which method to take:
+ - ignore Packages when it is older than the last directory change
+ - ignore metadata when ebuild is modified
+ - add some method to skip these checks and assume everything is right
# qmerge
- dep resolver needs spanktastic love.
@@ -65,6 +69,7 @@
# qmanifest
- use openat in most places
- parse timestamps and print in local timezone
+- implement python module for gemato interface (to use with Portage)
# qlop
- guestimate runtime based on best-matching pkg (e.g. with gcc)
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);