From: Daan De Meyer Date: Fri, 7 Mar 2025 15:05:49 +0000 (+0100) Subject: mkosi: Skip other build scripts if we're running clangd X-Git-Tag: v258-rc1~1148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c94fd1db6ef482f2037dc38838b896d204e7382;p=thirdparty%2Fsystemd.git mkosi: Skip other build scripts if we're running clangd --- diff --git a/mkosi.images/build/mkosi.conf.d/arch/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/arch/mkosi.build.chroot index 86aad4ff13d..d60a7e97932 100755 --- a/mkosi.images/build/mkosi.conf.d/arch/mkosi.build.chroot +++ b/mkosi.images/build/mkosi.conf.d/arch/mkosi.build.chroot @@ -2,6 +2,10 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +if [[ "$1" == "clangd" ]]; then + exit 0 +fi + if [[ ! -f "pkg/$PKG_SUBDIR/PKGBUILD" ]]; then echo "PKGBUILD not found at pkg/$PKG_SUBDIR/PKGBUILD, run mkosi once with -ff to make sure the PKGBUILD is cloned" >&2 exit 1 diff --git a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot index 64d17e770cd..ee50071869e 100755 --- a/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot +++ b/mkosi.images/build/mkosi.conf.d/centos-fedora/mkosi.build.chroot @@ -4,6 +4,10 @@ set -e . mkosi.functions +if [[ "$1" == "clangd" ]]; then + exit 0 +fi + if [[ ! -f "pkg/$PKG_SUBDIR/systemd.spec" ]]; then echo "spec not found at pkg/$PKG_SUBDIR/systemd.spec, run mkosi once with -ff to make sure the spec is cloned" >&2 exit 1 diff --git a/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot index 3923df2bbba..03ff50211bf 100755 --- a/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot +++ b/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot @@ -2,6 +2,10 @@ # SPDX-License-Identifier: LGPL-2.1-or-later set -e +if [[ "$1" == "clangd" ]]; then + exit 0 +fi + if [[ ! -d "pkg/$PKG_SUBDIR/debian" ]]; then echo "deb rules not found at pkg/$PKG_SUBDIR/debian, run mkosi once with -ff to make sure the rules are cloned" >&2 exit 1 diff --git a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot index f9fa9ac0850..f845f288c00 100755 --- a/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot +++ b/mkosi.images/build/mkosi.conf.d/opensuse/mkosi.build.chroot @@ -4,6 +4,10 @@ set -e . mkosi.functions +if [[ "$1" == "clangd" ]]; then + exit 0 +fi + if [[ ! -f "pkg/$PKG_SUBDIR${GIT_SUBDIR:+/$GIT_SUBDIR}/systemd.spec" ]]; then echo "spec not found at pkg/$PKG_SUBDIR${GIT_SUBDIR:+/$GIT_SUBDIR}/systemd.spec, run mkosi once with -ff to make sure the spec is cloned" >&2 exit 1