diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-01-10 20:17:48 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-01-11 18:20:39 +0100 |
commit | ab1785b1b2559c9f2d09d4d3ce43e11f4b828616 (patch) | |
tree | ea3d87dffa90bf6b6e4528785715e5061a021d96 /toolchain/info.mk | |
parent | 17b194aeac0196614cbee470348d77ea7f4971ee (diff) | |
download | upstream-ab1785b1b2559c9f2d09d4d3ce43e11f4b828616.tar.gz upstream-ab1785b1b2559c9f2d09d4d3ce43e11f4b828616.tar.bz2 upstream-ab1785b1b2559c9f2d09d4d3ce43e11f4b828616.zip |
build: fix restoring /etc/opkg with PER_DEVICE_ROOTFS
When generating per-device rootfs directories, the ./etc/opkg/ directory
is moved away prior to calling opkg install, opkg remove and rootfs_prepare.
After the opkg invocations and the rootfs_prepare macro call, the saved opkg
config directory is supposed to be moved back to its previous ./etc/opkg
location.
The mv command however can fail to properly restore the directory under
certain circumstances, e.g. when the prior opkg or files/ overlay copy
operations caused a new ./etc/opkg/ directory to be created.
In this case, the backed up directory (named target-dir-$hash.opkg) will be
moved into the preexisting ./etc/opkg/ directory instead, causing the opkg
configuration to be located in a wrong path on the final rootfs, e.g. in
/etc/opkg/target-dir-$hash.opkg/distfeeds.conf instead of
/etc/opkg/distfeeds.conf.
Solve this problem by replacing the naive "mv" command with a recursive
"cp -T" invocation which causes the backed up directory tree to get merged
with the destination directory in case it already exists.
Also perform the rootfs_prepare macro call after restoring the opkg
configuration, to allow users to override it again by using the files/
overlay mechanism.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'toolchain/info.mk')
0 files changed, 0 insertions, 0 deletions