Improve stage3 download process.
This commit is contained in:
parent
6278a6d533
commit
5526d4900a
@ -7,33 +7,30 @@ die() {
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
BUILDDIR=/var/lib/catalyst/store/builds/default
|
BUILD_DIR=/var/lib/catalyst/store/builds/default
|
||||||
|
RELEASE_BASE_URI=https://gentoo.osuosl.org/releases
|
||||||
|
|
||||||
if [ ! -r ${BUILDDIR}/stage3-amd64-latest.tar.xz ] \
|
if [ ! -r ${BUILD_DIR}/stage3-amd64-latest.tar.xz ] \
|
||||||
&& [ ! -r ${BUILDDIR}/stage3-amd64-latest.tar.bz2 ]
|
&& [ ! -r ${BUILD_DIR}/stage3-amd64-latest.tar.bz2 ]
|
||||||
then
|
then
|
||||||
# Get latest stage3 tag
|
# Get latest stage3 tag
|
||||||
STAGE3_TAG=$(wget -q -O - \
|
STAGE3_TAG=$(wget -q -O - \
|
||||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3-amd64.txt \
|
${RELEASE_BASE_URI}/amd64/autobuilds/latest-stage3-amd64.txt \
|
||||||
| grep -v "^#" | cut -d ' ' -f 1)
|
| grep -v "^#" | cut -d ' ' -f 1)
|
||||||
|
|
||||||
# Download latest stable stage3 build
|
# Download latest stable stage3 build
|
||||||
wget -q -N -P /var/lib/catalyst/store/builds/ \
|
for SUFFIX in "" ".CONTENTS" ".DIGESTS"; do
|
||||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG} \
|
wget -q -N -P ${BUILD_DIR} \
|
||||||
-O ${BUILDDIR}/stage3-amd64-latest.tar.xz
|
${RELEASE_BASE_URI}/amd64/autobuilds/${STAGE3_TAG}${SUFFIX}
|
||||||
|
|
||||||
wget -q -N -P /var/lib/catalyst/store/builds/ \
|
ln -sf "${BUILDDIR}/$(basename ${STAGE3_TAG})${SUFFIX}" \
|
||||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}.CONTENTS \
|
"${BUILDDIR}/stage3-amd64-latest.tar.xz${SUFFIX}"
|
||||||
-O ${BUILDDIR}/stage3-amd64-latest.tar.xz.CONTENTS
|
done
|
||||||
|
|
||||||
wget -q -N -P /var/lib/catalyst/store/builds/ \
|
|
||||||
http://distfiles.gentoo.org/releases/amd64/autobuilds/${STAGE3_TAG}.DIGESTS \
|
|
||||||
-O ${BUILDDIR}/stage3-amd64-latest.tar.xz.DIGESTS
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download latest portage snapshot
|
# Download latest portage snapshot
|
||||||
wget -q -N -P /var/lib/catalyst/store/snapshots/ \
|
wget -q -N -P /var/lib/catalyst/store/snapshots/ \
|
||||||
https://gentoo.osuosl.org/releases/snapshots/current/portage-latest.tar.bz2
|
${RELEASE_BASE_URI}/snapshots/current/portage-latest.tar.bz2
|
||||||
|
|
||||||
# Build stage1 snapshot
|
# Build stage1 snapshot
|
||||||
catalyst -c /catalyst.conf -f /stage1.spec -p $*
|
catalyst -c /catalyst.conf -f /stage1.spec -p $*
|
||||||
|
Loading…
Reference in New Issue
Block a user