Commit 8397267
committed
imagebuilder: companion fix for redundant abi-versioned packages hack
The find command fails if the same files are overwrite by itself:
...
find /workdir/bin/targets/malta/le/packages /workdir/bin/packages/mipsel_24kc/base /workdir/bin/packages/mipsel_24kc/luci /workdir/bin/packages/mipsel_24kc/packages /workdir/bin/packages/mipsel_24kc/routing /workdir/bin/packages/mipsel_24kc/telephony /workdir/bin/packages/mipsel_24kc/video -type f -name '*.apk' \
-exec cp -fpR -t /workdir/build_dir/target-mipsel_24kc_musl/openwrt-imagebuilder-malta-le.Linux-x86_64/packages/ {} +
cp: will not overwrite just-created '/workdir/build_dir/target-mipsel_24kc_musl/openwrt-imagebuilder-malta-le.Linux-x86_64/packages/libext2fs2-1.47.3-r1.apk' with '/workdir/bin/packages/mipsel_24kc/base/libext2fs2-1.47.3-r1.apk'
cp: will not overwrite just-created '/workdir/build_dir/target-mipsel_24kc_musl/openwrt-imagebuilder-malta-le.Linux-x86_64/packages/libcomerr0-1.47.3-r1.apk' with '/workdir/bin/packages/mipsel_24kc/base/libcomerr0-1.47.3-r1.apk'
cp: will not overwrite just-created '/workdir/build_dir/target-mipsel_24kc_musl/openwrt-imagebuilder-malta-le.Linux-x86_64/packages/libe2p2-1.47.3-r1.apk' with '/workdir/bin/packages/mipsel_24kc/base/libe2p2-1.47.3-r1.apk'
cp: will not overwrite just-created '/workdir/build_dir/target-mipsel_24kc_musl/openwrt-imagebuilder-malta-le.Linux-x86_64/packages/libjson-c5-0.18-r1.apk' with '/workdir/bin/packages/mipsel_24kc/base/libjson-c5-0.18-r1.apk'
...
Since the "find + exex $(CP)" is intented to execute cp with -f flag for
overwrites, it should success in that case or at least not fail.
Change to a equivalent "rsync" command which does it correctly.
This is needed for the new "shared" abi-versioned packages which are
going to appear in two directories after the other commit included in
this PR/series is applied.
After:
rsync -a --include='*.apk' --exclude='*' \
/workdir/bin/targets/malta/le/packages/ /workdir/bin/packages/mipsel_24kc/base/ /workdir/bin/packages/mipsel_24kc/luci/ /workdir/bin/packages/mipsel_24kc/packages/ /workdir/bin/packages/mipsel_24kc/routing/ /workdir/bin/packages/mipsel_24kc/telephony/ /workdir/bin/packages/mipsel_24kc/video/ \
/workdir/build_dir/target-mipsel_24kc_musl/openwrt-imagebuilder-malta-le.Linux-x86_64/packages/
Signed-off-by: Mario Andrés Pérez <mapb_@outlook.com>1 parent 5a65576 commit 8397267
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
0 commit comments