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 <masahiro.yamada@canonical.com>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
Masahiro Yamada
2023-07-28 22:38:14 +09:00
committed by Paolo Pisati
parent de7282851c
commit 142e94252e
+1 -1
View File
@@ -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/ && \