summaryrefslogtreecommitdiff
path: root/dh
Commit message (Collapse)AuthorAge
* Fix logging at end of an override target that never actually runs the ↵Joey Hess2011-02-14
| | | | overridden command. Closes: #613418
* Improve handling of logging in override targetsJoey Hess2011-02-10
| | | | | | | | | | | | | | | 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
* Revert "dh: Add sequence dependencies and satisfy dependencies prior to ↵Joey Hess2010-12-07
| | | | | | | | running sequence" This reverts commit c685546d18606fafee2ad9d3a1cb3d90dd7e9d5e. Caused extra work, and possible FTBFS conditions.
* dh: Add sequence dependencies and satisfy dependencies prior to running sequenceRoger Leigh2010-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* dh: Use "architecture independent" rather than "binary independent" for ↵Roger Leigh2010-12-05
| | | | | | consistency Signed-off-by: Roger Leigh <rleigh@debian.org>
* dh: Add support for build-arch, build-indep, install-arch and install-indep ↵Roger Leigh2010-11-22
| | | | | | | | | | | | | | | | | 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>
* dh: Use $(filter) rather than $(findstring)Roger Leigh2010-11-22
| | | | | | | | | | | | | | $(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>
* dh: Inhibit logging for commands run inside override targetsJoey Hess2010-11-02
| | | | | | | 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.
* Apply manual pages conventionsDavid Prévot2010-11-02
| | | | | | | | | 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.
* add autotools_dev exampleJoey Hess2010-06-06
|
* In v8 mode, dh expects the sequence to run is always its first parameter.Joey Hess2010-05-27
| | | | | | | | | | | | | | 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.)
* In v8 mode, do not allow directly passing unknown options to debhelper ↵Joey Hess2010-05-23
| | | | commands. (Unknown options in DH_OPTIONS still only result in warnings.)
* add semicolon after build targets to avoid implicit target runningJoey Hess2010-04-08
|
* dh: Improve documentation.Joey Hess2010-04-06
| | | | | | | 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. :)
* dh: Allow --list-addons to be used when not in a source package. Closes: #574351Joey Hess2010-03-31
|
* add parallel optionJoey Hess2010-03-04
|
* dh: Disable option bundling to avoid mis-parsing bundled options such as ↵Joey Hess2010-02-16
| | | | "-Bpython-support". Closes: #570039
* add --builddirectory exampleJoey Hess2010-01-27
|
* Fix typo: s/notmally/normallyJoachim Breitner2010-01-10
|
* solve the dh -Bbuild problemJoey Hess2010-01-04
| | | | | | | | | * 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.)
* Fix warning about unknown options passed to commands in override targets.Joey Hess2010-01-04
| | | | | | | | | 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.
* simplifyJoey Hess2009-12-30
|
* whitespaceJoey Hess2009-12-30
|
* Do not call make for noop overrides.Modestas Vainius2009-12-30
| | | | | 1) Detect if target is noop when parsing debian/rules. 2) If override target is noop, do not call make for it.
* dh(1): Add an example of using an override target to avoid dh running ↵Joey Hess2009-12-14
| | | | several commands. Closes: #560600
* dh(1): Minor rewording of documentation of override commands. Closes: #560421Joey Hess2009-12-14
|
* dh: Document --no-act. Closes: #557505Joey Hess2009-11-22
|
* implement the other option: parallel enabled implicitly by DEB_BUILD_OPTIONSJoey Hess2009-10-29
| | | | | I renamed --parallel to --max-parallel to clarify that it doesn't enable parallelism, but only controls how much of it is allowed.
* remove implicit --parallel setting by dhJoey Hess2009-10-28
|
* logic simplificationJoey Hess2009-10-28
|
* reduce amount of MAKEFLAGS cleaningJoey Hess2009-10-28
| | | | | | | | | | | 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.
* split get_make_jobserver_status into two functionsJoey Hess2009-10-28
| | | | | | | | | | | 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.
* Support parallel building in makefile buildsystemModestas Vainius2009-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* dh: Remove duplicate dh_installcatalogs list. Closes: #545483 (It was only ↵Joey Hess2009-09-07
| | | | run once due to logging.)
* drop regex support from remove_command_optionsJoey Hess2009-08-26
| | | | | | | | | | | | | 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.
* Allow dh addons to pass options to debhelper commandsModestas Vainius2009-08-26
| | | | | | | | 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>
* dh: Display $@ error if addon load fails. Closes: #541845Joey Hess2009-08-16
|
* avoid loading File::Spec when not neededJoey Hess2009-08-16
|
* dh: Add --list option to list available addons.Colin Watson2009-08-16
|
* dh: Allow creation of new sequences (such as to handle a patch target for ↵Joey Hess2009-08-06
| | | | quilt), by adding an add_command function to the sequence addon interface. See #540124.
* Use ASCII RS for separating options in DH_INTERNAL_OPTIONS.Modestas Vainius2009-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Make dh not complain about unknown, command-specific options passed to itJoey Hess2009-06-29
| | | | | and further suppress warnings about such options it passes on to debhelper commands. This was attempted incompletely before in version 7.2.17.
* add exampleJoey Hess2009-06-28
|
* dh_scrollkeeper: Now a deprecated no-op. Closes: #530806Joey Hess2009-05-27
|
* dh: Avoid writing log after override_dh_clean is run. Closes: #529228Joey Hess2009-05-18
|
* dh: Support --with addon,addon,... Closes: #528178Joey Hess2009-05-11
|
* mention quiltJoey Hess2009-05-08
|
* dh: Add --without to allow disabling sequence addons (particularly useful to ↵Joey Hess2009-05-04
| | | | disable the default python-support addon).
* releasing version 7.2.8Joey Hess2009-04-20
|
* Move dh sequence documentation to PROGRAMMING.Joey Hess2009-04-20
|