[UNSTABLE,2/2] UBUNTU: [Packaging] force creation of headers directory
diff mbox series

Message ID 20191023040725.9811-3-shrirang.bagul@canonical.com
State New
Headers show
  • UBUNTU: [Packaging] Support building Flattened Image Tree (FIT) kernels
Related show

Commit Message

Shrirang Bagul Oct. 23, 2019, 4:07 a.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1847969

Due to a race condition, some times the headers directory already
exists when running the install-arch-headers rule. Make sure we do
not fail in that case.

Based on commit (in Bionic):
bb372cae8201: UBUNTU: [Packaging] force creation of headers directory

Signed-off-by: Alfonso Sánchez-Beato <alfonso.sanchez-beato@canonical.com>
Signed-off-by: Shrirang Bagul <shrirang.bagul@canonical.com>
 debian/rules.d/2-binary-arch.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff mbox series

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index f3279369c3a7..bd86d7b71fad 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -522,7 +522,8 @@  endif
 		find . -name '.' -o -name '.*' -prune -o -print | \
                 cpio -pvd --preserve-modification-time \
 			$(headers_dir)/usr/include/ )
-	mkdir $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)
+	mkdir -p $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)
+	rm -rf $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)/asm
 	mv $(headers_dir)/usr/include/asm $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)/
 	rm -rf $(headers_tmp)