mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 09:32:13 +02:00
run-postinsts: do not remove postinsts directory.
When running on the systems having read-only rootfs backed by overlayfs, removing the whole directory lead to create a special char device file on the upperdir to reflect directory's removal. Once it is required to upgrade the whole read-only image that might contain new postinsts scripts, it will be impossible to run such scripts with a "deletion mark" file on the overlayfs -- the whole directory will be marked as deleted regardless new files in it. (From OE-Core rev: d913d2fbd431ccc10a6197c4dc8858dfd9a91426) Signed-off-by: Anton D. Kachalov <gmouse@google.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1a27b62b225ffeecec47c249a0b86cc54d775add) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
76008007da
commit
48a316b10f
@@ -72,12 +72,12 @@ exec_postinst_scriptlets() {
|
||||
else
|
||||
echo "ERROR: postinst $i failed."
|
||||
[ "$POSTINST_LOGGING" = "1" ] && eval echo "ERROR: postinst $i failed." $append_log
|
||||
remove_pi_dir=0
|
||||
remove_rcsd_link=0
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
remove_pi_dir=1
|
||||
remove_rcsd_link=1
|
||||
if $pm_installed; then
|
||||
case $pm in
|
||||
"ipk")
|
||||
@@ -92,9 +92,7 @@ else
|
||||
exec_postinst_scriptlets
|
||||
fi
|
||||
|
||||
# since all postinstalls executed successfully, remove the postinstalls directory
|
||||
# and the rcS.d link
|
||||
if [ $remove_pi_dir = 1 ]; then
|
||||
rm -rf $pi_dir
|
||||
# since all postinstalls executed successfully, remove the rcS.d link
|
||||
if [ $remove_rcsd_link = 1 ]; then
|
||||
remove_rcsd_link
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user