diff --git a/sync/common b/sync/common index 5f0efc0..aac8af0 100644 --- a/sync/common +++ b/sync/common @@ -226,6 +226,14 @@ function createrepo_only() { --workers 12 } +function createrepo_update() { + local TARGET="${1}" + local TARGET_REV="${2}" + createrepo --update "${TARGET}" \ + "--distro=cpe:/o:rocky:rocky:${TARGET_REV:0:1},Rocky Linux ${TARGET_REV:0:1}" \ + --workers 12 +} + function createrepo_comps() { local TARGET="${1}" local TARGET_REV="${2}" @@ -287,6 +295,7 @@ export -f rsync_delete_prod_dry export -f perform_hardlink export -f createrepo_only +export -f createrepo_update export -f createrepo_comps export -f modifyrepo_module export -f sign_data diff --git a/sync/sync-to-staging.sh b/sync/sync-to-staging.sh index 4b4e5d1..b7a48c4 100644 --- a/sync/sync-to-staging.sh +++ b/sync/sync-to-staging.sh @@ -57,7 +57,7 @@ if [ $ret_val -eq "0" ]; then test -d "${TARGET}/${src_repo}" ret_val=$? if [ $ret_val -eq "0" ]; then - createrepo_only "${TARGET}/${src_repo}" "${REVISION}" + createrepo_update "${TARGET}/${src_repo}" "${REVISION}" fix_metadata "${TARGET}/${src_repo}/repodata/repomd.xml" sign_data "${TARGET}/${src_repo}/repodata/repomd.xml" else @@ -75,7 +75,7 @@ if [ $ret_val -eq "0" ]; then test -d "${TARGET}/${debug_repo}" ret_val=$? if [ $ret_val -eq "0" ]; then - createrepo_only "${TARGET}/${debug_repo}" "${REVISION}" + createrepo_update "${TARGET}/${debug_repo}" "${REVISION}" fix_metadata "${TARGET}/${debug_repo}/repodata/repomd.xml" sign_data "${TARGET}/${debug_repo}/repodata/repomd.xml" else @@ -132,7 +132,7 @@ if [ $ret_val -eq "0" ]; then test -d "${TARGET}/${arch_repo}" ret_val=$? if [ $ret_val -eq "0" ]; then - createrepo_only "${TARGET}/${arch_repo}" "${REVISION}" + createrepo_update "${TARGET}/${arch_repo}" "${REVISION}" fix_metadata "${TARGET}/${arch_repo}/repodata/repomd.xml" sign_data "${TARGET}/${arch_repo}/repodata/repomd.xml" else