public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Lumir Balhar <lbalhar@redhat.com>
To: git-commits@fedoraproject.org
Subject: [tests/python] main: Use reinstall and distrosync instead of downgrade to cover more use-cases
Date: Tue, 14 Jul 2026 09:10:00 GMT [thread overview]
Message-ID: <178402020085.1.14795032115034545472.tests-python-a83a4480c009@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : tests/python
Branch : main
Commit : a83a4480c009c4ac68566c019116f77863d30cae
Author : Lumir Balhar <lbalhar@redhat.com>
Date : 2026-07-13T19:35:24+02:00
Stats : +19/-12 in 1 file(s)
URL : https://src.fedoraproject.org/tests/python/c/a83a4480c009c4ac68566c019116f77863d30cae?branch=main
Log:
Use reinstall and distrosync instead of downgrade to cover more use-cases
---
diff --git a/required-symbols/check.sh b/required-symbols/check.sh
index f0727f9..797f024 100755
--- a/required-symbols/check.sh
+++ b/required-symbols/check.sh
@@ -20,12 +20,12 @@ PYVER=${VERSION}
SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
WORK_DIR=""
-DOWNGRADED=false
+PKGS_MODIFIED=false
cleanup() {
- if [[ "$DOWNGRADED" == true ]]; then
+ if [[ "$PKGS_MODIFIED" == true ]]; then
echo ""
- echo "=== Reverting package downgrade ==="
+ echo "=== Reverting package changes ==="
dnf history undo last -y 2>&1 || echo "WARNING: dnf history undo failed" >&2
fi
[[ -n "$WORK_DIR" ]] && rm -rf "$WORK_DIR"
@@ -53,14 +53,10 @@ WORK_DIR=$(mktemp -d)
echo "=== Collecting PR build symbols ==="
python${PYVER} "$SCRIPT_DIR/collect_symbols.py" "${SCAN_ARGS[@]}" > "$WORK_DIR/new.json"
-# Downgrade to the latest stable version in the distribution repos.
-# If no older version is available, there is nothing to compare against → skip.
echo ""
echo "=== Available repos ==="
dnf repolist --all
-echo ""
-echo "=== Downgrading to the latest stable version in repos ==="
# Discover packages dynamically from the installed source RPM so we don't need
# to hardcode subpackage names — works regardless of which subpackages were built.
readarray -t PKGS < <(
@@ -68,13 +64,24 @@ readarray -t PKGS < <(
awk -v src="python${PYVER}" '$1 ~ "^" src "-[0-9]" { print $2 }' |
sort -u
)
-echo "Packages to downgrade: ${PKGS[*]}"
+echo "Packages to install from stable repos: ${PKGS[*]}"
-if ! dnf downgrade -y "${PKGS[@]}" 2>&1; then
- echo "INFO: dnf downgrade failed or no stable version available; skipping comparison." >&2
- exit 0
+# Install the stable version from distribution repos, excluding the artifact repo
+# that carries the PR build, so we always compare against what is publicly available.
+#
+# Strategy:
+# 1. dnf reinstall — works when the PR did not bump NVR (same version in stable repos)
+# 2. dnf distro-sync — fallback when the PR bumped NVR; installs the latest stable NVR
+echo ""
+echo "=== Installing stable version from repos ==="
+if ! dnf reinstall -y --disablerepo=test-artifacts "${PKGS[@]}" 2>&1; then
+ echo "INFO: reinstall failed (NVR not in stable repos), falling back to distro-sync" >&2
+ if ! dnf distro-sync -y --disablerepo=test-artifacts "${PKGS[@]}" 2>&1; then
+ echo "INFO: distro-sync failed; no stable version available, skipping comparison." >&2
+ exit 0
+ fi
fi
-DOWNGRADED=true
+PKGS_MODIFIED=true
echo ""
echo "=== Collecting stable version symbols ==="
reply other threads:[~2026-07-14 9:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178402020085.1.14795032115034545472.tests-python-a83a4480c009@fedoraproject.org \
--to=lbalhar@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox