summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Dh_Getopt.pm
Commit message (Collapse)AuthorAge
* -a == -sJoey Hess2009-09-01
| | | | | | | 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
* 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.
* clean up --sourcedir/--sourcedirectory conflictJoey Hess2009-06-28
| | | | | | | | | | | | * 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.
* Revert "Improvements in DH_OPTIONS handling and DH_AUTO_OPTIONS envvar support."Modestas Vainius2009-06-13
| | | | | | | | | | | | 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.
* Merge branch 'master' into buildsystemsJoey Hess2009-06-12
|\ | | | | | | | | | | Conflicts: Debian/Debhelper/Dh_Getopt.pm debian/changelog
| * Allow command-specific options to be passed to commands via dh without ↵Joey Hess2009-06-12
| | | | | | | | causing other commands to emit a getopt warning or deprecation message.
* | Improvements in DH_OPTIONS handling and DH_AUTO_OPTIONS envvar support.Modestas Vainius2009-06-08
|/ | | | | | | | | | | | | | * 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.
* Add a global --remaining-packages option.Modestas Vainius2009-03-23
| | | | | | | | 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>
* fix corner caseJoey Hess2009-03-20
| | | | | If DH_INTERNAL_OPTIONS does not specify any packages, we don't want to exclude them all!
* Fix calling the same helper for separate packages in the override of dh ↵Joey Hess2009-03-20
| | | | | | | | | | | | 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.
* Merge branch 'dh_overrides'Joey Hess2009-02-27
|\ | | | | | | | | | | Conflicts: Debian/Debhelper/Dh_Getopt.pm debian/changelog
| * fix option parsing sideportJoey Hess2009-02-27
| |
| * dh override targetsJoey Hess2009-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* | dh override targetsJoey Hess2009-02-16
| | | | | | | | | | | | | | | | | | | | * 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.
* | Ignore unknown options in DH_OPTIONS. Debhelper will always ignore such ↵Joey Hess2008-12-14
| | | | | | | | 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.)
* | fix wording for when there are multiple optionsJoey Hess2008-10-21
| |
* | Move many command-specific options to only be accepted by the command that ↵Joey Hess2008-10-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Allow individual debhelper programs to define their own special options by ↵Joey Hess2008-10-21
|/ | | | passing a hash to init(), which is later passed on the Getopt::Long. Closes: #370823
* dh_installinit: Add --restart-after-upgrade, which avoids stopping a daemon ↵Joey Hess2008-05-08
| | | | 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
* dh addon interfaceJoey Hess2008-05-04
| | | | | | | | | | | | * 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.
* dh is now workingJoey Hess2008-04-23
| | | | | | And debian/rules uses it. Sweet!
* initial version of dh, with option parsing and sequences in placeJoey Hess2008-04-23
|
* * dh_strip: Improve the idempotency fix put in for #380314.Joey Hess2008-01-24
| | | | * dh_strip: The -k flag didn't work (--keep did). Fix.
* r2033: * Add --ignore option. This is intended to ease dealing with upstreamjoeyh2007-09-30
| | | | | | | | 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.
* r1971: * dh_installudev: Treat --priority value as a string so that ↵joeyh2007-01-21
| | | | | | | leading zeros can be used (also so that a leading "z" that is not "z60" can be specified). Closes: #381851
* r1902: releasing version 5.0.30joeyh2006-04-13
|
* r1871: * dh_makeshlibs: add support for adding udeb: lines to shlibs filejoeyh2006-01-28
| | | | via --add-udeb parameter. Closes: #345471
* r1864: releasing version 5.0.19joeyh2006-01-24
|
* r1851: releasing version 5.0.15joeyh2006-01-11
|
* r1849: * dh_installinit: If run with -o, do the inverse of -n and onlyjoeyh2006-01-08
| | | | | | | | | set up maintainer script snippets, w/o installing any files. Useful for those edge cases where the init script is provided by upstream and not easily installed by dh_installinit but where it's worth letting it manage the maintainer scripts anyway. Closes: #140881, #184980 * -o might be added for other similar commands later if there is any reason to. And yeah, it means that -no is close to a no-op..
* r1691: * dh_installinit: Added --error-handler option. Based on work by ↵joey2004-06-29
| | | | | | Thom May. Closes: #209090
* r1655: * Added udeb support, as pioneered by di-packages-build. Understandsjoey2004-02-09
| | | | | | | | | | | | | | | "XC-Package-Type: udeb" in debian/control. See debhelper(1) for details. * Dh_Lib: add and export is_udeb and udeb_filename * dh_builddeb: name udebs with proper extension * dh_gencontrol: pass -n and filename to dpkg-gencontrol * dh_installdocs, dh_makeshlibs, dh_md5sums, dh_installchangelogs, dh_installexamples, dh_installman, dh_installmanpages: skip udebs * dh_shlibdeps: skip udebs. This may be temporary. * dh_installdeb: do not process conffiles, shlibs, preinsts, postrms, or prerms for udebs. Do not substiture #DEBHELPER# tokens in postinst scripts for udebs. * dh_installdebconf: skip config script for udebs, still do templates
* r1614: * Patch from Andrew Suffield <asuffield@debian.org> to make dh_stripjoey2003-10-14
| | | | | | | | support saving the debugging symbols with a --keep-debug flag and dh_shlibdeps skip /usr/lib/debug. Thanks! Closes: #215670 * Add --dbg-package flag to dh_strip, to list packages that have associated -dbg packages. dh_strip will then move the debug symbols over to the associated -dbg packages.
* r1611: * dh_install: add --fail-missing option. Closes: #120026joey2003-10-13
| | | | * Fix mispelling in prerm-sgmlcatalog. Closes: #215189
* r1596: * Remove duplicate packages from DOPACKAGES after argument processing.joey2003-08-22
| | | | | | | | | | | | | | Closes: #112950 * dh_compress: deal with links pointing to links pointing to compressed files, no matter what order find returns them. Closes: #204169 * dh_installmodules, dh_installpam, dh_installcron, dh_installinit, dh_installogrotate: add --name= option, that can be used to specify the name to use for the file(s) installed by these commands. For example, dh_installcron --name=foo will install debian/package.foo.cron.daily to etc/cron.daily/foo. Closes: #138202, #101003, #68545, #148844 (Thanks to Thomas Hood for connecting these bug reports.) * dh_installinit: deprecated --init-script option in favor of the above. * Add dh_installppp. Closes: #43403
* r576: * Rename debhelper.1 to debhelper.7.joey2003-03-03
| | | | * Typo, Closes: #183267
* r557: * dh_installinit: added --no-start for rcS type scripts. Closes: ↵joey2002-10-11
| | | | #136502
* r540: * Added a -L flag to dh_shlibdeps that is a nice alternative to ↵joey2002-07-25
| | | | | | providing a shlibs.local.
* r538: * Make dh_installchangelogs install debian/NEWS files as well, asjoey2002-07-19
| | | | | | | | NEWS.Debian. Make dh_compress always compress them. The idea is to make these files be in a machine parsable form, like the debian changelog, but only put newsworthy info into them. Automated tools can then display new news on upgrade. It is hoped that if this catches on it will reduce the abuse of debconf notes. See discussion on debian-devel for details.
* r532: * Added --mainpackage= option, of use in some kernel modules packages.joey2002-06-20
| | | | | | * dh_gencontrol only needs to pass -p to dpkg-gencontrol if there is more than one package in debian/control. This makes it a bit more flexible in some cases.
* r522: * Set DH_ALWAYS_EXCLUDE=CVS and debhelper will exclude CVS directoriesjoey2002-05-19
| | | | | | | | | | | from processing by any command that takes a -X option, and dh_builddeb will also go in and rm -rf any that still sneak into the build tree. * dh_install: A patch from Eric Dorland <eric@debian.org> adds support for --sourcedir, which allows debian/package.files files to be moved over to debian/package.install, and just work. Closes: #146847 * dh_movefiles: don't do file tests in no-act mode. Closes: #144573 * dh_installdebconf: pass --drop-old-templates to debconf-mergetemplate. Means debhelper has to depend on debconf-utils 1.1.1.
* r518: * dh_movefiles has long been a sore point in debhelper. Inheritedjoey2002-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from debstd, its interface and implementation suck, and I have maintained it while never really deigning to use it. Now there is a remplacment: dh_install, which ... - copies files, doesn't move them. Closes: #75360, #82649 - doesn't have that whole annoying debian/package.files vs. debian/files mess, as it uses debian/install. - supports copying empty subdirs. Closes: #133037 - doesn't use tar, thus no error reproting problems. Closes: #112538 - files are listed relative to the pwd, debian/tmp need not be used at all, so no globbing issues. Closes: #100404 - supports -X. Closes: #116902 - the whole concept of moving files out of a directory is gone, so this bug doesn't really apply. Closes: #120026 - This is exactly what Bill Allombert asked for in #117383, even though I designed it seemingly independantly. Thank you Bill! Closes: #117383 * Made debhelper's debian/rules a lot simpler by means of the above. * Updated example rules file to use dh_install. Also some reordering and other minor changes. * dh_movefiles is lightly deprecated, and when you run into its bugs and bad design, you are incouraged to just use dh_install instead. * dh_fixperms: in v4 only, make all files in bin/ dirs +x. Closes: #119039 * dh_fixperms: in v4 only, make all files in etc/init.d executable (of course there's -X ..) * dh_link: in v4 only, finds existing, non-policy-conformant symlinks and corrects them. This has the side effect of making dh_link idempotent. * Added a -h/--help option. This seems very obvious, but it never occured to me before.. * use v4 for building debhelper itself * v4 mode is done, you may now use it without fear of it changing. (This idea of this upload is to get v4 into woody so people won't run into many issues backporting from sarge to woody later on. Packages targeted for woody should continue to use whatever compatability level they are using.)
* r472: * Fixed issues with extended parameters to dh_gencontrol including ↵joey2001-05-29
| | | | | | | | | | | | | | | spaces and quotes. This was some histirical cruft that deals with splitting up the string specified by -u, and it should not have applied to the set of options after --. Now that it's fixed, any and all programs that support a -- and options after it, do not require any special quoting of the succeeding options. Quote just like you would in whatever program those options go to. So, for example, dh_gencontrol -Vblah:Depends='foo, bar (>= 1.2)' will work just as you would hope. This fix does NOT apply to -u; don't use -u if you must do something complex. Closes: #89311 * Made escape_shell output a lot better.
* r412: * Bah, reverted that last change. It isn't useful becausejoey2001-01-28
| | | | dpkg-buildpackage reads the real control file and gets confused.
* r392: * DH_COMPAT=3 now enables the following new features which I can't justjoey2000-11-27
| | | | | | | | | | | | | | | | | | | | | | turn on by default for fear of breaking backwards compatability: - dh_makeshlibs makes the postinst/postrm call ldconfig. Closes: #77154 Patch from Masato Taruishi <taru@debian.org> (modified). If you use this, be sure dh_makeshlibs runs before dh_installdeb; many old rules files have the ordering backwards. - dh_installdeb now causes all files in /etc to be registered as conffiles. - debian/README is now supported: it is treated exactly like debian/README.Debian. Either file is installed as README.Debian in non-native packages, and now as just README in native packages. Closes: #34628 * This is really only the start of the changes for v3, so use with caution.. * dh_du has finally been removed. It has been deprecated for ages, and a grep of the archive shows that nothing is using it except biss-awt and scsh. I filed bugs on both almost exactly a year ago. Those bugs should now be raised to severity important.. * --number option (to dh_installemacsen) is removed. It has been deprecated for a while and nothing uses it. Use --priority instead.
* r380: * dh_builddeb: added a --filename option to specify the output ↵joey2000-10-28
| | | | | | | filename. This is intended to be used when building .udebs for the debian installer.
* r340: * Patch from Jorgen `forcer' Schaefer <forcer at mindless.com> (muchjoey2000-03-03
modified)to make dh_installwm use new window manager registration method, update-alternatives. Closes: #52156, #34684 (latter bug is obsolete) * Fixed $dh{flavor} to be upper-case. * Deprecated dh_installemavcsen --number; use --priority instead. Also, the option parser requires the parameter be a number now. And, dh_installwm now accepts --priority, and window manager packages should start using it. * dh_installwm now behaves like a proper debhelper command, and reads debian/<package>.wm too. This is a small behavior change; filenames specified on the command line no longer apply to all packages it acts on. I can't belive this program existed for 2 years with such a glaring problem; I guess most people don't need ot register 5 wm's in 3 sub-packages. Anyway, it can handle such things now. :-) * Moved Dh_*.pm to /usr/lib/perl5/Debian/Debhelper. *big* change.