Commit graph

28 commits

Author SHA1 Message Date
Juan RP
4f67c26652 xbps-src: force autodeps cleanup while building dependencies.
Before that change, "./xbps-src -C pkg foo" would not remove dependencies
installed by previous builds required by foo.
2015-05-02 03:40:52 +02:00
Juan RP
ba814ab5c7 xbps-src/build.sh: error out if installing cross pkgs fails for some reason. 2015-04-15 11:38:23 +02:00
Juan RP
48548f1983 xbps-src/build.sh: sleep 1 second while running do-pkg.sh.
This will ensure that binpkg files do not have recorded the same mtime,
which is required in xbps to detect obsolete files properly.
2015-04-02 09:09:12 +02:00
Juan RP
7a59746763 xbps-src/build.sh: pass $sourcepkg not subpkgname to the helpers.
Close #1243
2015-03-30 20:24:11 +02:00
Juan RP
a86b30ba05 xbps-src: fix remaining issues with -N and -a. 2015-03-23 16:05:43 +01:00
Juan RP
03ef5b6804 xbps-src: make -N -a <target> work.
If required cross pkgs are not available in xbps repos, those are now built
automagically.
2015-03-23 12:44:37 +01:00
Juan RP
0337b86f43 xbps-src: return 0 on success, 1 on error and 2 on nocross/broken (ignore). 2015-03-19 10:08:02 +01:00
Juan RP
a8962ace18 xbps-src/build.sh: only skip building/installing deps for target pkg with -N. 2015-03-14 09:24:35 +01:00
Juan RP
f2883afc1b xbps-src/build.sh: fix xbps-src-doinstall() when pkg is a subpkg.
Close #1120
2015-03-14 09:06:44 +01:00
Juan RP
849d22e46d xbps-src: refactor build logic into its own script (build.sh).
The build.sh script is now responsible to handle all the logic to build
a source package and its subpackages, as well as all its required
build dependencies. Thanks to this and subshells, dependencies are now
built into its own child process, creating a process tree that can go
nested as long as your system allows forking and has enough memory :-)

This fixes some issues that have been while building pkgs that have lots
of nested dependencies.
2015-03-14 07:52:29 +01:00
Juan RP
31b544020f xbps-src/libexec: remove double slash from shebang. 2015-03-11 08:28:13 +01:00
Juan RP
df4c861f97 xbps-src: common/{,environment}/build_style -> common/${,environment}/build-style. 2015-02-21 12:13:07 +01:00
Juan RP
3adb1c5c6b xbps-src: add environment/build_style to set env vars for build_styles. 2015-02-21 12:03:48 +01:00
Juan RP
aed0f3ee0e xbps-src: fix hooks that are expected to be used in subpkgs. 2015-01-14 14:23:10 +01:00
Juan RP
5f63a3cf4f xbps-src: run pre-install hooks for subpkgs too.
The pre-install hooks are run before pkg_install().
2015-01-14 11:31:52 +01:00
Juan RP
6e13dcbaff xbps-src: introduce XBPS_STATEDIR to store state files, logs and others.
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.
2014-12-11 11:02:22 +01:00
Juan RP
782f331b10 xbps-src: repair running post-install hooks. 2014-12-06 18:10:08 +01:00
Juan RP
2a7a3209b8 xbps-src: make the 'pkg' target work after 'install'.
- Create state files in $wrksrc for $sourcepkg and $subpackages
to see if the phase needs to be re-run.
2014-12-06 13:45:49 +01:00
Juan RP
f7543fb5b6 xbps-src: libexec: simplify chdir to wrksrc/build_wrksrc. 2014-11-06 17:23:58 +01:00
Juan RP
13c2ca3bd2 xbps-src: reorganize code in more sections. 2014-09-05 11:10:07 +02:00
Juan RP
790202ddbd xbps-src: move helpers to environment; there's no need to have them.
Those helpers were just setting up some extra functions that can be used
on templates, and this can be done already via environment, so let's remove
the helpers completely.
2014-08-30 09:01:29 +02:00
Juan RP
1651a5fe6e xbps-src/doinstall: there's no need to remove pkg metafiles on destdir. 2014-08-26 09:55:40 +02:00
Juan RP
3fdd0e180e xbps-src: run pre-pkg hooks in the install to destdir target.
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!
2014-08-25 22:34:13 +02:00
Juan RP
9067c2e4f7 xbps-src: xbps-src-doextract: change cwd to wrksrc for post_extract(). 2014-07-17 15:54:37 +02:00
Juan RP
407a882b1a xbps-src/xbps-src-doextract: if build_style declares do_extract(), use it rather than hooks. 2014-07-12 17:44:54 +02:00
Juan RP
1af40eb476 xbps-src: apply sane indentation to all shell code. 2014-04-09 16:40:27 +02:00
Juan RP
576b865cf4 Update for xbps>=0.35 which contains xbps-uchroot.
That means that the Makefile and xbps-src generated files are not required
anymore, and the xbps-src script can be used as is.

Bump xbps requirement to 0.35 and enable XBPS_INSTALL_ARGS by default.
2014-04-01 11:29:21 +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