1 |
commit: 53c4e1ac66f9ccfcb68b800cc1489a5da9923bb8 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 25 14:22:54 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 25 15:16:44 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=53c4e1ac |
7 |
|
8 |
*-qa-check.d: fix entering EROOT in EAPI 7 |
9 |
|
10 |
Fix running QA checks from EROOT in EAPI 7 if the value is empty. |
11 |
Previously, this wrongly caused 'cd' to be run with empty value implying |
12 |
home directory. |
13 |
|
14 |
Bug: https://bugs.gentoo.org/668638 |
15 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
16 |
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org> |
17 |
|
18 |
bin/misc-functions.sh | 2 +- |
19 |
bin/postinst-qa-check.d/50gnome2-utils | 2 +- |
20 |
bin/postinst-qa-check.d/50xdg-utils | 2 +- |
21 |
3 files changed, 3 insertions(+), 3 deletions(-) |
22 |
|
23 |
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh |
24 |
index 8c88f8f35..ff3d2a1ff 100755 |
25 |
--- a/bin/misc-functions.sh |
26 |
+++ b/bin/misc-functions.sh |
27 |
@@ -174,7 +174,7 @@ postinst_qa_check() { |
28 |
local EPREFIX= EROOT=${ROOT} |
29 |
fi |
30 |
|
31 |
- cd "${EROOT}" || die "cd failed" |
32 |
+ cd "${EROOT:-/}" || die "cd failed" |
33 |
|
34 |
# Collect the paths for QA checks, highest prio first. |
35 |
paths=( |
36 |
|
37 |
diff --git a/bin/postinst-qa-check.d/50gnome2-utils b/bin/postinst-qa-check.d/50gnome2-utils |
38 |
index a50df009a..29ea7c844 100644 |
39 |
--- a/bin/postinst-qa-check.d/50gnome2-utils |
40 |
+++ b/bin/postinst-qa-check.d/50gnome2-utils |
41 |
@@ -54,7 +54,7 @@ gnome2_icon_cache_check() { |
42 |
} |
43 |
|
44 |
gnome2_utils_postinst_check() { |
45 |
- cd "${EROOT}" || die |
46 |
+ cd "${EROOT:-/}" || die |
47 |
gnome2_icon_cache_check |
48 |
} |
49 |
|
50 |
|
51 |
diff --git a/bin/postinst-qa-check.d/50xdg-utils b/bin/postinst-qa-check.d/50xdg-utils |
52 |
index 7094e75a1..b33df4743 100644 |
53 |
--- a/bin/postinst-qa-check.d/50xdg-utils |
54 |
+++ b/bin/postinst-qa-check.d/50xdg-utils |
55 |
@@ -90,7 +90,7 @@ xdg_mimeinfo_database_check() { |
56 |
} |
57 |
|
58 |
xdg_utils_postinst_check() { |
59 |
- cd "${EROOT}" || die |
60 |
+ cd "${EROOT:-/}" || die |
61 |
xdg_desktop_database_check |
62 |
xdg_mimeinfo_database_check |
63 |
} |