On Sun, 24 Mar 2013 14:40:58 +0100
Ulrich Mueller <[email protected]> wrote:

> >>>>> On Sun, 24 Mar 2013, Michał Górny wrote:
> 
> >> >> > +multibuild_merge_root() {
> >> >> > + [...]
> >> >> > +     if type -P lockf &>/dev/null; then
> >> >> > +             # On BSD, we have 'lockf' wrapper.
> >> >> > +             tar -C "${src}" -f - -c . \
> >> >> > +                     | lockf "${lockfile}" tar -x -f - -C "${dest}"
> >> >> > +     else
> >> >> > + [...]
> >> >> > +             cp -a -l -n "${src}"/. "${dest}"/
> 
> >> Maybe explicitly testing for USERLAND would be less fragile? Or use
> >> tar everywhere?
> 
> > I prefer something that can boom into face and let us know that it
> > is broken rather than silent, poor catch-all.
> 
> How about adding a couple of "assert" and "die" to tar and cp then?

Oh, I now see that the 'die' following the block does no longer catch
all cases properly. I will fix that.

Can you think of more assertions I should have there?

Oh, I didn't reply to use of userland. I thought about using that but
that would mean that I'd have to check all the userlands we support.
But that's probably better than assuming that a system having 'lockf'
has broken 'cp', true.

I will send an updated patch as soon as I clean up the mess Samuli made
with udev/systemd.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to