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

add modifyrepo for modules and updateinfo

parent 3e14de0d
No related branches found
No related tags found
1 merge request!225add modifyrepo for modules and updateinfo
Pipeline #4803058 passed
......@@ -160,15 +160,22 @@ EOF
/bin/rm -f $REPOPATH/comps.xml
# Keep the current xml.gz file and remove the older one
UPDXMLFILE=$(sed '/updateinfo.xml.gz/!d; s/.*repodata\/\(.*\)".*/\1/' ${REPOPATH}/repodata/repomd.xml)
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
fi
# Keep the current yaml.gz file and remove the older one
MODULEFILE=$(sed '/yaml.gz/!d; s/.*repodata\/\(.*\)".*/\1/' ${REPOPATH}/repodata/repomd.xml)
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
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