When set -o ERR is set the exit case wasn't executed. From the bash
manual page:
"The ERR trap is not executed if the
failed command is part of the command list immediately following
a while or until keyword, part of the test in an if statement,
part of a command executed in a && or || list except the command
following the final && or ||, any command in a pipeline but the
last, or if the command's return value is being inverted using
!. These are the same conditions obeyed by the errexit (-e)
option."
This is necessary to be able to collect shlib-provides for 32bit pkgs,
which are autogenerated.
The strip-and-debug-pkgs hook now just does what its name mentions:
strip binaries and create -dbg pkgs.
XBPS_STATEDIR is created in XBPS_BUILDDIR/.xbps-${sourcepkg}-${version}
and contains logs and state files for all phases, as well as wrappers.
We can now inspect the output from all hooks.
That was the missing piece to generate proper dependencies in 32bit
packages with subpkgs that depended in other subpkgs.
For example kmod: libkmod and libkmod-devel. libkmod-devel was being processed
before libkmod, and due to missing shlib-provides a dependency to the 64bit
package was generated.
The strip-and-debug-pkgs/generate-runtime-deps hooks have been moved
to the pre-pkg stage, and are run before prepare-32bit; this way dependencies
are collected correctly in all cases.
... otherwise strip(1) errors out. Perl installs shlibs without write
bit set and results in EPERM errors.
Perl could be fixed instead, but meanwhile this works.
The prepare-32bit hook has been moved to the pre-pkg stage and now
those hooks are executed as part of the install phase. That means that
pre-pkg hooks are now independently run for the subpkgs and the sourcepkg
after the install-destdir phase and pre/do/install hooks.
As bonus, finally correct rdeps can now be collected for the 32bit pkgs
and works for all them, without the need to sort the order of subpkgs!
The syntax "pkg?vpkg" can be used in hostmakedepends, makedepends and depends;
but the "virtual" keyword can be declared specifically for runtime dependencies
(depends).
If a required dependency is a subpackage and it does not contain shlib-provides,
do not convert to 32bit.
This fixes the issue of gtk+-32bit requiring gtk-update-icon-cache-32bit,
which was simply wrong because the latter does not provide any shlib.