Joey Hess [Tue, 29 Dec 2009 20:27:20 +0000 (15:27 -0500)]
stop trying to handle substvars idempotently
In the beginning, I tried to be careful to have commands that added a
substvar remove it when ran again with different options that caused it
to not be needed. However, now when I look over the code, I see 3 places
that got it right, 1 that was right but I just broke, and a dozen that
don't even try to handle this case.
Also, handling the case is hard; code that adds substvars may be complex
and calculate versioned dependencies. The removal code then has to somehow
also come up with those same exact dependency strings. It's a recipe for
nasty code and maintenance headache even if I went and fixed everything
right now.
Instead, I dropped the whole thing. Many debhelper commands make no
pretense of being idempotent anyway; it's easy and normal to call dh_prep
when starting a binary package build, with the exact purpose of not needing
to worry about idempotency.
I did leave in the delsubstvar function, as well as the option to
addsubstvar that, confusingly, causes an item to be removed. Just for
library compatability reasons.
Joey Hess [Tue, 29 Dec 2009 20:11:44 +0000 (15:11 -0500)]
dh_installxfonts: Use new update-fonts-alias --include and --exclude options to better handle removal in the case where xfonts-utils is removed before a font package is purged. (#543512; thanks, Theppitak Karoonboonyanan)
This patch adds --parallel option that enables parallel builds and does not
impose limits on maximum concurrent processes. --max-parallel (that implies
--parallel) can be used to specify that maximum limit.
Also make necessary adjustments to debhelper.pod and buildsystem_tests for
this option.
Remove legacy punctuation hacks tests which no longer work by design.
I assume backwards compatibility in this area was broken by design. Adding
--max-parallel to these in 6dd27753803ae2091a9fc3aedc8e70548ea87675 was wrong
and negated their whole point, i.e. testing of backwards compatibility when
parallel options were not supported.
(cherry picked from commit ca0ad4922ada7ae013b035cfe1550a257a330809)
Joey Hess [Mon, 23 Nov 2009 18:54:31 +0000 (13:54 -0500)]
Parallel building support is no longer enabled by default. It can still be enabled by using the --max-parallel option. This was necessary because some buildds build with -j2 by default.
Modestas Vainius [Thu, 19 Nov 2009 18:58:39 +0000 (20:58 +0200)]
cmake build+ steps need Makefile.
The condition is not what dh_auto_* 7.0.x would have done. The
patch makes auto-selection to pass through cmake.pm if Makefile
was not created. This problem is not very dangerous though.
Modestas Vainius [Thu, 19 Nov 2009 18:45:14 +0000 (20:45 +0200)]
Make buildsystems_list() use updated auto-selection code.
In order to avoid code duplication, auto-selection code has been refactored
into separate subroutine autoselect_buildsystem(). Both load_buildsystem() and
buildsystem_list() use it.
Cyril Brulebois [Thu, 19 Nov 2009 02:33:52 +0000 (03:33 +0100)]
Fix build system auto-selection breakage.
Probably due to an overlook in 758ce0bb1f, the '-e' test on build.xml
disappeared, leading check_auto_buildable() to always return '1' for
the ant build system.
Modestas Vainius [Wed, 18 Nov 2009 19:16:41 +0000 (14:16 -0500)]
Improve build system auto-selection process
This patch alters semantics of check_auto_buildable() a bit. Now it can
also indicate if the source has already been partitially built with the
build system and if so, such build system may be auto-selected over a less
specific its parent (in the inheritance tree) even if the latter is earlier
in the @BUILDSYSTEMS array.
However, this still leaves a requirement that a derivative build system
must not do anything that may break packages of the parent build system.
Otherwise, introduction of a new derivative build system might break
packages which already had that build system implemented via overrides...
Modestas Vainius [Tue, 17 Nov 2009 01:40:26 +0000 (20:40 -0500)]
Enable verbose ctest output on test failure
When test fails, enable verbose ctest output. This allows to
get more details on a test failure from the build logs.
Auto-select cmake in further steps only if cmake was run in configure step.
CMake writes CMakeCache.txt to build directory when it is run. Depend on the
presence of this file for auto-selection in build, test, install and clean
steps.
Joey Hess [Thu, 5 Nov 2009 01:47:13 +0000 (20:47 -0500)]
Add deprecation warnings for -u to the documentation, since putting options after -- is much more sane. (However, -u will not go away any time soon.) Closes: #554509
Joey Hess [Wed, 28 Oct 2009 21:23:28 +0000 (17:23 -0400)]
reduce amount of MAKEFLAGS cleaning
Now clean_jobserver_makeflags will only remove --jobserver settings
from MAKEFLAGS. This is simpler and easier to understand than
the old behavior, which, if there was no --jobserver, removed
all -j and --jobs, while leaving those when removing --jobserver.
This relies on -j options passed to make overriding
-j settings in MAKEFLAGS. So we don't need to clean those out,
we can just override them.
Joey Hess [Wed, 28 Oct 2009 20:45:12 +0000 (16:45 -0400)]
split get_make_jobserver_status into two functions
I disliked the complexity of the return values, and the boilerplate
code that followed the two calls to the function, to clean/unset
MAKEFLAGS. To solve both, I refactored it into two functions, one simply
tests to see if a jobserver is specified but unavailable, while the other
cleans/unsets MAKEFLAGS.
This loses the ability to pull the jobs-N count out of MAKEFLAGS,
but that was not currently used.
Modestas Vainius [Wed, 28 Oct 2009 19:49:34 +0000 (15:49 -0400)]
Support parallel building in makefile buildsystem
1) Add routine to Dh_Lib (used by dh and makefile.pm) which is capable of
detecting make jobserver and job control options from the MAKEFLAGS environment
variable. It also generates and returns a clean up MAKEFLAGS from these
options.
2) Add --parallel option to build system framework which allows source packages
to specify that they support parallel building. Optional value for this option is
the number of maximum parallel process to allow. However, the actual number of
parallel process (if any) for the specific build is determined from
DEB_BUILD_OPTIONS env variable as specified by Debian Policy.
By default (no --parallel option) parallel is neither enabled nor disabled
(depends on the external environment). However, dh may pass --parallel to
dh_auto_* implicitly in case 4) described below.
3) Add parallel support for makefile buildsystem. This implementation
forcefully starts a new make job server (or disables parallel) for the number
of process requested. If --parallel was not passed to the build system at all,
the build system will only clean up MAKEFLAGS from stale jobserver options to
avoid pointless make warnings.
4) If dh detects that it is being run by dpkg-buildpackage -jX and it is NOT
run with "+" prefix from debian/rules (i.e. jobserver is not reachable), it
enables --parallel implicitly. This closes: #532805.
Andrew Straw [Sun, 27 Sep 2009 00:26:01 +0000 (17:26 -0700)]
Pass --force option to Python distutils install command.
This command will prevent distutils from attempting to determine
whether a file should be installed based on the timestamp of the
to-be-overwritten file.