Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, "Michał Górny" <mgorny@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] *-qa-check.d: fix entering EROOT in EAPI 7
Date: Thu, 25 Oct 2018 15:08:04
Message-Id: 7c691220-d758-bdb8-2edf-0939b9c65a8d@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] *-qa-check.d: fix entering EROOT in EAPI 7 by "Michał Górny"
1 On 10/25/2018 07:25 AM, Michał Górny wrote:
2 > Fix running QA checks from EROOT in EAPI 7 if the value is empty.
3 > Previously, this wrongly caused 'cd' to be run with empty value implying
4 > home directory.
5 >
6 > Bug: https://bugs.gentoo.org/668638
7 > Signed-off-by: Michał Górny <mgorny@g.o>
8 > ---
9 > bin/misc-functions.sh | 2 +-
10 > bin/postinst-qa-check.d/50gnome2-utils | 2 +-
11 > bin/postinst-qa-check.d/50xdg-utils | 2 +-
12 > 3 files changed, 3 insertions(+), 3 deletions(-)
13 >
14 > diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
15 > index 8c88f8f35..ff3d2a1ff 100755
16 > --- a/bin/misc-functions.sh
17 > +++ b/bin/misc-functions.sh
18 > @@ -174,7 +174,7 @@ postinst_qa_check() {
19 > local EPREFIX= EROOT=${ROOT}
20 > fi
21 >
22 > - cd "${EROOT}" || die "cd failed"
23 > + cd "${EROOT:-/}" || die "cd failed"
24 >
25 > # Collect the paths for QA checks, highest prio first.
26 > paths=(
27 > diff --git a/bin/postinst-qa-check.d/50gnome2-utils b/bin/postinst-qa-check.d/50gnome2-utils
28 > index a50df009a..29ea7c844 100644
29 > --- a/bin/postinst-qa-check.d/50gnome2-utils
30 > +++ b/bin/postinst-qa-check.d/50gnome2-utils
31 > @@ -54,7 +54,7 @@ gnome2_icon_cache_check() {
32 > }
33 >
34 > gnome2_utils_postinst_check() {
35 > - cd "${EROOT}" || die
36 > + cd "${EROOT:-/}" || die
37 > gnome2_icon_cache_check
38 > }
39 >
40 > diff --git a/bin/postinst-qa-check.d/50xdg-utils b/bin/postinst-qa-check.d/50xdg-utils
41 > index 7094e75a1..b33df4743 100644
42 > --- a/bin/postinst-qa-check.d/50xdg-utils
43 > +++ b/bin/postinst-qa-check.d/50xdg-utils
44 > @@ -90,7 +90,7 @@ xdg_mimeinfo_database_check() {
45 > }
46 >
47 > xdg_utils_postinst_check() {
48 > - cd "${EROOT}" || die
49 > + cd "${EROOT:-/}" || die
50 > xdg_desktop_database_check
51 > xdg_mimeinfo_database_check
52 > }
53 >
54
55 Looks good, please merge.
56 --
57 Thanks,
58 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature