Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH v2 4/8] sys-apps/openrc: Replace path_exists with inline bash test
Date: Thu, 09 Aug 2018 15:18:15
Message-Id: 20180809151602.11147-5-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH v2 0/8] eutils/path_exists removal by "Michał Górny"
1 path_exists was really meant to be used with wildcards (i.e. when plain
2 bash tests can't work easily). Here it is really unnecessary.
3 ---
4 sys-apps/openrc/openrc-0.34.11.ebuild | 2 +-
5 1 file changed, 1 insertion(+), 1 deletion(-)
6
7 diff --git a/sys-apps/openrc/openrc-0.34.11.ebuild b/sys-apps/openrc/openrc-0.34.11.ebuild
8 index 4e2ed59e45f4..7fd281798c14 100644
9 --- a/sys-apps/openrc/openrc-0.34.11.ebuild
10 +++ b/sys-apps/openrc/openrc-0.34.11.ebuild
11 @@ -289,7 +289,7 @@ pkg_postinst() {
12 fi
13
14 # Handle the conf.d/local.{start,stop} -> local.d transition
15 - if path_exists -o "${EROOT}"etc/conf.d/local.{start,stop} ; then
16 + if [[ -f ${EROOT}etc/conf.d/local.start || -f ${EROOT}etc/conf.d/local.stop ]] ; then
17 elog "Moving your ${EROOT}etc/conf.d/local.{start,stop}"
18 elog "files to ${EROOT}etc/local.d"
19 mv "${EROOT}"etc/conf.d/local.start "${EROOT}"etc/local.d/baselayout1.start
20 --
21 2.18.0