Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Previously, dh's API functions were sloppy in their return values but
*often* they would return a truth value. We changed that in 12.5 by
insisting on return undef. However, that broke addons relying on the
API function to work around Perl's idiom of "module must end with a
truth value".
To resolve that, we now always return a truth value from all API
functions to fix that. This also give consistent behaviour, which is
better than the previous setup.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
With the new "conditional" addon feature, it was possible to trigger a
gratious useless warning with a conditional override. Consider:
override_dh_foo-arch:
...
And dh_foo was added by an arch-only addon. Before this commit, we
would do:
debian/rules override_dh_foo-arch
dh_foo -a -N<for each arch:any package>
The latter call to dh_foo rightfully complained there was nothing to
do. With this commit, we correctly omit the latter call.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
We do not want to pay a non-trivial cost of loading Dpkg::Deps in
every helper (for cases where that is needed to parse th dh-sequence
clause).
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Previously, we relied on a command being inserted in the -arch
sequence to be ordered correctly. With this rewrite, a command added
only to the -indep sequence will still appear in the right order.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Disable auto-abbreviation of command-line options in compat 13 and
re-enable dh's optimization for skipping redundant commands when
passed long options.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Since the beginning, debhelper has accepted abbrevated command line
parameters. Anyone that has been using (e.g.):
dh $@ --sourcedir=foo
To pass --sourcedir to dh_install has *also* implicitly passed it to
the dh_auto_* helpers. Due to auto-abbrevation being enabled, they
have considered it a short form of --sourcedirectory.
This is trivially confirmable by comparing:
dh_auto_configure --bar foo
Unknown option: bar
dh_auto_configure: unknown option or error during option parsing; aborting
with
dh_auto_configure --sourcedir foo
dh_auto_configure: invalid or non-existing path to the source directory: foo
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
The --{until,after,before,remaining} were retroactively removed in
debhelper 12.4 even for older compat levels.
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Add a new 'dh_installsystemduser' helper responsible for istalling
package maintainer supplied systemd user instance units and to produce
postinst and postrm maintiner scripts code blocks to appropriately
enable, mask and disable units when the package is installed,
upgraded, or removed.
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Note this commit neuters some command line option optimizations
completely. The optimizations will be re-added for commands that
support a NOOP PROMISE hint in later commits.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Then we can make dh_installinitramfs do the same in all compat levels
and people can simply opt-in with a "--with installinitramfs" in older
compat levels.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
|
|
Closes: nthykier/debhelper#3
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
As of commit d68d6751a86052246433bf4381a5f8daac45f90d, the
SequencerUtil function "unpack_sequence" should correctly transform
the "compat 9"-style sequences into "compat 8"-style sequences.
Exploit this to avoid the duplicated definitions.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
It is not a super name, but "optimize" implies that dh will work if
you skip the call. By renaming it to unpack we avoid that implication.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
This will make it easier to see that the code is dead once compat 9
is removed.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Thanks to James Cowgill for finding this bug.
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
This is part of 2 of the dh sequence rewrite. Part 1
is cb2caa7f67837294b0681d881f52dd23df487f33.
This change ensures that dh no longer attempts to run a target that is
already marked as complete (e.g. via the stamp file).
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Rewrite the way we compute the sequences to ensure that:
1) Rules target remain opaque (particularly "subtargets" are now
also opaque).
2) Opaque targets are run first, so they can run their subtargets
before dh runs a command that depends on it.
This is the first half of fixing Debian#880840.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
This is intended to be used by downstreams or specific local configurations
that require a debhelper addon to be run during multiple builds without
having to patch a large number of rules file. If at all possible, this should
be avoided in favor of a --with flag in the rules file.
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|
|
Signed-off-by: Niels Thykier <niels@thykier.net>
|