1 |
commit: b5cb53dedf28648f817da28fdcc288894c8e6e45 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 31 07:59:20 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 31 07:59:20 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=b5cb53de |
7 |
|
8 |
qmerge: just show which packages would be installed without --pretend |
9 |
|
10 |
While pretend shows what would be done, make default mode (interactive) |
11 |
just list what would be installed, not how. |
12 |
|
13 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
14 |
|
15 |
qmerge.c | 9 ++++----- |
16 |
1 file changed, 4 insertions(+), 5 deletions(-) |
17 |
|
18 |
diff --git a/qmerge.c b/qmerge.c |
19 |
index 3f82d61..21f0863 100644 |
20 |
--- a/qmerge.c |
21 |
+++ b/qmerge.c |
22 |
@@ -1093,6 +1093,9 @@ pkg_merge(int level, const depend_atom *qatom, const tree_match_ctx *mpkg) |
23 |
freeargv(ARGC, ARGV); |
24 |
} |
25 |
|
26 |
+ if (pretend == 100) |
27 |
+ return; |
28 |
+ |
29 |
/* Get a handle on the main vdb repo */ |
30 |
vdb = tree_open_vdb(portroot, portvdb); |
31 |
if (vdb == NULL) { |
32 |
@@ -1517,9 +1520,6 @@ pkg_unmerge(tree_pkg_ctx *pkg_ctx, depend_atom *rpkg, set *keep, |
33 |
printf("%s***%s unmerging %s\n", YELLOW, NORM, |
34 |
atom_format("%[CATEGORY]%[PF]", tree_get_atom(pkg_ctx, false))); |
35 |
|
36 |
- if (pretend == 100) |
37 |
- return 0; |
38 |
- |
39 |
portroot_fd = cat_ctx->ctx->portroot_fd; |
40 |
|
41 |
/* execute the pkg_prerm step if we're just unmerging, not when |
42 |
@@ -1768,7 +1768,6 @@ pkg_fetch(int level, const depend_atom *qatom, const tree_match_ctx *mpkg) |
43 |
if (pretend) { |
44 |
if (!install) |
45 |
install++; |
46 |
- /* qprint_tree_node(level, qatom, mpkg); */ |
47 |
pkg_merge(level, qatom, mpkg); |
48 |
return; |
49 |
} |
50 |
@@ -2053,7 +2052,7 @@ int qmerge_main(int argc, char **argv) |
51 |
int save_verbose = verbose; |
52 |
int save_quiet = quiet; |
53 |
|
54 |
- pretend = 100; |
55 |
+ pretend = save_pretend ? 10 : 100; |
56 |
verbose = 0; |
57 |
quiet = 1; |
58 |
ret = qmerge_run(todo); |