1 |
commit: 583632d80a17c80d29eee2aec42d91cd05405fa3 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 1 19:30:55 2021 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 1 19:30:55 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=583632d8 |
7 |
|
8 |
qmerge: provide emulations for fowners and fperms |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
qmerge.c | 10 +++++++--- |
13 |
1 file changed, 7 insertions(+), 3 deletions(-) |
14 |
|
15 |
diff --git a/qmerge.c b/qmerge.c |
16 |
index e439a7d..9d524f1 100644 |
17 |
--- a/qmerge.c |
18 |
+++ b/qmerge.c |
19 |
@@ -1,5 +1,5 @@ |
20 |
/* |
21 |
- * Copyright 2005-2020 Gentoo Authors |
22 |
+ * Copyright 2005-2021 Gentoo Authors |
23 |
* Distributed under the terms of the GNU General Public License v2 |
24 |
* |
25 |
* Copyright 2005-2010 Ned Ludd - <solar@g.o> |
26 |
@@ -666,6 +666,8 @@ pkg_run_func_at(int dirfd, const char *vdb_path, const char *phases, const char |
27 |
"eqawarn() { elog \"QA: \"\"$@\"; }\n" |
28 |
"eerror() { elog \"$@\"; }\n" |
29 |
"die() { eerror \"$@\"; exit 1; }\n" |
30 |
+ "fowners() { local f a=$1; shift; for f in \"$@\" ; do chown $a \"${ED}/${f}\" ; done ; }\n" |
31 |
+ "fperms() { local f a=$1; shift; for f in \"$@\" ; do chmod $a \"${ED}/${f}\" ; done ; }\n" |
32 |
/* TODO: This should suppress `die` */ |
33 |
"nonfatal() { \"$@\"; }\n" |
34 |
"ebegin() { printf ' * %%b ...' \"$*\"; }\n" |
35 |
@@ -1895,7 +1897,7 @@ grab_binpkg_info(depend_atom *atom) |
36 |
/* reuse previously opened tree, so we really employ the cache |
37 |
* from libq/tree */ |
38 |
if (tree == NULL) { |
39 |
- snprintf(path, sizeof(path), "%s/portage/Packages", port_tmpdir); |
40 |
+ snprintf(path, sizeof(path), "%s/portage/%s", port_tmpdir, Packages); |
41 |
/* we don't use ROOT on package tree here, operating on ROOT |
42 |
* should be for package merges/unmerges, but be able to pull |
43 |
* binpkgs from current system */ |
44 |
@@ -2100,7 +2102,9 @@ int qmerge_main(int argc, char **argv) |
45 |
if (install && !pretend) { |
46 |
if (follow_rdepends && getenv("QMERGE") == NULL) { |
47 |
install = 0; |
48 |
- warn("Using these options are likely to break your system at this point. export QMERGE=1; if you think you know what your doing."); |
49 |
+ warn("Using these options are likely to break your " |
50 |
+ "system at this point. export QMERGE=1; " |
51 |
+ "if you think you know what your doing."); |
52 |
} |
53 |
} |