summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Dh_Getopt.pm
AgeCommit message (Collapse)AuthorFilesLines
2017-08-24Support building on case-insensitive filesystemsGeoffrey Thomas1-303/+0
Move Debian/ to lib subdirectory to support building on non-case-sensitive filesystems.
2017-07-03Set Emacs file variables directory-wideSven Joachim1-6/+0
Set the local variables for Emacs in the central placed intended for it, rather than in (currently) 95 individual files. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-04Dh_Getopt: Add a sortNiels Thykier1-1/+1
2017-06-04include present/wanted architecture in error messageMichael Stapelberg1-1/+5
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-19Dh_Getopt: Improve error message for -sNiels Thykier1-1/+4
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-19Dh_Lib: Provide deprecated_functionality helperNiels Thykier1-5/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-01Add a dash in --no-scripts and --only-scripts for consistencyNiels Thykier1-0/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-19Dh_Getopt: Deprecate -s and remove it in compat 11Niels Thykier1-0/+7
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-06-15Replace $dh{DEBUGPACKAGES} with $dh{DEBUGPACKAGE}Niels Thykier1-4/+6
All uses are now singular, so change the code to only accept one package (the latest passed) and only store one value. The original $dh{DEBUGPACKAGES} is preserved for backwards compatibility (e.g. dh_clistrip uses it), although it will now always have at most one value in the array. Signed-off-by: Niels Thykier <niels@thykier.net>
2015-07-01Migrate to use warnings and use parentNiels Thykier1-1/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2015-01-01Add editor hints to the end of all perl modules and scriptsNiels Thykier1-0/+6
Signed-off-by: Niels Thykier <niels@thykier.net>
2014-12-29Revert "dh_installdocs: Error out on unsafe binNMUs with --link-doc"Niels Thykier1-16/+1
This reverts commit 97993b514bfbcc84c213e9e5d68c1b1c3a833ce7.
2014-12-21dh_installdocs: Error out on unsafe binNMUs with --link-docNiels Thykier1-1/+16
Detect during a binNMU when an call to dh_installdocs (with --link-doc) is unsafe by also looking at packages that dh_installdocs /would/ process during an "full" build. Signed-off-by: Niels Thykier <niels@thykier.net>
2010-11-22dh_listpackages: Do not display warnings if options cause no packages to be ↵Joey Hess1-2/+6
listed.
2010-05-28Revert "In v8 mode, debhelper only ever acts on packages that can be built ↵Joey Hess1-11/+8
for the given architecture, even if -N or -p are used to specify packages specific to other architectures." This reverts commit 653fb43cfa731d047deaf19b61aef2ebbeb00990. Oops, I meant to not make this change.. -N was already fixed, and fixing -p does not seem important.
2010-05-28In v8 mode, debhelper only ever acts on packages that can be built for the ↵Joey Hess1-8/+11
given architecture, even if -N or -p are used to specify packages specific to other architectures.
2010-05-23In v8 mode, do not allow directly passing unknown options to debhelper ↵Joey Hess1-2/+3
commands. (Unknown options in DH_OPTIONS still only result in warnings.)
2010-04-08Fix #572077 in one place I missed earlier. (See #576885)Joey Hess1-1/+1
2010-02-16dh: Disable option bundling to avoid mis-parsing bundled options such as ↵Joey Hess1-5/+4
"-Bpython-support". Closes: #570039
2010-02-02Fix handling of -O with options specified by commands. Closes: #568081Joey Hess1-1/+3
2010-01-06bring back ignore_unknown_optionsJoey Hess1-3/+4
Missed that dh still uses it.
2010-01-06fix bad interaction between -O and ignore_unknown_optionsJoey Hess1-3/+2
Actually, since ignore_unknown_options is only used with DH_INTERNAL_OPTIONS, which always uses -O for such options, I was able to remove that complication too.
2010-01-04don't call getopt recursivelyJoey Hess1-8/+11
That messes with the return value of the outer call.
2010-01-04solve the dh -Bbuild problemJoey Hess1-15/+27
* 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.)
2010-01-04Fix warning about unknown options passed to commands in override targets.Joey Hess1-10/+9
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.
2009-09-01-a == -sJoey Hess1-7/+3
The -a flag now does the same thing as the -s flag, so debhelper users do not need to worry about using the -s flag when building a package that only builds for some architectures, and dh will also work in that situation. Closes: #540794
2009-06-30Use ASCII RS for separating options in DH_INTERNAL_OPTIONS.Modestas Vainius1-1/+1
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>
2009-06-29Make dh not complain about unknown, command-specific options passed to itJoey Hess1-6/+16
and further suppress warnings about such options it passes on to debhelper commands. This was attempted incompletely before in version 7.2.17.
2009-06-28clean up --sourcedir/--sourcedirectory conflictJoey Hess1-4/+0
* Move two move command-specific options to only be accepted by the commands that use them. The options are: --sourcedir, --destdir * If any third-party debhelper commands use either of the above options, they will be broken, and need to be changed to pass options to init(). This was done because of a conflict with the --sourcedirectory options used by dh_auto_*. I originally wanted to make dh_auto_* and dh_install both use --sourcedir, but that didn't work out.
2009-06-13Revert "Improvements in DH_OPTIONS handling and DH_AUTO_OPTIONS envvar support."Modestas Vainius1-29/+6
This mostly reverts commit f897611a77726655aea258af0c4d52a8ce759ebc. Remaining cosmetic changes (all functional changes have been reverted): * Refactoring of option string into split_options_string() sub (no semantic changes though). * Cosmetic change in Dh_Buildsystems.pm. Breaks testsuite.
2009-06-12Merge branch 'master' into buildsystemsJoey Hess1-5/+5
Conflicts: Debian/Debhelper/Dh_Getopt.pm debian/changelog
2009-06-12Allow command-specific options to be passed to commands via dh without ↵Joey Hess1-5/+6
causing other commands to emit a getopt warning or deprecation message.
2009-06-08Improvements in DH_OPTIONS handling and DH_AUTO_OPTIONS envvar support.Modestas Vainius1-11/+36
* DH_AUTO_OPTIONS is like existing DH_OPTIONS, just only for dh_auto stuff. This also avoids "explosion" of separate DH_AUTO_* environment variables (i.e. exports in debian/rules) and encourages usage of dh_auto command line option names. DH_AUTO_OPTIONS is passed via "extra_args" to Dh_Lib::init() (API addition). * When splitting options from DH_OPTIONS and its flavours, allow arguments to include whitespaces if they are escaped with backslash (\) (see split_options_string()). Document this in debhelper.pod. * Short option for --buildsystem is -c (aka class). * Provide API to cancel option specs from default debhelper options. It will be used in the feature.
2009-03-23Add a global --remaining-packages option.Modestas Vainius1-0/+6
Add a global --remaining-packages option which allows to skip the command on the packages which it has already been run on (i.e. if the command helper is already present in the package debhelper log). Signed-off-by: Modestas Vainius <modestas@vainius.eu>
2009-03-20fix corner caseJoey Hess1-3/+5
If DH_INTERNAL_OPTIONS does not specify any packages, we don't want to exclude them all!
2009-03-20Fix calling the same helper for separate packages in the override of dh ↵Joey Hess1-12/+33
binary-indep/binary-arch. Closes: #520567 This is based on some work by Modestas Vainius, somewhat simplified by a trick using excludes. Note that the error in the case where there are no packages to build was changed to a warning. That can easily happen now, and doesn't seem particilarly error-worthy anyway; just exiting w/o doing anything seems fine in that case.
2009-02-27Merge branch 'dh_overrides'Joey Hess1-1/+1
Conflicts: Debian/Debhelper/Dh_Getopt.pm debian/changelog
2009-02-27fix option parsing sideportJoey Hess1-11/+10
2009-02-27dh override targetsJoey Hess1-0/+9
* dh: debian/rules override targets can change what is run for a specific debhelper command in a sequence. * dh: Redid all the examples to use override targets, since these eliminate all annoying boilerplate and are much easier to understand than the old method. * Remove rules.simple example, there's no need to use explcit targets with dh anymore. (cherry picked from commit 0f3f59fe6058edfda4010dc88bd3b8aa3ae70a6d) Conflicts: Debian/Debhelper/Dh_Getopt.pm Debian/Debhelper/Dh_Lib.pm debian/changelog dh
2009-02-16dh override targetsJoey Hess1-0/+8
* dh: debian/rules override targets can change what is run for a specific debhelper command in a sequence. * dh: Redid all the examples to use override targets, since these eliminate all annoying boilerplate and are much easier to understand than the old method. * Remove rules.simple example, there's no need to use explcit targets with dh anymore.
2008-12-14Ignore unknown options in DH_OPTIONS. Debhelper will always ignore such ↵Joey Hess1-5/+25
options, even when unknown command-line options are converted back to an error. This allows (ab)using DH_OPTIONS to pass command-specific options. (Note that getopt will warn about such unknown options. Eliminating this warning without reimplementing much of Getopt::Long wasn't practical.)
2008-10-21fix wording for when there are multiple optionsJoey Hess1-1/+1
2008-10-21Move many command-specific options to only be accepted by the command that ↵Joey Hess1-57/+9
uses them. Affected options are: -x, -r, -R, -l, -L, -m, --include-conffiles, --no-restart-on-upgrade, --no-start, --restart-after-upgrade, --init-script, --filename, --flavor, --autodest, --libpackage, --add-udeb, --dpkg-shlibdeps-params, --dpkg-gencontrol-params, --update-rcd-params, --major, --remove-d, --dirs-only, --keep-debug, --version-info, --list-missing, --fail-missing, --language, --until, --after, --before, --remaining, --with * If any third-party debhelper commands use any of the above options, they will be broken, and need to be changed to pass options to init(). * To avoid breaking rules files that pass options to commands that do not use them, debhelper will now only warn if it encounters an unknown option. This will be converted back to an error later.
2008-10-21Allow individual debhelper programs to define their own special options by ↵Joey Hess1-87/+83
passing a hash to init(), which is later passed on the Getopt::Long. Closes: #370823
2008-05-08dh_installinit: Add --restart-after-upgrade, which avoids stopping a daemon ↵Joey Hess1-0/+1
in the prerm, and instead restarts it in the postinst, keeping its downtime minimal. Since some daemons could break if files are upgraded while they're running, it's not the default. It might become the default in a future (v8) compatability level. Closes: #471060
2008-05-04dh addon interface7.0.8Joey Hess1-0/+6
* dh: Add an interface that third-party packages providing debhelper commands can use to insert them into a command sequence. (See dh(1), "SEQUENCE ADDONS".) * dh: --with=foo can be used to include such third-party commands. So, for example, --with=cli could add the dh_cli* commands from cli-common. * Moved python-support special case out of dh and into a python-support sequence addon. --with=python-support is enabled by default to avoid breaking backwards compatability.
2008-04-23dh is now workingJoey Hess1-1/+1
And debian/rules uses it. Sweet!
2008-04-23initial version of dh, with option parsing and sequences in placeJoey Hess1-0/+5
2008-01-24* dh_strip: Improve the idempotency fix put in for #380314.Joey Hess1-2/+1
* dh_strip: The -k flag didn't work (--keep did). Fix.
2007-09-30r2033: * Add --ignore option. This is intended to ease dealing with upstreamjoeyh1-0/+7
tarballs that contain debian directories, by allowing debhelper config files in those directories to be ignored, since there's generally no good way to delete them out of the upstream tarball, and they can easily get in the way if upstream is using debian/ differently than the Debian maintainer.