aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/bootstrap.sh
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-02-08 13:56:53 +0200
committerTimo Teräs <timo.teras@iki.fi>2020-02-08 14:00:02 +0200
commit78f149fce85f565ffd6c350aa63f563cde9e089e (patch)
treedf9e4e98e19273f65e68f4872e9533068879fcc3 /scripts/bootstrap.sh
parent88b19d170e07b328ce7518e5b0972b823653047c (diff)
downloadaports-78f149fce85f565ffd6c350aa63f563cde9e089e.tar.bz2
aports-78f149fce85f565ffd6c350aa63f563cde9e089e.tar.xz
scripts/bootstrap.sh: clean up cross-build extra dependency handling
Instead of apk adding dependencies to sysroot, use the EXTRADEPENDS_TARGET to pass in these dependencies. This does not leave the sysroot in dirty state, but instead cleans it up.
Diffstat (limited to 'scripts/bootstrap.sh')
-rwxr-xr-xscripts/bootstrap.sh20
1 files changed, 9 insertions, 11 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh
index e18c88b587..1b596686ed 100755
--- a/scripts/bootstrap.sh
+++ b/scripts/bootstrap.sh
@@ -91,9 +91,8 @@ CTARGET=$TARGET_ARCH BOOTSTRAP=nobase APKBUILD=$(apkbuildname build-base) abuild
msg "Cross building base system"
-# add implicit target prerequisite packages
-apk info --quiet --installed --root "$CBUILDROOT" libgcc libstdc++ musl-dev || \
- ${SUDO_APK} --root "$CBUILDROOT" add --repository "$REPODEST/main" libgcc libstdc++ musl-dev
+# Implicit dependencies for early targets
+EXTRADEPENDS_TARGET="libgcc libstdc++ musl-dev"
# ordered cross-build
for PKG in fortify-headers linux-headers musl libc-dev pkgconf zlib \
@@ -108,18 +107,17 @@ for PKG in fortify-headers linux-headers musl libc-dev pkgconf zlib \
community/go libffi community/ghc \
$KERNEL_PKG ; do
+ EXTRADEPENDS_TARGET="$EXTRADEPENDS_TARGET" \
CHOST=$TARGET_ARCH BOOTSTRAP=bootimage APKBUILD=$(apkbuildname $PKG) abuild -r
case "$PKG" in
- fortify-headers | libc-dev | build-base)
- # headers packages which are implicit but mandatory dependency
- apk info --quiet --installed --root "$CBUILDROOT" $PKG || \
- ${SUDO_APK} --update --root "$CBUILDROOT" --repository "$REPODEST/main" add $PKG
+ fortify-headers | libc-dev)
+ # Additional implicit dependencies once built
+ EXTRADEPENDS_TARGET="$EXTRADEPENDS_TARGET $PKG"
;;
- musl | gcc)
- # target libraries rebuilt, force upgrade
- [ "$(apk upgrade --root "$CBUILDROOT" --repository "$REPODEST/main" --available --simulate | wc -l)" -gt 1 ] &&
- ${SUDO_APK} upgrade --root "$CBUILDROOT" --repository "$REPODEST/main" --available
+ build-base)
+ # After build-base, that alone is sufficient dependency in the target
+ EXTRADEPENDS_TARGET="$PKG"
;;
esac
done