1 |
commit: 56a4f36cf6325323068397b0b510b8e8340c25d9 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 2 09:44:33 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 2 09:44:33 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=56a4f36c |
7 |
|
8 |
qlop: improve description for -c, fix -E |
9 |
|
10 |
-c could use a bit better explanation |
11 |
-E included installed packages for no good reason |
12 |
|
13 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
14 |
|
15 |
TODO.md | 5 +++++ |
16 |
qpkg.c | 16 ++++++++-------- |
17 |
2 files changed, 13 insertions(+), 8 deletions(-) |
18 |
|
19 |
diff --git a/TODO.md b/TODO.md |
20 |
index 602d17a..d89dda1 100644 |
21 |
--- a/TODO.md |
22 |
+++ b/TODO.md |
23 |
@@ -18,6 +18,10 @@ |
24 |
so we can |
25 |
- parse package.accept\_keywords such that we can provide the latest |
26 |
"available" version like Portage |
27 |
+- check timestamps in libq/tree for choosing which method to take: |
28 |
+ - ignore Packages when it is older than the last directory change |
29 |
+ - ignore metadata when ebuild is modified |
30 |
+ - add some method to skip these checks and assume everything is right |
31 |
|
32 |
# qmerge |
33 |
- dep resolver needs spanktastic love. |
34 |
@@ -65,6 +69,7 @@ |
35 |
# qmanifest |
36 |
- use openat in most places |
37 |
- parse timestamps and print in local timezone |
38 |
+- implement python module for gemato interface (to use with Portage) |
39 |
|
40 |
# qlop |
41 |
- guestimate runtime based on best-matching pkg (e.g. with gcc) |
42 |
|
43 |
diff --git a/qpkg.c b/qpkg.c |
44 |
index 9d2d82a..771241c 100644 |
45 |
--- a/qpkg.c |
46 |
+++ b/qpkg.c |
47 |
@@ -41,8 +41,8 @@ static struct option const qpkg_long_opts[] = { |
48 |
COMMON_LONG_OPTS |
49 |
}; |
50 |
static const char * const qpkg_opts_help[] = { |
51 |
- "clean pkgdir of unused binary files", |
52 |
- "clean pkgdir of files not in the tree anymore (slow)", |
53 |
+ "clean pkgdir of files that are not installed", |
54 |
+ "clean pkgdir of files that are not in the tree anymore", |
55 |
"pretend only", |
56 |
"alternate package directory", |
57 |
COMMON_OPTS_HELP |
58 |
@@ -134,12 +134,6 @@ qpkg_clean(char *dirp) |
59 |
if ((count = scandir(".", &dnames, filter_hidden, alphasort)) < 0) |
60 |
return 1; |
61 |
|
62 |
- t = tree_open_vdb(portroot, portvdb); |
63 |
- if (t != NULL) { |
64 |
- vdb = tree_get_atoms(t, true, vdb); |
65 |
- tree_close(t); |
66 |
- } |
67 |
- |
68 |
if (eclean) { |
69 |
size_t n; |
70 |
const char *overlay; |
71 |
@@ -151,6 +145,12 @@ qpkg_clean(char *dirp) |
72 |
tree_close(t); |
73 |
} |
74 |
} |
75 |
+ } else { |
76 |
+ t = tree_open_vdb(portroot, portvdb); |
77 |
+ if (t != NULL) { |
78 |
+ vdb = tree_get_atoms(t, true, vdb); |
79 |
+ tree_close(t); |
80 |
+ } |
81 |
} |
82 |
|
83 |
num_all_bytes = qpkg_clean_dir(dirp, vdb); |