Skip to content
Snippets Groups Projects
Commit 6115ed7d authored by Marta Vila Fernandes's avatar Marta Vila Fernandes :game_die:
Browse files

Merge branch 'modifyrepo' into 'master'

Read the modifyrepo to add in repomd the updateinfo and module info

See merge request !226
parents ef6fb855 8c402922
No related branches found
No related tags found
1 merge request!226Read the modifyrepo to add in repomd the updateinfo and module info
Pipeline #4811699 passed
......@@ -162,19 +162,17 @@ EOF
# Keep the current xml.gz file and remove the older one
UPDXMLFILE=$(/bin/ls -1tr $REPOPATH/*-updateinfo.xml.gz 2>&1 | /usr/bin/tail -1)
if [ -f "$UPDXMLFILE" ]; then
/bin/cp -f $UPDXMLFILE $REPOPATH/updateinfo.xml.gz
/bin/gunzip -f $REPOPATH/updateinfo.xml.gz
/usr/bin/modifyrepo $REPOPATH/updateinfo.xml $REPOPATH/repodata
/usr/bin/find ${REPOPATH} -name '*updateinfo.xml*' -not -name $UPDXMLFILE -printf "removed '%f'\n" -delete
/usr/bin/modifyrepo $UPDXMLFILE $REPOPATH/repodata
NEWUPDXMLFILE=$(sed '/updateinfo.xml.gz/!d; s/.*repodata\/\(.*\)".*/\1/' ${REPOPATH}/repodata/repomd.xml)
/usr/bin/find ${REPOPATH} -name '*updateinfo.xml*' -not -name $NEWUPDXMLFILE -printf "removed '%f'\n" -delete
fi
# Keep the current yaml.gz file and remove the older one
MODULEFILE=$(/bin/ls -1tr ${REPOPATH}/*-module*yaml.gz 2>&1 | /usr/bin/tail -1)
if [ -f "$MODULEFILE" ]; then
/bin/cp -f $MODULEFILE $REPOPATH/modulefile.yaml.gz
/bin/gunzip -f $REPOPATH/modulefile.yaml.gz
/usr/bin/modifyrepo --mdtype=modules $REPOPATH/modulefile.yaml $REPOPATH/repodata
/usr/bin/find ${REPOPATH} -name '*module*.yaml*' -not -name $MODULEFILE -printf "removed '%f'\n" -delete
/usr/bin/modifyrepo --mdtype=modules $MODULEFILE $REPOPATH/repodata
NEWMODULEFILE=$(sed '/yaml.gz/!d; s/.*repodata\/\(.*\)".*/\1/' ${REPOPATH}/repodata/repomd.xml)
/usr/bin/find ${REPOPATH} -name '*module*.yaml*' -not -name $NEWMODULEFILE -printf "removed '%f'\n" -delete
fi
fi # end of if [[ $RUN_CREATEREPO -eq 1 ]]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment