diff mbox series

[SRU,Xenial,Bionic,2/2] UBUNTU: [Packaging] force creation of headers directory

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

Commit Message

Shrirang Bagul Oct. 14, 2019, 10:09 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.

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

Patch

diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 0b91b83d88d2..c4c15517e491 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -491,7 +491,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)