From 142e94252e4c23183e9833d78662e0073abe42fd Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 28 Jul 2023 22:38:14 +0900 Subject: [PATCH] UBUNTU: [Packaging] Fix File exists error in install-arch-headers Our debian build scripts only work in a pristine source tree. If you build the packages second time, the following code mkdir $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH) ... will fail with this message: mkdir: cannot create directory '...': File exists Irrespective of the error, $(headers_dir) should be removed because garbage files from the previous build might be remaining. Signed-off-by: Masahiro Yamada Signed-off-by: Andrea Righi --- debian/rules.d/2-binary-arch.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 1f77a787000e..7af0287b6535 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -561,7 +561,7 @@ install-arch-headers: ifeq ($(do_libc_dev_package),true) dh_prep -plinux-libc-dev endif - rm -rf $(headers_tmp) + rm -rf $(headers_tmp) $(headers_dir) install -d $(headers_tmp) $(headers_dir)/usr/include/ $(hmake) $(conc_level) headers_install ( cd $(headers_tmp)/install/include/ && \