Non-explicit installing gets confused with subpackages (weird corner case)
Created by: ollieparanoid
@MartijnBraam discovered a corner case in the new non-explicit installation code in #1272 (closed), while upgrading gcc-armhf
:
ERROR: unsatisfiable constraints:
libstdc++-6.4.0-r7:
breaks: g++-aarch64-6.4.0-r6[libstdc++=6.4.0-r6]
satisfies: gcc-6.4.0-r7[so:libstdc++.so.6]
gcc-6.4.0-r7:
breaks: g++-aarch64-6.4.0-r6[gcc=6.4.0-r6]
.pmbootstrap-0:
masked in: cache
satisfies: world[.pmbootstrap]
Steps to reproduce
This reproduces the error reliably, even if gcc doesn't need to be updated to match Alpine's version:
$ pmbootstrap pkgrel_bump gcc-armhf gcc-aarch64
$ pmbootstrap build gcc-armhf --arch=aarch64
[21:12:21] Update package index (16x)
[21:12:26] (native) install alpine-base
[21:12:27] (native) install qemu-user-static-repack qemu-user-static-repack-binfmt
[21:12:30] Register qemu binfmt (aarch64)
[21:12:30] (buildroot_aarch64) install alpine-base
[21:12:31] (buildroot_aarch64) install abuild build-base ccache
[21:12:37] (buildroot_aarch64) install libressl-dev
[21:12:38] (native) install abuild build-base ccache
[21:12:41] (native) install binutils-aarch64 bison flex gawk gmp-dev isl-dev linux-headers mpc1-dev mpfr-dev musl-dev-aarch64 paxmark texinfo zip zlib-dev
[21:12:42] (native) build x86_64/gcc-aarch64-6.4.0-r8.apk
[21:16:20] (native) install gcc-aarch64 g++-aarch64 ccache-cross-symlinks
[21:16:22] NOTE: The failed command's output is above the ^^^ line in the logfile: /home/user/.local/var/pmbootstrap/log.txt
[21:16:22] ERROR: Command failed: (native) % apk --no-progress add gcc-aarch64 g++-aarch64 ccache-cross-symlinks
[21:16:22] Run 'pmbootstrap log' for details.
[21:16:22] See also: <https://postmarketos.org/troubleshooting>
pmbootstrap log
:
(029881) [21:16:20] (native) install gcc-aarch64 g++-aarch64 ccache-cross-symlinks
(029881) [21:16:20] (native) % apk --no-progress add -u --virtual .pmbootstrap /mnt/pmbootstrap-packages/x86_64/gcc-aarch64-6.4.0-r8.apk /mnt/pmbootstrap-packages/x86_64/ccache-cross-symlinks-1-r4.apk isl /mnt/pmbootstrap-packages/x86_64/binutils-aarch64-2.28-r3.apk ccache gmp
(1/3) Installing gcc-aarch64 (6.4.0-r8)
(2/3) Installing ccache-cross-symlinks (1-r4)
(3/3) Installing .pmbootstrap (0)
Executing busybox-1.27.2-r8.trigger
OK: 404 MiB in 81 packages
(029881) [21:16:21] (native) % apk --no-progress add gcc-aarch64 g++-aarch64 ccache-cross-symlinks
ERROR: unsatisfiable constraints:
libstdc++-6.4.0-r7:
breaks:
g++-aarch64-6.4.0-r8[libstdc++=6.4.0-r8]
satisfies: g++-6.4.0-r7[libstdc++=6.4.0-r7]
g++-6.4.0-r7[libstdc++=6.4.0-r7]
gcc-6.4.0-r7[so:libstdc++.so.6]
libgmpxx-6.1.2-r1[so:libstdc++.so.6]
lzip-1.20-r0[so:libstdc++.so.6]
gcc-6.4.0-r7:
breaks: g++-aarch64-6.4.0-r8[gcc=6.4.0-r8]
satisfies: world[gcc]
g++-6.4.0-r7[gcc=6.4.0-r7]
build-base-0.5-r1[gcc]
(029881) [21:16:22] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^