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 07:47:52
Message-Id: 20814.44957.706923.881677@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 Sat, 23 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 >> You assume that cp is GNU, if there's no lockf. Is it guaranteed that
14 >> this is true on all platforms?
15
16 > They're all just assumptions. If it breaks somewhere, I'll improve
17 > the function.
18
19 Maybe explicitly testing for USERLAND would be less fragile? Or use
20 tar everywhere?
21
22 Ulrich

Replies