From 88d8ee9a3828e83385b5a781433158b16831c1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Achim=20Gsell=C3=BC?= Date: Fri, 14 Sep 2018 16:55:36 +0200 Subject: [PATCH] Pmodules/libpbuild.bash - install modulefile to doc-dir - make sure BUILD_DIR exist --- Pmodules/libpbuild.bash | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Pmodules/libpbuild.bash b/Pmodules/libpbuild.bash index 8fc96a5..72839df 100644 --- a/Pmodules/libpbuild.bash +++ b/Pmodules/libpbuild.bash @@ -672,11 +672,15 @@ pbuild::make_all() { install -m 0755 -d "${docdir}" install -m0444 "${MODULE_DOCFILES[@]/#/${SRC_DIR}/}" \ "${BUILD_SCRIPT}" \ - "${BUILDBLOCK_DIR}/modulefile" \ "${docdir}" + # skip modulefile if it does not exist + # (e.g. while bootstrapping) + test -r "${BUILDBLOCK_DIR}/modulefile" && \ + install -m0444 "$_" "${docdir}" + return 0 } - # unfortunatelly sometime we need an OS depended post-install + # sometime we need an OS depended post-install post_install_linux() { std::info "${P}/${V}: running post-installation for ${OS} ..." cd "${PREFIX}" @@ -770,6 +774,7 @@ pbuild::make_all() { cd "${dir}" && "pbuild::${target}" cd "${dir}" && "pbuild::post_${target}_${OS}" cd "${dir}" && "pbuild::post_${target}" + mkdir -p "${BUILD_DIR}" touch "${BUILD_DIR}/.${target}" fi }