diff options
author | Timo Teräs <timo.teras@iki.fi> | 2020-02-08 13:56:53 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-02-08 14:00:02 +0200 |
commit | 78f149fce85f565ffd6c350aa63f563cde9e089e (patch) | |
tree | df9e4e98e19273f65e68f4872e9533068879fcc3 /scripts | |
parent | 88b19d170e07b328ce7518e5b0972b823653047c (diff) | |
download | alpine_aports-78f149fce85f565ffd6c350aa63f563cde9e089e.tar.bz2 alpine_aports-78f149fce85f565ffd6c350aa63f563cde9e089e.tar.xz alpine_aports-78f149fce85f565ffd6c350aa63f563cde9e089e.zip |
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')
-rwxr-xr-x | scripts/bootstrap.sh | 20 |
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 | |||
91 | 91 | ||
92 | msg "Cross building base system" | 92 | msg "Cross building base system" |
93 | 93 | ||
94 | # add implicit target prerequisite packages | 94 | # Implicit dependencies for early targets |
95 | apk info --quiet --installed --root "$CBUILDROOT" libgcc libstdc++ musl-dev || \ | 95 | EXTRADEPENDS_TARGET="libgcc libstdc++ musl-dev" |
96 | ${SUDO_APK} --root "$CBUILDROOT" add --repository "$REPODEST/main" libgcc libstdc++ musl-dev | ||
97 | 96 | ||
98 | # ordered cross-build | 97 | # ordered cross-build |
99 | for PKG in fortify-headers linux-headers musl libc-dev pkgconf zlib \ | 98 | 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 \ | |||
108 | community/go libffi community/ghc \ | 107 | community/go libffi community/ghc \ |
109 | $KERNEL_PKG ; do | 108 | $KERNEL_PKG ; do |
110 | 109 | ||
110 | EXTRADEPENDS_TARGET="$EXTRADEPENDS_TARGET" \ | ||
111 | CHOST=$TARGET_ARCH BOOTSTRAP=bootimage APKBUILD=$(apkbuildname $PKG) abuild -r | 111 | CHOST=$TARGET_ARCH BOOTSTRAP=bootimage APKBUILD=$(apkbuildname $PKG) abuild -r |
112 | 112 | ||
113 | case "$PKG" in | 113 | case "$PKG" in |
114 | fortify-headers | libc-dev | build-base) | 114 | fortify-headers | libc-dev) |
115 | # headers packages which are implicit but mandatory dependency | 115 | # Additional implicit dependencies once built |
116 | apk info --quiet --installed --root "$CBUILDROOT" $PKG || \ | 116 | EXTRADEPENDS_TARGET="$EXTRADEPENDS_TARGET $PKG" |
117 | ${SUDO_APK} --update --root "$CBUILDROOT" --repository "$REPODEST/main" add $PKG | ||
118 | ;; | 117 | ;; |
119 | musl | gcc) | 118 | build-base) |
120 | # target libraries rebuilt, force upgrade | 119 | # After build-base, that alone is sufficient dependency in the target |
121 | [ "$(apk upgrade --root "$CBUILDROOT" --repository "$REPODEST/main" --available --simulate | wc -l)" -gt 1 ] && | 120 | EXTRADEPENDS_TARGET="$PKG" |
122 | ${SUDO_APK} upgrade --root "$CBUILDROOT" --repository "$REPODEST/main" --available | ||
123 | ;; | 121 | ;; |
124 | esac | 122 | esac |
125 | done | 123 | done |