make it so the rhel8 repos have a valid repository

This commit is contained in:
Stephen Smoogen 2019-06-04 22:36:55 +00:00
parent 84744c77c2
commit 94c3ce1c99

View file

@ -35,17 +35,17 @@ for ARCH in ${ARCHES}; do
fi fi
# Begin splitting the various packages into their subtrees # Begin splitting the various packages into their subtrees
${BINDIR}/splitter.py --action hardlink --target RHEL-8-001 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-baseos-rpms/ --only-defaults &> /dev/null ${BINDIR}/splitter.py --action hardlink --target RHEL-8-001 ${ARCHDIR}/rhel-8-for-${ARCH}-baseos-rpms/ --only-defaults &> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "splitter ${ARCH} baseos failed" echo "splitter ${ARCH} baseos failed"
exit exit
fi fi
${BINDIR}/splitter.py --action hardlink --target RHEL-8-002 --create-repos ${ARCHDIR}/rhel-8-for-${ARCH}-appstream-rpms/ --only-defaults &> /dev/null ${BINDIR}/splitter.py --action hardlink --target RHEL-8-002 ${ARCHDIR}/rhel-8-for-${ARCH}-appstream-rpms/ --only-defaults &> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "splitter ${ARCH} appstream failed" echo "splitter ${ARCH} appstream failed"
exit exit
fi fi
${BINDIR}/splitter.py --action hardlink --target RHEL-8-003 --create-repos ${ARCHDIR}/codeready-builder-for-rhel-8-${ARCH}-rpms/ &> /dev/null ${BINDIR}/splitter.py --action hardlink --target RHEL-8-003 ${ARCHDIR}/codeready-builder-for-rhel-8-${ARCH}-rpms/ &> /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "splitter ${ARCH} codeready failed" echo "splitter ${ARCH} codeready failed"
exit exit
@ -58,22 +58,20 @@ for ARCH in ${ARCHES}; do
cp -anlr RHEL-8-003/* RHEL-8-001 cp -anlr RHEL-8-003/* RHEL-8-001
# Go into the main tree # Go into the main tree
pushd RHEL-8-001 pushd RHEL-8-001
# Go into its non_modular subtree and update its repo as its data
# is based off of the first split
pushd non_modular
createrepo -v .
popd
# Build out the repos we have and merge them together with # # Build out the repos we have and merge them together with
# mergerepo -k # # mergerepo -k
echo "Merging all the repos" # echo "Merging all the repos"
repos="" # repos=""
for i in $( ls -1 ); do # for i in $( ls -1 ); do
repos+="-r $i " # repos+="-r $i "
done # done
mergerepo_c -k ${repos} # mergerepo_c -k ${repos}
mv merged_repo/repodata/ . # mv merged_repo/repodata/ .
rmdir merged_repo/ # rmdir merged_repo/
# Mergerepo didn't work so lets just createrepo in the top directory.
createrepo_c .
popd popd
# Cleanup the trash # Cleanup the trash