diff options
author | Sertonix <sertonix@posteo.net> | 2024-04-10 12:12:20 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2024-04-12 11:59:04 +0000 |
commit | 855992822dba01360cd5c6406cd90ac690303d4c (patch) | |
tree | 6150c8fa092baa6c4138f7ccd9dd3bcb0e19c7da | |
parent | 7276042237aaa094788d15117ff8e77efe46d8f6 (diff) |
abuild: update cachedir logic for rootbld
Closes [#10111]
[#10111]: https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10111
-rw-r--r-- | abuild.in | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -2511,19 +2511,15 @@ rootbld() { [ $CBUILD = $CHOST ] || die "rootbld: set CBUILD=$CHOST to build for $CHOST" + local cachedir=/etc/apk/cache if ! [ $CBUILD_ARCH = "$($APK --print-arch)" ]; then # cross-building, so check for binfmt registration local qarch="$(rootbld_qemu_arch)" if ! [ -f "/proc/sys/fs/binfmt_misc/qemu-$qarch" ]; then warning "rootbld: binfmt registration missing for $qarch binaries" fi - # TODO: it's not safe to mix a cache dir between architectures, - # so we have to use something other than /etc/apk/cache - # to get a cache when cross-qemu-building. - #local cachedir="" - else - # not cross-building in qemu, so use host cache - local cachedir="/etc/apk/cache" + # Old versions of apk have cache conflicts + $APK info -eq 'cmd:apk>=2.14.1' || cachedir="" fi logcmd "chroot building building $repo/$pkgname-$pkgver-r$pkgrel" |