From: Don Zickus <dzickus@xxxxxxxxxx> Avoid constantly running the config update scripts when the merge to master did not update anything. This means there can be no new configs to generate. Same argument for ark-patches. The only downside I see with this check is if the generate config scripts fail and this needs to be re-run. But we should be able to do that by hand. Signed-off-by: Don Zickus <dzickus@xxxxxxxxxx> --- redhat/scripts/ci/ark-rebase-patches.sh | 3 +++ redhat/scripts/ci/ark-update-configs.sh | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/redhat/scripts/ci/ark-rebase-patches.sh b/redhat/scripts/ci/ark-rebase-patches.sh index 2ac22bcba3bd..561a927d5946 100755 --- a/redhat/scripts/ci/ark-rebase-patches.sh +++ b/redhat/scripts/ci/ark-rebase-patches.sh @@ -46,6 +46,9 @@ else GITLAB_CONFIG_OPT="-c $PYTHON_GITLAB_CONFIG" fi +# Check if ark-patches is already rebased to $UPSTREAM_REF +test -n "$(git branch os-build --contains "$UPSTREAM_REF")" && exit 0 + if git show "$UPSTREAM_REF" > /dev/null 2>&1; then printf "Rebasing ark-patches onto %s...\n" "$UPSTREAM_REF" else diff --git a/redhat/scripts/ci/ark-update-configs.sh b/redhat/scripts/ci/ark-update-configs.sh index e0945d5ffbb4..5fb13eaf60d6 100755 --- a/redhat/scripts/ci/ark-update-configs.sh +++ b/redhat/scripts/ci/ark-update-configs.sh @@ -33,6 +33,7 @@ To resolve this, do the following: git checkout os-build BRANCH="$(git branch --show-current)" +HEAD="$(git describe)" if ! git merge -m "Merge '$UPSTREAM_REF' into '$BRANCH'" "$UPSTREAM_REF"; then git merge --abort printf "Merge conflict; halting!\n" @@ -47,6 +48,10 @@ if ! git merge -m "Merge '$UPSTREAM_REF' into '$BRANCH'" "$UPSTREAM_REF"; then fi exit 1 fi +NEW_HEAD="$(git describe)" + +# Merge is already up to date, nothing to do. +test "$HEAD" != "$NEW_HEAD" || exit 0 # Generates and commits all the pending configs make FLAVOR=fedora dist-configs-commit -- GitLab _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx