First attempt to fix rhel8 splitter for multi-tree dirs.
This commit is contained in:
parent
37066f172f
commit
7c77f430dd
1 changed files with 32 additions and 3 deletions
|
@ -20,6 +20,14 @@ else
|
||||||
mkdir -p ${DATEDIR}
|
mkdir -p ${DATEDIR}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
##
|
||||||
|
## Remove the old latest
|
||||||
|
rm -rf ${HOMEDIR}/koji/latest_old/
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "removal of old latest failed"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
##
|
##
|
||||||
## Go through each architecture and
|
## Go through each architecture and
|
||||||
##
|
##
|
||||||
|
@ -90,13 +98,26 @@ else
|
||||||
echo "No staged link found"
|
echo "No staged link found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
####
|
||||||
|
#### The following is overly complicated and makes thinking and
|
||||||
|
#### debugging hard. This needs to be fixed.
|
||||||
|
|
||||||
|
## The goal here is to take the staged code, and make a new repo with
|
||||||
|
## just the latest amount of rpms in it. We also want to try and cut
|
||||||
|
## the race condition down where koji sees one 'RHEL-8-001' with X.Y.Z
|
||||||
|
## rpms and then sees it with A.B.C or some mix.
|
||||||
|
|
||||||
|
# FIXME: Do we really need to make this linked staged?
|
||||||
echo "Linking ${DATE} to staged"
|
echo "Linking ${DATE} to staged"
|
||||||
ln -s ${DATE} staged
|
ln -s ${DATE} staged
|
||||||
|
|
||||||
|
NEW_LATEST=latest-${DATE}
|
||||||
|
mkdir -p ${NEW_LATEST}
|
||||||
|
# Go through each architecture
|
||||||
for ARCH in ${ARCHES}; do
|
for ARCH in ${ARCHES}; do
|
||||||
pushd latest/
|
# The following is overly complicated and needs to be cleaner.
|
||||||
mkdir -p ${ARCH}
|
pushd ${NEW_LATEST}
|
||||||
|
mkdir -p ${NEW_LATEST}/${ARCH}
|
||||||
dnf --disablerepo=\* --enablerepo=RHEL-8-001 --repofrompath=RHEL-8-001,https://infrastructure.fedoraproject.org/repo/rhel/rhel8/koji/staged/${ARCH}/RHEL-8-001/ reposync -a ${ARCH} -a noarch -p ${ARCH} --newest --delete &> /dev/null
|
dnf --disablerepo=\* --enablerepo=RHEL-8-001 --repofrompath=RHEL-8-001,https://infrastructure.fedoraproject.org/repo/rhel/rhel8/koji/staged/${ARCH}/RHEL-8-001/ reposync -a ${ARCH} -a noarch -p ${ARCH} --newest --delete &> /dev/null
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
cd ${ARCH}/RHEL-8-001
|
cd ${ARCH}/RHEL-8-001
|
||||||
|
@ -106,3 +127,11 @@ for ARCH in ${ARCHES}; do
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## RACE CONDITION TIME!!!!
|
||||||
|
mv latest latest_old
|
||||||
|
mv ${NEW_LATEST} latest
|
||||||
|
|
||||||
|
## Wish there was a clean way to tell koji to figure out the new repos
|
||||||
|
## from batcave.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue