Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH 5/7] eapply_user: make idempotent per changes to EAPI 6
Date: Mon, 09 Nov 2015 21:14:09
Message-Id: 56410C9A.4070204@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH 5/7] eapply_user: make idempotent per changes to EAPI 6 by "Michał Górny"
1 On 11/09/2015 09:49 AM, Michał Górny wrote:
2 > ---
3 > bin/phase-helpers.sh | 4 ++++
4 > 1 file changed, 4 insertions(+)
5 >
6 > diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
7 > index 2fea0b2..bd4e999 100644
8 > --- a/bin/phase-helpers.sh
9 > +++ b/bin/phase-helpers.sh
10 > @@ -1070,6 +1070,10 @@ fi
11 >
12 > if ___eapi_has_eapply_user; then
13 > eapply_user() {
14 > + local tagfile=${T}/.portage_user_patches_applied
15 > + [[ -f ${tagfile} ]] && return
16 > + touch "${tagfile}"
17 > +
18 > local basedir=${PORTAGE_CONFIGROOT%/}/etc/portage/patches
19 >
20 > local d applied
21 >
22
23 Instead of touch, we can use >> "${tagfile}" to get equivalent results
24 with pure bash. It shaves of a few cpu cycles, and we've actually had
25 issues with touch breakage in the past:
26
27 https://bugs.gentoo.org/show_bug.cgi?id=348640
28 --
29 Thanks,
30 Zac

Replies