If apt-get fails during debsrc_download execution there will be mount
left behind. Protect it with a trap for cleanup in case of failure.
Signed-off-by: Anton Mikanovich <
ami...@ilbers.de>
---
meta/classes/deb-dl-dir.bbclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index 55e56c50..7ebd057e 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -48,6 +48,9 @@ debsrc_download() {
debsrc_do_mounts "${rootfs}"
+ trap 'exit 1' INT HUP QUIT TERM ALRM USR1
+ trap 'debsrc_undo_mounts "${rootfs}"' EXIT
+
( flock 9
set -e
printenv | grep -q BB_VERBOSE_LOGS && set -x
--
2.34.1