| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
| |
#604727
|
|
|
|
| |
overridden command. Closes: #613418
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changes in 76ef1cbd64829ee4a5156a5fc4b887bcba6b974f broke
--remaining-packages in override target.
Now all debhelper commands run in the override target are marked as running
as part of the override, and when the whole target is run, the log is
updated to indicate that commands run during the override have finished.
So, inside the override target, --remaining-packages will see the commands
run as part of the target as having been run. Outside, if the target
fails, dh won't see the commands run it it as having been run.
Closes: #612828
|
|
|
|
|
|
|
|
| |
running sequence"
This reverts commit c685546d18606fafee2ad9d3a1cb3d90dd7e9d5e.
Caused extra work, and possible FTBFS conditions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add %sequence_deps and invoke recursively prior to examining logs and
running commands in sequence. The supplied dependencies are equivalent
to the following make rules:
build: build-arch build-indep
install: install-arch install-indep
install-arch: build-arch
install-indep: build-indep
binary: binary-arch binary-indep
binary-arch: install-arch
binary-indep: install-indep
In the existing dh command sequences, the binary sequences all included
the corresponding install sequence commands, and in turn the install
sequences all included the corresponding build commands. While this
works, it has a major deficiency. If the "binary" sequence is run, it
will not run the "build" target in debian/rules. This leads to a
situation where building with dpkg-buildpackge, which would typically
invoke "debian/rules build" followed by "debian/rules binary-arch"
and/or "debian/rules debian-indep" may do something different than
just invoking "debian/rules binary" or "dh binary" because the build
target in debian/rules is effectively bypassed. This applies equally
to the -arch and -indep sequence variants.
This change eliminates the duplicated sequence commands, and instead
invokes the appropriate target(s) in debian/rules, as specified in the
%sequence_deps hash. In the common case, the dh sequence by the same
name will be called, so the behaviour is identical. However, this
provides a means to utilise all of the policy-specified targets, plus
the install targets and extend them with additional dependencies and
commands, while still allowing full use of dh and giving identical
behaviour whether dh or debian/rules targets are used.
Signed-off-by: Roger Leigh <rleigh@debian.org>
|
|
|
|
|
|
| |
consistency
Signed-off-by: Roger Leigh <rleigh@debian.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sequences
The existing binary-arch and binary-indep sequences depend upon these
new sequences, leading to the following possible orders:
binary → install → build
binary-arch → install-arch → build-arch
binary-indep → install-indep → build-indep
This is the logical dependency ordering of the sequences; the actual
order is of course in reverse so that build is followed by install
and binary.
Signed-off-by: Roger Leigh <rleigh@debian.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$(findstring) can match partial strings and so is unreliable when a
package builds several binary packages and one package contains the
name of another package within its name. In these cases,
$(findstring) can return a partial match which leads to problems
(performing unwanted actions which could lead to build failure, for
example).
$(filter) matches the entire string in the wordlist, so is a
reliable replacement for $(findstring).
Signed-off-by: Roger Leigh <rleigh@debian.org>
|
|
|
|
|
|
|
| |
Note that only the overridden command is inhibited. I wanted to avoid a
behavior change if a rules file runs other debhelper commands inside the
target, and relies on the logging preventing them being run later on in
the sequence.
|
|
|
|
|
|
|
|
|
| |
As advised in man(1), always use: B<bold text> type exactly as shown.
I<italic text> replace with appropriate argument.
s/debian/Debian/ if needed. s/ / / also.
s/perl/Perl/ s/python/Python/ and s/emacs/Emacs/ too.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids ambiguities when parsing options to be passed on to debhelper
commands. (See #570039)
In the end, the idea of putting the debhelper command options after --
seemed to need too much knowledge about whether an option like
--buildsystem is a dh option or a command option.
I did consider making no change.. The ambiguities this eliminates are
small. But it seemed worth simplifying dh's option parser, and only about
1/6th of calls to dh in the archive don't put the sequence first already.
(Docs have shown that as the right thing to do for some time.)
|
|
|
|
| |
commands. (Unknown options in DH_OPTIONS still only result in warnings.)
|
| |
|
|
|
|
|
|
|
| |
joeyh: debhelper has an undocumented variable with INTERNAL in its name.
People keep trying to use it. Why?
liw: debhelper is magic. magic is power derived from secrets. secrets are
desireable. solution: document it. :)
|
| |
|
| |
|
|
|
|
| |
"-Bpython-support". Closes: #570039
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Add -O option, which can be used to pass options to commands, ignoring
options that they do not support.
* dh: Use -O to pass user-specified options to the commands it runs.
This solves the problem with passing "-Bbuild" to dh, where commands
that do not support -B would see a bogus -u option. Closes: #541773
(It also ensures that the commands dh prints out can really be run.)
|
|
|
|
|
|
|
|
|
| |
dh used DH_OVERRIDE_UNKNOWN_OPTIONS, which was too broad as it affected
commands run via override targets and caused there to be no warning about
unknown options.
Now unknown options are only ignored when parsing DH_INTERNAL_OPTIONS and
dh's own options.
|
| |
|
| |
|
|
|
|
|
| |
1) Detect if target is noop when parsing debian/rules.
2) If override target is noop, do not call make for it.
|
|
|
|
| |
several commands. Closes: #560600
|
| |
|
| |
|
|
|
|
|
| |
I renamed --parallel to --max-parallel to clarify that it doesn't enable
parallelism, but only controls how much of it is allowed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
Signed-off-by: Modestas Vainius <modestas@vainius.eu>
|
|
|
|
| |
run once due to logging.)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I hope that it will not be needed; indeed I doubt that
remove_command_options will be used much, because sequence addons would
need to try to do conflicting things to need it. And the interface makes it
hard for such conflicting sequence addons to work around the other, since
addons can be loaded in either order. So let's not encourage them too
much, and if there's a use case later, we can made changes.
I haven't applied Modestas's enhanced patch that allows adding an option to
all commands because I similarly think it might not be used. If a use case
comes along we can add something like that.
|
|
|
|
|
|
|
|
| |
Add dh addons APIs add_command_options()/remove_command_options() that
allow addons to add additional options which dh will pass to the specified
debhelper commands.
Signed-off-by: Modestas Vainius <modestas@vainius.eu>
|
| |
|
| |
|
| |
|
|
|
|
| |
quilt), by adding an add_command function to the sequence addon interface. See #540124.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since now extra options via dh command line arguments are encouraged, dh will
break when a bit more complex option gets added to DH_INTERNAL_OPTIONS and it
gets misparsed by the debhelper command called from the override. E.g.
debian/rules:
| %:
| dh --builddirectory="build dir"
|
| override_dh_install:
| dh_install
Will fail with something like:
| ....
| make[1]: Entering directory `............'
| dh_install
| cp: cannot stat `debian/tmp/dir': No such file or directory
| dh_install: cp returned exit code 1
| make[1]: *** [override_dh_install] Error 1
So since DH_INTERNAL_OPTIONS is exclusively for internal use, why not to use an
old good ASCII unrepresentable control character as a separator? So I chose
ASCII 1E - RS Record Separator.
Signed-off-by: Modestas Vainius <modestas@vainius.eu>
|
|
|
|
|
| |
and further suppress warnings about such options it passes on to debhelper
commands. This was attempted incompletely before in version 7.2.17.
|
| |
|
| |
|
| |
|
| |
|
| |
|