1 |
On Sun, 24 Mar 2013 14:40:58 +0100 |
2 |
Ulrich Mueller <ulm@g.o> wrote: |
3 |
|
4 |
> >>>>> On Sun, 24 Mar 2013, Michał Górny wrote: |
5 |
> |
6 |
> >> >> > +multibuild_merge_root() { |
7 |
> >> >> > + [...] |
8 |
> >> >> > + if type -P lockf &>/dev/null; then |
9 |
> >> >> > + # On BSD, we have 'lockf' wrapper. |
10 |
> >> >> > + tar -C "${src}" -f - -c . \ |
11 |
> >> >> > + | lockf "${lockfile}" tar -x -f - -C "${dest}" |
12 |
> >> >> > + else |
13 |
> >> >> > + [...] |
14 |
> >> >> > + cp -a -l -n "${src}"/. "${dest}"/ |
15 |
> |
16 |
> >> Maybe explicitly testing for USERLAND would be less fragile? Or use |
17 |
> >> tar everywhere? |
18 |
> |
19 |
> > I prefer something that can boom into face and let us know that it |
20 |
> > is broken rather than silent, poor catch-all. |
21 |
> |
22 |
> How about adding a couple of "assert" and "die" to tar and cp then? |
23 |
|
24 |
Oh, I now see that the 'die' following the block does no longer catch |
25 |
all cases properly. I will fix that. |
26 |
|
27 |
Can you think of more assertions I should have there? |
28 |
|
29 |
Oh, I didn't reply to use of userland. I thought about using that but |
30 |
that would mean that I'd have to check all the userlands we support. |
31 |
But that's probably better than assuming that a system having 'lockf' |
32 |
has broken 'cp', true. |
33 |
|
34 |
I will send an updated patch as soon as I clean up the mess Samuli made |
35 |
with udev/systemd. |
36 |
|
37 |
-- |
38 |
Best regards, |
39 |
Michał Górny |