It is not possible to use version other than currently in template.
Specifying pattern breaks build if dependency isn't in binary repo
already. That it worked when in repo was a coincidence.
Let's detect exact version requirement with regex equivalent to
`xbps-uhelper getpkgname`.
bash-5.1$ for x in a-{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}{a,0,-,_}; do [[ $x = *[\>\<]* || $x =~ -[^-_]*[0-9][^-_]*_[0-9_]+$ ]]; bash=$?; xbps-uhelper getpkgname $x > /dev/null 2> /dev/null; xbps=$?; if [ $bash != $xbps ]; then echo $x; fi; done
bash-5.1$
Co-authored-by: Duncaen <duncaen@voidlinux.org>
previously this defaulted to 1. In some rare cases, nproc is not
desirable, but that can be easily overriden in the standard ways,
etc/conf or -jN.
For compatibility with other distros, it defaults to 1 when nproc
is not available.
previously, if there was a newline in some variables, it would not format
properly in `xbps-src show`. This fixes it by always splitting it by word
in some cases, like if there is a new line in the variable's value, and
removing internal commas in some cases.
This logic was split into a function for consistency.
fixes#40996
Example:
```
$ ./xbps-src show keepassxc
pkgname: keepassxc
...
License(s): GPL-3.0-or-later
License(s): BSD-3-Clause
License(s): CC0-1.0
License(s): LGPL-2.0-only
License(s): LGPL-2.1-only
License(s): LGPL-3.0-or-later
License(s): Nokia-Qt-exception-1.1
License(s): MIT
License(s): BSL-1.0
```
A regression introduced in 4c43245e0b is causing the 'xbps-src update-sys'
command to skip the final step of installing the updated packages.
This happens because the `cmd` variable name clashes with a loop
variable used in common/environment/setup/install.sh script (line 16).
Thus the `"$cmd" == installed` comparison
(common/xbps-src/shutils/bulk.sh line 122) fails and the installation
step is skipped.
Using unique variable names in `bulk.sh` avoids this problem.
Closes: #39969 [via git-merge-pr]
The `/-/` sequence is always between e.g. archive and the repo path,
so this should work reliably for distfiles.
If gitlab is used only as a homepage, this still wroks if homepage
points to the base repo (which it usually does)
Some packages couldn't work well with XBPS_MAKEJOBS,
thus we disable parallel build for those packages.
On the other hand, some packages including but not limited to openjdk
use an internal mechanism to build themselves in parallel.
Let's invent another variable for those packages.
(message by sgn)
Co-authored-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Setting this variable will make xbps-src use an alternative mirror for
remote repositories.
Using this variable one can change the remote repository for all
architectures in a single setting and without the need to modify
`etc/xbps.d/repos-remote*.conf`. This is much more convenient as it
allows changing remote repos without a dirty worktree.
To use just add a line like the following to `etc/conf`:
XBPS_MIRROR=https://repo-us.voidlinux.org/current
We also disable 00-repository-main.conf for cross so we don't use the
remote repo from the xbps package.
Message contained one of many packages to install,
incorrectly suggesting that this is problematic one.
Remove that. List of packages is printed on previous line.
Historically, PKGDESTDIR was only set during pkg_install, and
XBPS_PKGDESTDIR was set to indicate that we're in subpkg's
pkg_install.
However, from 0b95cb8f5d, (Merge xbps-src code to make it usable in
a standalone mode., 2014-03-22), PKGDESTDIR is always set,
regardless of states.
Let's drop all usages of XBPS_PKGDESTDIR.
While we're at it, error out of vmove is used outside of subpkg.
Some packages require tzdata to testing, however, adding `tzdata` to
those checkdepends will break masterdir, since `tzdata` provides
`/usr/share/zoneinfo/UTC`, hence, it will be removed upon cleanup.
Let's add `tzdata` into `base-chroot` and remove the shenanigan in
`chroot.sh`.
The dot (.) inside [] matches literal dot. I don't know how it's
working, however the update-check for some packages is broken (i.e.
anthy-unicode).
Let's remove the backslash.
We need `chmod -R` to be able to cleanup after Go packages, but it's
unnecessary in most other cases. By only running it when the first `rm
-rf` fails, we optimize for the most common case and get a tiny speedup
for this build step.
* List dependencies of subpackages as part of the source packages
dependencies, knowing the subpackage they are coming from does
not matter to a build scheduler as long as xbps-src requires
those to exist in the same way to main depends= have to exist.
* Resolve virtual? packages through existing means in xbps-src to
avoid duplicating and possibly diverting from xbps-src's
behaviour in tools that use dbulk-dump.
* Filter out dependencies on the template itself from sub packages,
this matches the xbps-src behaviour and there is no need to
have to duplicate logic for this into the scheduling tool.
* Error out on archs= restrictions as we do already on broken=
and nocross=, there shouldn't be the need to discover archs=
restrictions when attempting to build the package.
Allows a template to define in which circumstances its do_check phase
should run, without requiring custom do_check definitions in each
template (also makes it easier to change how build styles do things
without checking as many templates).
Add to Manual and CONTRIBUTING as well.