Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 1/2] Introduce multibuild_merge_root() to merge interim installs.
Date: Sun, 24 Mar 2013 13:41:24
Message-Id: 20815.618.456234.421581@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] [PATCH 1/2] Introduce multibuild_merge_root() to merge interim installs. by "Michał Górny"
1 >>>>> On Sun, 24 Mar 2013, Micha³ Górny wrote:
2
3 >> >> > +multibuild_merge_root() {
4 >> >> > + [...]
5 >> >> > + if type -P lockf &>/dev/null; then
6 >> >> > + # On BSD, we have 'lockf' wrapper.
7 >> >> > + tar -C "${src}" -f - -c . \
8 >> >> > + | lockf "${lockfile}" tar -x -f - -C "${dest}"
9 >> >> > + else
10 >> >> > + [...]
11 >> >> > + cp -a -l -n "${src}"/. "${dest}"/
12
13 >> Maybe explicitly testing for USERLAND would be less fragile? Or use
14 >> tar everywhere?
15
16 > I prefer something that can boom into face and let us know that it
17 > is broken rather than silent, poor catch-all.
18
19 How about adding a couple of "assert" and "die" to tar and cp then?
20
21 Ulrich

Replies