Commit Graph

39 Commits

Author SHA1 Message Date
classabbyamp 7c8f15bf1b common/xbps-src/shutils/show.sh: make show display consistent
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
```
2022-12-18 19:27:01 -05:00
Érico Rolim 21f5e306a5 xbps-src/shutils/show: remove outdated long_desc printing. 2021-03-02 19:58:28 -03:00
John 5884118e3a shutils/show.sh: never show self deps for depends
xbps-src always ignore self deps in depends and in hostmakedepends
when not cross compiling. The old behaviour did only check for cross.
This now also ignores them in makedepends, but they are either way
disallowed in there, and returning an error would be correct, but
./xbps-src show-* is and never was suitable for linting, so ignore for now.
2021-01-06 21:19:46 +01:00
Piotr Wójcik dabbbffabf xbps-src: -p argument for showing more variables 2020-07-13 19:52:53 +02:00
Piotr Wójcik 04e9ee8010 xbps-src: changelog in 'show' target 2020-04-28 23:27:00 +02:00
Juan RP ad3d1f862d
xbps-src: show_pkg_build_depends: handle cross case. 2020-04-15 13:29:44 +02:00
Juan RP a73783d17d
xbps-src: fix show_pkg_build_depends after af6e1a7e79.
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.
2020-04-15 13:12:26 +02:00
Piotr Wójcik af6e1a7e79 xbps-src: build depends of subpackages
resolves #20508
2020-04-15 11:17:54 +02:00
Juan RP e4984d01ea xbps-src: multiple performance improvements
- use xbps-checkvers(1) to resolve dependencies.
- all dependencies are installed at once for the host and target.
- the show-build-deps target is now much faster.
- the update-bulk/show-repo-updates targets are now much faster.
- the update-sys/show-sys-updates targets are now much faster.
- the bootstrap target now works on musl hosts.
- simplified some loops.
- use cut(1) rather than awk(1) where applicable.
- multiple random changes to improve performance.

Based on work started by @Duncaen on #12433

Close #12433
Close #11282
2019-07-10 20:28:46 +02:00
Jürgen Buchmüller 17ba00b095 Revert "xbps-src: multiple performance improvements."
This reverts commit 2a4e178e35.
2019-07-05 12:08:45 +02:00
Juan RP 2a4e178e35 xbps-src: multiple performance improvements.
- use xbps-checkvers(1) to resolve dependencies.
- all dependencies are installed at once for the host and target.
- the `show-build-deps` target is now much faster.
- the `update-bulk/show-repo-updates` targets are now much faster.
- the `update-sys/show-sys-updates` targets are now much faster.
- the `bootstrap` target now works on musl hosts.
- simplified some loops.
- use cut(1) rather than awk(1) where applicable.
- multiple random changes to improve performance.

Based on work started by @Duncaen on https://github.com/void-linux/void-packages/pull/12433

Close https://github.com/void-linux/void-packages/pull/12433
Close https://github.com/void-linux/void-packages/pull/11282
2019-07-05 08:53:51 +02:00
Juan RP 7b7d7c13a1
xbps-src: exit properly if mktemp(1) fails, not from its subshell.
Thanks @huglovefan
2019-06-17 17:38:07 +02:00
Juan RP 1ee6a3174f xbps-src: reduce basename(1) usage.
This saves a few exec()s.
2019-04-14 01:47:16 -03:00
Enno Boland 6eb37e35b2 common: merge only_for_archs and noarch=yes into one.
* noarch=yes is replaced with archs=noarch
* only_for_archs= is renamed to archs=
* archs= allows the use of wildcards and negations; first matching rule applies:
  * archs="*-musl" will build the pkg only for musl-libcs
  * archs="~*-musl" will build the pkg only on non-musl-libc
  * archs="x86_64-musl ~*-musl" will build for x86_64-musl and any non-musl
    arch.
* archs= defaults to "*"
2019-02-15 13:19:44 +01:00
Cameron Nemo 2b569f1ef8 xbps-src: add show host/makedepends subcommand 2019-01-26 21:41:10 -02:00
maxice8 a4f786276a
shutils/show.sh: add support for showing build_helper 2019-01-25 20:44:41 -02:00
Duncaen 94ed33657b Revert "common/: add support for changelog field."
This reverts commit 8599efd9fd.
2018-05-04 16:46:46 +02:00
maxice8 8599efd9fd common/: add support for changelog field.
This commits allows ./xbps-src show to show the changelog field and for
changelog to be included with the -c/--changelog option via xbps-create.

Closes: #14102 [via git-merge-pr]
2018-05-03 22:58:27 -04:00
Michael Gehring e40b057c09 common/xbps-src/shutils/show.sh: don't expand conf_files patterns
Fixes #9628
2017-11-30 10:46:41 +00:00
Juan RP 326c989c7c xbps-src/show: resolve virtual dependencies correctly. 2016-04-27 20:56:55 +02:00
Michael Gehring a038eaba9a common/xbps-src: make show <pkg> exit 0 on success 2016-03-08 10:24:54 +01:00
Juan RP c2c225aa42 xbps-src: make 'show-build-deps' canonicalize 32bit pkgs. 2015-11-19 08:32:47 +01:00
Juan RP 90771d92f5 xbps-src: only print real source pkgs in show-build-deps. 2015-04-26 08:32:46 +02:00
Juan RP d07d3a72c9 xbps-src: new target: show-avail and returns 0 if pkg can be built. 2015-04-16 08:38:32 +02:00
Juan RP 66f6780b31 xbps-src: show-build-deps: only return pkgnames.
We do not care about its version really.
2015-04-07 12:33:42 +02:00
Juan RP b43411d4d2 xbps-src: show-build-deps: sort -u the results. 2015-03-26 04:18:42 +01:00
Juan RP 95ca05e6e6 xbps-src: check_pkg_arch now exits with errcode 2. 2015-03-19 10:26:19 +01:00
Juan RP cda175e0d6 xbps-src: make show-build-deps return err when arch is not supported. 2015-02-28 02:38:00 +01:00
Juan RP 429df59e2a xbps-src: show-build-deps: fix an issue with subpkgs. 2015-02-28 01:52:23 +01:00
Juan RP 4130cd3e8f xbps-src: show-build-deps: ignore virtual rdeps completely. 2015-02-28 01:46:38 +01:00
Juan RP 3107408b9e xbps-src: show-build-deps: convert virtual rdeps. 2015-02-28 01:36:22 +01:00
Juan RP 98ae47f3eb xbps-src: show-build-deps: also print rdeps and drop subpkgs. 2015-02-28 00:13:42 +01:00
Juan RP ad74cbe1b4 xbps-src: show-build-deps: sanitize deps and use etc/virtual. 2015-02-27 23:48:14 +01:00
Juan RP d3811ca891 xbps-src: show-build-deps: take only_for_archs into account.
Silently error out if arch is not supported... my new bulk build code
expects ERROR if pkg cannot be built for the target arch.
2015-02-27 19:32:54 +01:00
Juan RP cc45da3f6d xbps-src: indent enabled build options correctly too. 2014-10-30 07:09:33 +01:00
Juan RP 3f31573ed5 xbps-src: align show options correctly. 2014-10-28 10:15:58 +01:00
Juan RP 9d34c36e0a Implemented support for permanent pkg build options (globally or per-pkg).
Permanent global pkg build options can be defined via 'XBPS_PKG_OPTIONS' in etc/conf.
Permament per-pkg build options can be defined via 'XBPS_PKG_OPTIONS_<pkgname>' in etc/conf.

Close GH #452.
2014-06-30 11:32:07 +02:00
Juan RP 1af40eb476 xbps-src: apply sane indentation to all shell code. 2014-04-09 16:40:27 +02:00
Juan RP 0b95cb8f5d Merge xbps-src code to make it usable in a standalone mode.
The new xbps-src configuration file is `etc/conf` where you can
add your local overrides from defaults set via `etc/defaults.conf`.

To use this xbps-src, run these steps:

	$ make
	$ sudo make setup (to make chroot helper setgid)
	$ ./xbps-src ...
2014-03-22 12:31:42 +01:00