pmb.build.package: fix strict mode

In strict mode, pmbootstrap uninstalls packages between builds. This was broken since we switched from installing dependencies via abuild to pmbootstrap since our code doesn't use "--virtual .makedepends-…" when installing the makedepends:

(088776) [15:32:34] (native) % cd /home/pmos/build; busybox su pmos -c SUDO_APK='abuild-apk --no-progress' HOME=/home/pmos abuild undeps ;
ERROR: No such package: .makedepends-systemd-stage0

Instead of restoring the logic and worrying about uninstalling deps in the right chroots, just zap all chroots in strict mode.

I've also considered implementing "--virtual .makedepends-…" again, but running zap on the chroots makes the logic much simpler, is easier to maintain and makes so little speed difference that it is worth the trade-off. We don't need to pass additional parameters fore the 2nd chroot to zap in cross-native2, no need to figure out the virtual package name in two places, etc.

Related: pmaports#3604 (closed)

Merge request reports

Loading
Loading