use createrepo update instead

This commit is contained in:
Louis Abel 2023-05-18 14:15:19 -07:00
parent 280dec6f65
commit 7d15d57ca1
Signed by untrusted user: label
GPG Key ID: B37E62D143879B36
2 changed files with 12 additions and 3 deletions

View File

@ -226,6 +226,14 @@ function createrepo_only() {
--workers 12 --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() { function createrepo_comps() {
local TARGET="${1}" local TARGET="${1}"
local TARGET_REV="${2}" local TARGET_REV="${2}"
@ -287,6 +295,7 @@ export -f rsync_delete_prod_dry
export -f perform_hardlink export -f perform_hardlink
export -f createrepo_only export -f createrepo_only
export -f createrepo_update
export -f createrepo_comps export -f createrepo_comps
export -f modifyrepo_module export -f modifyrepo_module
export -f sign_data export -f sign_data

View File

@ -57,7 +57,7 @@ if [ $ret_val -eq "0" ]; then
test -d "${TARGET}/${src_repo}" test -d "${TARGET}/${src_repo}"
ret_val=$? ret_val=$?
if [ $ret_val -eq "0" ]; then 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" fix_metadata "${TARGET}/${src_repo}/repodata/repomd.xml"
sign_data "${TARGET}/${src_repo}/repodata/repomd.xml" sign_data "${TARGET}/${src_repo}/repodata/repomd.xml"
else else
@ -75,7 +75,7 @@ if [ $ret_val -eq "0" ]; then
test -d "${TARGET}/${debug_repo}" test -d "${TARGET}/${debug_repo}"
ret_val=$? ret_val=$?
if [ $ret_val -eq "0" ]; then 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" fix_metadata "${TARGET}/${debug_repo}/repodata/repomd.xml"
sign_data "${TARGET}/${debug_repo}/repodata/repomd.xml" sign_data "${TARGET}/${debug_repo}/repodata/repomd.xml"
else else
@ -132,7 +132,7 @@ if [ $ret_val -eq "0" ]; then
test -d "${TARGET}/${arch_repo}" test -d "${TARGET}/${arch_repo}"
ret_val=$? ret_val=$?
if [ $ret_val -eq "0" ]; then 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" fix_metadata "${TARGET}/${arch_repo}/repodata/repomd.xml"
sign_data "${TARGET}/${arch_repo}/repodata/repomd.xml" sign_data "${TARGET}/${arch_repo}/repodata/repomd.xml"
else else