To avoid scanning templates multiple times, because
symbolic links were included, use find to scan only
directories below srcpkgs and collect their
srcpkgs/<dir>/template files.
af6e1a7e79 introduces dependencies based in subpkgs,
but this makes "xbps-src show-build-deps" return cyclic
dependencies in some cases, i.e:
$ ./xbps-src show-build-deps kirigami2
cmake
extra-cmake-modules
kcoreaddons
kirigami2
qt5
$
This is because `kirigami2-devel` depends on `kirigami2`, thus
introducing a cycle.
Skip cycles completely, note that "show-build-deps" should not
be used to collect deps for cross compilation, because you can't
know what type of dependency it is: host or target.
The new behavior is basically this:
1) Local repos are installed same as before.
2) Multilib configs are now handled only if they exist. They follow
a naming system repos-{local,remote}-ARCH-multilib.conf.
3) Remote repo files follow naming repos-remote-ARCH.conf. If that
does not exist, repos-remote.conf or repos-remote-musl.conf is
used instead (fallback).
4) Cross follows the same behavior, just without multilib.
[ci skip]
That means instead of having a single hostdir/repocache, there
is now hostdir/repocache-$XBPS_TARGET_MACHINE.
This solves multiple problems:
1) When cross-compiling for different architectures and the repos
for host and target differ, you will not get signature/checksum
conflicts for noarch packages.
2) The clean-repocache command will not delete noarch packages that
don't belong to that architecture.
3) Clean mixing of glibc and musl masterdirs with the same hostdir
is now possible; even when building natively, the musl masterdir
will use its repocache-foo-musl, while the glibc masterdir will
use repocache-foo.
[ci skip]
The problem here is that newly introduced behavior in commit
b2b0409be4 resulted in builddir and
destdir *always* being removed when starting a build, as a part of
masterdir auto-update. We don't want this as we may want to resume
a previous build (e.g. by running stages individually or by resuming
a failed build from where it stopped).
Therefore, explicitly override the removal to restore previous behavior.
If `etc/xbps.d/custom` exists (directory) and contains
xbps.d(5) .conf files, those will be copied verbatim
to `masterdir/etc/xbps.d`.
This allows you to set your custom xbps.d(5) settings
without having to modify any other file.
This is also useful for testing xbps.d(5) noextract feature.
There may be /etc/xbps.d/*remote* config files dangling from a previous
run w/o XBPS_SKIP_REMOTEREPOS being set. Make sure to remove them
in case $XBPS_SKIP_REMOTEREPOS is set for this run.
This patchset contains multiple changes to xbps-src and
its required package "base-chroot" for building packages
via chroot.
- moved xbps.d(5) conf files to `etc/xbps.d`.
- renamed xbps.d(5) repository files to `etc/xbps.d/repos-{local,remote}*`.
- do not set `--repository` to any xbps command that supports it,
xbps-src now simply populates `rootdir/etc/xbps.d` with correct
settings (taking care of CHROOT_READY/IN_CHROOT).
- Unless `-C` is set (to preserve builddir/destdir/autodeps), when
entering to the chroot (if CHROOT_READY is set), xbps-src will
clean up the masterdir and then perform a system update to always
use a constant set of packages for that exact date.
- Improved some normal/error msgs.
- Includes support for `xbps>=0.58`.
- common/hooks: switch to bsdtar.
- base-chroot:
- base-chroot-musl is gone, now unified for glibc/musl.
- deps removed: gettext, mpfr, readline, texinfo, which, xz.
- deps changed: tar -> bsdtar.
Effectively this reduces dependencies in `base-chroot`, makes
it unified for musl and glibc, switches xbps-src to use `bsdtar`
rather than GNU `tar` and `xz`, gets rid of useless host dependencies
like GNU gettext, texinfo, etc.
I've been testing these changes for 1 month or so already,
I was able to build from scratch `base-system` for both native
and multiple targets, i.e `./xbps-src -a target -Nt pkg base-system`
Previously, xbps-src would try to find checksums in template files
and not purge those found but it actually ignored everything that
had the checksums specified on multiple lines.
The reason for this is that the bash 'read' builtin reads until it
finds a newline, and if you specify multiple checksums on multiple
lines rather than on one line it would ignore all but the first.
Fix this by replacing newlines with spaces, so that it can properly
read all checksums into an array.
As reported by @pullmoll via https://github.com/void-linux/xbps/issues/190
the culprit is this assignment, rather than in the xbps code.
Tested with local and remote repos, no regressions found.
This should restore sort-dependencies behavior back to its former
behavior of not including all of the build dependencies not in
the input list in its listing.
$rval was the return code of pkg_available and not of build.sh, since
pkg_available returns 0. because of this install_cross_pkg() would
always return 0 for success.