1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-24 06:04:05 +03:00

mkosi: Don't touch the packaging checkout if work is being done

If work is being done in a separate branch, don't touch the packaging
checkout.

(cherry picked from commit 88e92306431bd5928ab4e5c18310e36de9ffa3f6)
This commit is contained in:
Daan De Meyer 2024-07-02 22:27:01 +02:00 committed by Luca Boccassi
parent 59ab01d32f
commit 8abb2e0f55

View File

@ -9,8 +9,15 @@ fi
PKG_SUBDIR="$(realpath --canonicalize-missing "pkg/$DISTRIBUTION" --relative-to "$PWD")"
if [[ -d "$PKG_SUBDIR/.git" ]] && [[ "$(git -C "$PKG_SUBDIR" rev-parse HEAD)" == "$GIT_COMMIT" ]]; then
exit 0
if [[ -d "$PKG_SUBDIR/.git" ]]; then
if [[ "$(git -C "$PKG_SUBDIR" rev-parse HEAD)" == "$GIT_COMMIT" ]]; then
exit 0
fi
# If work is being done on the packaging rules in a separate branch, don't touch the checkout.
if ! git merge-base --is-ancestor HEAD "origin/$GIT_BRANCH"; then
exit 0
fi
fi
# The repository on Salsa has the full upstream sources, so it's a waste of space to