Add helper script to check repodata consistency#21
Merged
Watson1978 merged 2 commits intomainfrom Mar 24, 2026
Merged
Conversation
Contributor
|
My local repodata hasn't been updated yet, so the checksums should be broken. After applying the following changes, it started reporting incorrect checksums. Patchdiff --git a/check-repository-repodata.sh b/check-repository-repodata.sh
index 253bd4b..49d2ed1 100755
--- a/check-repository-repodata.sh
+++ b/check-repository-repodata.sh
@@ -5,6 +5,9 @@
#
# check-repository-metadata.sh 6.0.0 ../fluent-package-release/lts/6
#
+# Note: Requires dnf-plugins-core to be installed to use the download command
+#
+# dnf install dnf-plugins-core
VERSION=$1
REPOSITORY_DIR=$2
@@ -31,5 +34,14 @@ dnf --disableplugin=system_upgrade clean all
for path in $(find $REPOSITORY_DIR -name 'repodata'); do
relative_dir=${path%/*}
echo $relative_dir
- LANG=C dnf --disableplugin=system_upgrade --releasever=$VERSION --disablerepo="*" --repofrompath wip,$relative_dir --enablerepo wip download fluent-package
-done
+ rpm_file=$(find "$relative_dir" -maxdepth 1 -name "fluent-package-${VERSION}*.rpm" | head -n 1)
+ if [ -z "$rpm_file" ]; then
+ echo "Warning: No RPM file found in $relative_dir"
+ continue
+ fi
+ target_arch=$(basename "$relative_dir")
+ base_name=$(basename "$rpm_file")
+ pkg_name="${base_name%.${target_arch}.rpm}"
+ echo "Package name: ${pkg_name}"
+ LANG=C dnf --disableplugin=system_upgrade --releasever=$VERSION --disablerepo="*" --repofrompath wip,$relative_dir --enablerepo wip download $pkg_name
+done
\ No newline at end of fileBeforeAfter |
Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
#21 (comment) Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
Contributor
Author
|
Thanks, applied it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.