From dbdad391cc62fc92f54d8f9eab1f4bc68c1073cb Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Sun, 2 Oct 2016 20:11:34 +0000 Subject: Refactor install_dir usage to avoid the "if -d " tests They were not needed in the first place (as "install -d" DTRT). Signed-off-by: Niels Thykier --- dh_installifupdown | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'dh_installifupdown') diff --git a/dh_installifupdown b/dh_installifupdown index 3fdbaad4..d27f464c 100755 --- a/dh_installifupdown +++ b/dh_installifupdown @@ -61,9 +61,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { foreach my $script (qw(pre-up up down post-down)) { my $file=pkgfile($package, "if-$script"); if ($file ne '') { - if (! -d "$tmp/etc/network/if-$script.d") { - install_dir("$tmp/etc/network/if-$script.d"); - } + install_dir("$tmp/etc/network/if-$script.d"); install_prog($file,"$tmp/etc/network/if-$script.d/".pkgfilename($package)); } } -- cgit v1.2.3 From 35c18c7e9421ea8c459851d6146755af8fe74518 Mon Sep 17 00:00:00 2001 From: Sven Joachim Date: Mon, 3 Jul 2017 15:02:29 +0000 Subject: Set Emacs file variables directory-wide 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 --- .dir-locals.el | 7 +++++++ Debian/Debhelper/Buildsystem.pm | 6 ------ Debian/Debhelper/Buildsystem/ant.pm | 6 ------ Debian/Debhelper/Buildsystem/autoconf.pm | 6 ------ Debian/Debhelper/Buildsystem/cmake.pm | 6 ------ Debian/Debhelper/Buildsystem/makefile.pm | 6 ------ Debian/Debhelper/Buildsystem/meson.pm | 6 ------ Debian/Debhelper/Buildsystem/ninja.pm | 6 ------ Debian/Debhelper/Buildsystem/perl_build.pm | 6 ------ Debian/Debhelper/Buildsystem/perl_makemaker.pm | 6 ------ Debian/Debhelper/Buildsystem/python_distutils.pm | 6 ------ Debian/Debhelper/Buildsystem/qmake.pm | 6 ------ Debian/Debhelper/Buildsystem/qmake_qt4.pm | 6 ------ Debian/Debhelper/Dh_Buildsystems.pm | 6 ------ Debian/Debhelper/Dh_Getopt.pm | 6 ------ Debian/Debhelper/Dh_Lib.pm | 6 ------ Debian/Debhelper/Sequence/build_stamp.pm | 6 ------ Debian/Debhelper/Sequence/python_support.pm | 6 ------ dh | 6 ------ dh_auto_build | 6 ------ dh_auto_clean | 6 ------ dh_auto_configure | 6 ------ dh_auto_install | 6 ------ dh_auto_test | 6 ------ dh_bugfiles | 12 ------------ dh_builddeb | 6 ------ dh_clean | 6 ------ dh_compress | 6 ------ dh_fixperms | 6 ------ dh_gconf | 6 ------ dh_gencontrol | 6 ------ dh_icons | 6 ------ dh_install | 6 ------ dh_installcatalogs | 6 ------ dh_installchangelogs | 6 ------ dh_installcron | 6 ------ dh_installdeb | 6 ------ dh_installdebconf | 6 ------ dh_installdirs | 6 ------ dh_installdocs | 6 ------ dh_installemacsen | 6 ------ dh_installexamples | 6 ------ dh_installgsettings | 6 ------ dh_installifupdown | 6 ------ dh_installinfo | 6 ------ dh_installinit | 6 ------ dh_installlogcheck | 6 ------ dh_installlogrotate | 6 ------ dh_installman | 6 ------ dh_installmanpages | 6 ------ dh_installmenu | 6 ------ dh_installmime | 6 ------ dh_installmodules | 6 ------ dh_installpam | 6 ------ dh_installppp | 6 ------ dh_installudev | 6 ------ dh_installwm | 6 ------ dh_installxfonts | 6 ------ dh_link | 6 ------ dh_lintian | 6 ------ dh_listpackages | 6 ------ dh_makeshlibs | 6 ------ dh_md5sums | 6 ------ dh_missing | 6 ------ dh_movefiles | 6 ------ dh_perl | 6 ------ dh_prep | 6 ------ dh_shlibdeps | 6 ------ dh_strip | 6 ------ dh_testdir | 6 ------ dh_testroot | 6 ------ dh_ucf | 6 ------ dh_update_autotools_config | 6 ------ dh_usrlocal | 6 ------ t/buildsystems/01-build-system-basic-api.t | 6 ------ t/buildsystems/02-make-jobserver-makeflags.t | 6 ------ t/buildsystems/03-bs-auto-buildable.t | 5 ----- t/buildsystems/04-dh_auto_do_autoconf.t | 5 ----- t/buildsystems/05-load-build-system.t | 5 ----- t/buildsystems/06-buildsystem-mkdir-rmdir.t | 5 ----- t/buildsystems/load-bs.pl | 5 ----- t/dh-lib.t | 5 ----- t/dh_install/01-basics.t | 5 ----- t/dh_install/03-866570-dont-install-from-host.t | 5 ----- t/dh_installdocs/dh_installdocs.t | 5 ----- t/dh_installinit/dh_installinit.t | 5 ----- t/dh_link/01-basic.t | 5 ----- t/dh_link/02-346405.t | 5 ----- t/dh_missing/01-no-missing.t | 5 ----- t/dh_missing/02-fail-on-missing.t | 5 ----- t/dh_missing/03-dh_install-redirection.t | 5 ----- t/maintscript.t | 5 ----- t/override_target.t | 6 ------ t/pod.t | 6 ------ t/size.t | 6 ------ t/syntax/syntax-progs.t | 5 ----- 96 files changed, 7 insertions(+), 559 deletions(-) create mode 100644 .dir-locals.el (limited to 'dh_installifupdown') diff --git a/.dir-locals.el b/.dir-locals.el new file mode 100644 index 00000000..50364f24 --- /dev/null +++ b/.dir-locals.el @@ -0,0 +1,7 @@ +((perl-mode + (tab-width . 4) + (indent-tabs-mode . t)) + (cperl-mode + (cperl-indent-level . 4) + (tab-width . 4) + (indent-tabs-mode . t))) diff --git a/Debian/Debhelper/Buildsystem.pm b/Debian/Debhelper/Buildsystem.pm index 2fdf97a6..2df427b2 100644 --- a/Debian/Debhelper/Buildsystem.pm +++ b/Debian/Debhelper/Buildsystem.pm @@ -463,9 +463,3 @@ sub clean { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/ant.pm b/Debian/Debhelper/Buildsystem/ant.pm index eca9770c..49aaf1e2 100644 --- a/Debian/Debhelper/Buildsystem/ant.pm +++ b/Debian/Debhelper/Buildsystem/ant.pm @@ -50,9 +50,3 @@ sub clean { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/autoconf.pm b/Debian/Debhelper/Buildsystem/autoconf.pm index 26650659..bd7ebe74 100644 --- a/Debian/Debhelper/Buildsystem/autoconf.pm +++ b/Debian/Debhelper/Buildsystem/autoconf.pm @@ -86,9 +86,3 @@ sub test { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm index e9a6bbb0..5310a9c7 100644 --- a/Debian/Debhelper/Buildsystem/cmake.pm +++ b/Debian/Debhelper/Buildsystem/cmake.pm @@ -114,9 +114,3 @@ sub test { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/makefile.pm b/Debian/Debhelper/Buildsystem/makefile.pm index 4d7e4a28..02008a25 100644 --- a/Debian/Debhelper/Buildsystem/makefile.pm +++ b/Debian/Debhelper/Buildsystem/makefile.pm @@ -176,9 +176,3 @@ sub clean { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/meson.pm b/Debian/Debhelper/Buildsystem/meson.pm index 356e21f0..d4b22620 100644 --- a/Debian/Debhelper/Buildsystem/meson.pm +++ b/Debian/Debhelper/Buildsystem/meson.pm @@ -68,9 +68,3 @@ sub test { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/ninja.pm b/Debian/Debhelper/Buildsystem/ninja.pm index 0df964e9..5d6c874d 100644 --- a/Debian/Debhelper/Buildsystem/ninja.pm +++ b/Debian/Debhelper/Buildsystem/ninja.pm @@ -80,9 +80,3 @@ sub clean { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/perl_build.pm b/Debian/Debhelper/Buildsystem/perl_build.pm index 45874df2..2817797c 100644 --- a/Debian/Debhelper/Buildsystem/perl_build.pm +++ b/Debian/Debhelper/Buildsystem/perl_build.pm @@ -77,9 +77,3 @@ sub clean { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/Debian/Debhelper/Buildsystem/perl_makemaker.pm index 30e4f107..6a6f452e 100644 --- a/Debian/Debhelper/Buildsystem/perl_makemaker.pm +++ b/Debian/Debhelper/Buildsystem/perl_makemaker.pm @@ -87,9 +87,3 @@ sub install { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm index f4d1d19a..4c2a5f8d 100644 --- a/Debian/Debhelper/Buildsystem/python_distutils.pm +++ b/Debian/Debhelper/Buildsystem/python_distutils.pm @@ -209,9 +209,3 @@ sub clean { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/qmake.pm b/Debian/Debhelper/Buildsystem/qmake.pm index 0bc53e63..c39c2474 100644 --- a/Debian/Debhelper/Buildsystem/qmake.pm +++ b/Debian/Debhelper/Buildsystem/qmake.pm @@ -82,9 +82,3 @@ sub install { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Buildsystem/qmake_qt4.pm b/Debian/Debhelper/Buildsystem/qmake_qt4.pm index f9c11f83..23dd3375 100644 --- a/Debian/Debhelper/Buildsystem/qmake_qt4.pm +++ b/Debian/Debhelper/Buildsystem/qmake_qt4.pm @@ -16,9 +16,3 @@ sub configure { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Dh_Buildsystems.pm b/Debian/Debhelper/Dh_Buildsystems.pm index 12df33a7..7d4b421c 100644 --- a/Debian/Debhelper/Dh_Buildsystems.pm +++ b/Debian/Debhelper/Dh_Buildsystems.pm @@ -254,9 +254,3 @@ sub buildsystems_do { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Dh_Getopt.pm b/Debian/Debhelper/Dh_Getopt.pm index afc36115..a9518edb 100644 --- a/Debian/Debhelper/Dh_Getopt.pm +++ b/Debian/Debhelper/Dh_Getopt.pm @@ -301,9 +301,3 @@ sub parseopts { } 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 305f6dde..1b97f3d9 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -1830,9 +1830,3 @@ sub on_items_in_parallel { 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Sequence/build_stamp.pm b/Debian/Debhelper/Sequence/build_stamp.pm index 59437c81..2d83d522 100644 --- a/Debian/Debhelper/Sequence/build_stamp.pm +++ b/Debian/Debhelper/Sequence/build_stamp.pm @@ -9,9 +9,3 @@ add_command_at_end('create-stamp debian/debhelper-build-stamp', 'build-arch'); add_command_at_end('create-stamp debian/debhelper-build-stamp', 'build-indep'); 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/Debian/Debhelper/Sequence/python_support.pm b/Debian/Debhelper/Sequence/python_support.pm index 38d6a867..5a444685 100644 --- a/Debian/Debhelper/Sequence/python_support.pm +++ b/Debian/Debhelper/Sequence/python_support.pm @@ -8,9 +8,3 @@ use Debian::Debhelper::Dh_Lib; deprecated_functionality('python_support sequence does nothing as dh_pysupport is no longer available', 11); 1 - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh b/dh index 2f63a96e..4200af28 100755 --- a/dh +++ b/dh @@ -1087,9 +1087,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_auto_build b/dh_auto_build index f041e345..bc932df2 100755 --- a/dh_auto_build +++ b/dh_auto_build @@ -56,9 +56,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_auto_clean b/dh_auto_clean index 7d239455..0f4ce092 100755 --- a/dh_auto_clean +++ b/dh_auto_clean @@ -59,9 +59,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_auto_configure b/dh_auto_configure index 33dc1fb7..8a2c23d2 100755 --- a/dh_auto_configure +++ b/dh_auto_configure @@ -61,9 +61,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_auto_install b/dh_auto_install index fa0c6692..5ca6a524 100755 --- a/dh_auto_install +++ b/dh_auto_install @@ -101,9 +101,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_auto_test b/dh_auto_test index af4b85d6..547a469c 100755 --- a/dh_auto_test +++ b/dh_auto_test @@ -68,9 +68,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_bugfiles b/dh_bugfiles index 01e0bf46..32722777 100755 --- a/dh_bugfiles +++ b/dh_bugfiles @@ -141,15 +141,3 @@ This program is a part of debhelper. Modestas Vainius =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_builddeb b/dh_builddeb index 2f346df1..533006db 100755 --- a/dh_builddeb +++ b/dh_builddeb @@ -186,9 +186,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_clean b/dh_clean index 5135250e..7a058a71 100755 --- a/dh_clean +++ b/dh_clean @@ -190,9 +190,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_compress b/dh_compress index 21503c6a..127178d3 100755 --- a/dh_compress +++ b/dh_compress @@ -256,9 +256,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_fixperms b/dh_fixperms index fcec0675..20813e1f 100755 --- a/dh_fixperms +++ b/dh_fixperms @@ -153,9 +153,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_gconf b/dh_gconf index caed0fd3..4e4968ca 100755 --- a/dh_gconf +++ b/dh_gconf @@ -107,9 +107,3 @@ Ross Burton Josselin Mouette =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_gencontrol b/dh_gencontrol index befc3793..8238a417 100755 --- a/dh_gencontrol +++ b/dh_gencontrol @@ -181,9 +181,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_icons b/dh_icons index 73f6c155..acbbd4ce 100755 --- a/dh_icons +++ b/dh_icons @@ -83,9 +83,3 @@ Jordi Mallach Josselin Mouette =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_install b/dh_install index 41cc5064..2b41deea 100755 --- a/dh_install +++ b/dh_install @@ -337,9 +337,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installcatalogs b/dh_installcatalogs index bc4f93bc..dc1fad93 100755 --- a/dh_installcatalogs +++ b/dh_installcatalogs @@ -131,9 +131,3 @@ F Adam Di Carlo =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installchangelogs b/dh_installchangelogs index acfdc9b7..bc20ec06 100755 --- a/dh_installchangelogs +++ b/dh_installchangelogs @@ -248,9 +248,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installcron b/dh_installcron index 92179345..9bc3d7a1 100755 --- a/dh_installcron +++ b/dh_installcron @@ -84,9 +84,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installdeb b/dh_installdeb index 09d04263..fc81147d 100755 --- a/dh_installdeb +++ b/dh_installdeb @@ -223,9 +223,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installdebconf b/dh_installdebconf index 1c3d9025..ba2e9bc8 100755 --- a/dh_installdebconf +++ b/dh_installdebconf @@ -134,9 +134,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installdirs b/dh_installdirs index df04e4a5..222968ce 100755 --- a/dh_installdirs +++ b/dh_installdirs @@ -103,9 +103,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installdocs b/dh_installdocs index bfed5def..4b9cdcb4 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -385,9 +385,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installemacsen b/dh_installemacsen index 98f820c6..96e77100 100755 --- a/dh_installemacsen +++ b/dh_installemacsen @@ -144,9 +144,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installexamples b/dh_installexamples index e4598533..bb02d915 100755 --- a/dh_installexamples +++ b/dh_installexamples @@ -142,9 +142,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installgsettings b/dh_installgsettings index fcf4470e..05c0b339 100755 --- a/dh_installgsettings +++ b/dh_installgsettings @@ -98,9 +98,3 @@ Josselin Mouette =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installifupdown b/dh_installifupdown index d27f464c..7114a26b 100755 --- a/dh_installifupdown +++ b/dh_installifupdown @@ -78,9 +78,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installinfo b/dh_installinfo index 8434ee35..33137ed3 100755 --- a/dh_installinfo +++ b/dh_installinfo @@ -105,9 +105,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installinit b/dh_installinit index cdad41dd..a10ea1a2 100755 --- a/dh_installinit +++ b/dh_installinit @@ -364,9 +364,3 @@ Steve Langasek Michael Stapelberg =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installlogcheck b/dh_installlogcheck index b243c6ef..646b7ef4 100755 --- a/dh_installlogcheck +++ b/dh_installlogcheck @@ -87,9 +87,3 @@ This program is a part of debhelper. Jon Middleton =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installlogrotate b/dh_installlogrotate index 8e430860..0c43d8fd 100755 --- a/dh_installlogrotate +++ b/dh_installlogrotate @@ -59,9 +59,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installman b/dh_installman index b931b0e3..4089d1d6 100755 --- a/dh_installman +++ b/dh_installman @@ -360,9 +360,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installmanpages b/dh_installmanpages index 3f5a949a..b7bbe8d5 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -204,9 +204,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installmenu b/dh_installmenu index 9499ad37..a534782c 100755 --- a/dh_installmenu +++ b/dh_installmenu @@ -104,9 +104,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installmime b/dh_installmime index 25da89e2..a1fd2adf 100755 --- a/dh_installmime +++ b/dh_installmime @@ -69,9 +69,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installmodules b/dh_installmodules index 6f7630a1..bb48553a 100755 --- a/dh_installmodules +++ b/dh_installmodules @@ -115,9 +115,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installpam b/dh_installpam index 92c26214..2cdcb2a5 100755 --- a/dh_installpam +++ b/dh_installpam @@ -68,9 +68,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installppp b/dh_installppp index 39e41ca0..21d99a72 100755 --- a/dh_installppp +++ b/dh_installppp @@ -74,9 +74,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installudev b/dh_installudev index 41870e2f..3e0ddde7 100755 --- a/dh_installudev +++ b/dh_installudev @@ -107,9 +107,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installwm b/dh_installwm index 469e9352..1bd49dad 100755 --- a/dh_installwm +++ b/dh_installwm @@ -128,9 +128,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_installxfonts b/dh_installxfonts index 484aaedb..e7f2b715 100755 --- a/dh_installxfonts +++ b/dh_installxfonts @@ -98,9 +98,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_link b/dh_link index ac67109a..1da51d1c 100755 --- a/dh_link +++ b/dh_link @@ -169,9 +169,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_lintian b/dh_lintian index 4439334c..2c6608d8 100755 --- a/dh_lintian +++ b/dh_lintian @@ -68,9 +68,3 @@ L Steve Robbins =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_listpackages b/dh_listpackages index 6da8b5af..3fb4f150 100755 --- a/dh_listpackages +++ b/dh_listpackages @@ -39,9 +39,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_makeshlibs b/dh_makeshlibs index 0dc2027b..c2d50bd7 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -295,9 +295,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_md5sums b/dh_md5sums index 344c9adf..887e2134 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -115,9 +115,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_missing b/dh_missing index 5218e3d5..c78bf6d7 100755 --- a/dh_missing +++ b/dh_missing @@ -180,9 +180,3 @@ This program is a part of debhelper. Michael Stapelberg =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_movefiles b/dh_movefiles index de9facbe..1014c084 100755 --- a/dh_movefiles +++ b/dh_movefiles @@ -167,9 +167,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_perl b/dh_perl index 7a4c1f23..8a70c99e 100755 --- a/dh_perl +++ b/dh_perl @@ -162,9 +162,3 @@ This program is a part of debhelper. Brendan O'Dea =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_prep b/dh_prep index 1fb7f27a..57410d54 100755 --- a/dh_prep +++ b/dh_prep @@ -76,9 +76,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_shlibdeps b/dh_shlibdeps index cfef36f1..82f7d1ea 100755 --- a/dh_shlibdeps +++ b/dh_shlibdeps @@ -166,9 +166,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_strip b/dh_strip index 890e2dfd..c2741c50 100755 --- a/dh_strip +++ b/dh_strip @@ -406,9 +406,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_testdir b/dh_testdir index ed576e27..4c8715d3 100755 --- a/dh_testdir +++ b/dh_testdir @@ -62,9 +62,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_testroot b/dh_testroot index 6b2c7382..557207ee 100755 --- a/dh_testroot +++ b/dh_testroot @@ -36,9 +36,3 @@ This program is a part of debhelper. Joey Hess =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_ucf b/dh_ucf index a96b3e8d..638ca1a0 100755 --- a/dh_ucf +++ b/dh_ucf @@ -94,9 +94,3 @@ Joey Hess Jeroen Schot =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_update_autotools_config b/dh_update_autotools_config index 17ee724a..1c14ba8f 100755 --- a/dh_update_autotools_config +++ b/dh_update_autotools_config @@ -69,9 +69,3 @@ This program is a part of debhelper. Niels Thykier =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/dh_usrlocal b/dh_usrlocal index 4bf6ab80..a5527880 100755 --- a/dh_usrlocal +++ b/dh_usrlocal @@ -124,9 +124,3 @@ This program is a part of debhelper. Andrew Stribblehill =cut - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/buildsystems/01-build-system-basic-api.t b/t/buildsystems/01-build-system-basic-api.t index 02a6cc65..dfb26d22 100755 --- a/t/buildsystems/01-build-system-basic-api.t +++ b/t/buildsystems/01-build-system-basic-api.t @@ -41,9 +41,3 @@ sub build_system_path_apis { "/tmp/relative/path", "_rel2rel abs no7"); } - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/buildsystems/02-make-jobserver-makeflags.t b/t/buildsystems/02-make-jobserver-makeflags.t index 56514529..9469759e 100755 --- a/t/buildsystems/02-make-jobserver-makeflags.t +++ b/t/buildsystems/02-make-jobserver-makeflags.t @@ -55,9 +55,3 @@ sub test_clean_jobserver_makeflags { is($ENV{MAKEFLAGS}, $expected, $test); } - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/buildsystems/03-bs-auto-buildable.t b/t/buildsystems/03-bs-auto-buildable.t index 83884c18..77845ced 100755 --- a/t/buildsystems/03-bs-auto-buildable.t +++ b/t/buildsystems/03-bs-auto-buildable.t @@ -214,8 +214,3 @@ sub run_autoselection_tests { }; -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/buildsystems/04-dh_auto_do_autoconf.t b/t/buildsystems/04-dh_auto_do_autoconf.t index e3bbceeb..a1346e42 100755 --- a/t/buildsystems/04-dh_auto_do_autoconf.t +++ b/t/buildsystems/04-dh_auto_do_autoconf.t @@ -86,8 +86,3 @@ dh_auto_do_autoconf('autoconf'); dh_auto_do_autoconf('autoconf', 'bld/dir', configure_args => [ "--extra-autoconf-configure-arg" ]); ok ( ! -e 'bld', "bld got deleted too" ); -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/buildsystems/05-load-build-system.t b/t/buildsystems/05-load-build-system.t index 0004176b..447241b6 100755 --- a/t/buildsystems/05-load-build-system.t +++ b/t/buildsystems/05-load-build-system.t @@ -53,8 +53,3 @@ sub try_load_bs { return \@lines; } -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/buildsystems/06-buildsystem-mkdir-rmdir.t b/t/buildsystems/06-buildsystem-mkdir-rmdir.t index 8dc36f75..c13b2536 100755 --- a/t/buildsystems/06-buildsystem-mkdir-rmdir.t +++ b/t/buildsystems/06-buildsystem-mkdir-rmdir.t @@ -49,8 +49,3 @@ sub do_rmdir_builddir { $system->rmdir_builddir(); } -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/buildsystems/load-bs.pl b/t/buildsystems/load-bs.pl index d8f56c2a..aeb5ea80 100755 --- a/t/buildsystems/load-bs.pl +++ b/t/buildsystems/load-bs.pl @@ -14,8 +14,3 @@ if (defined $bs) { foreach (sort keys %$bs); } -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh-lib.t b/t/dh-lib.t index 0101f030..d1eb355a 100755 --- a/t/dh-lib.t +++ b/t/dh-lib.t @@ -37,8 +37,3 @@ each_compat_subtest { ok(rm_files('debian/testpackage.postinst.debhelper')); } -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh_install/01-basics.t b/t/dh_install/01-basics.t index 863c92c9..b266196f 100755 --- a/t/dh_install/01-basics.t +++ b/t/dh_install/01-basics.t @@ -31,8 +31,3 @@ each_compat_subtest { remove_tree('debian/debhelper', 'debian/tmp'); }; -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh_install/03-866570-dont-install-from-host.t b/t/dh_install/03-866570-dont-install-from-host.t index 33834d9b..92345d1d 100755 --- a/t/dh_install/03-866570-dont-install-from-host.t +++ b/t/dh_install/03-866570-dont-install-from-host.t @@ -22,8 +22,3 @@ each_compat_subtest { remove_tree('debian/debhelper', 'debian/tmp'); }; -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh_installdocs/dh_installdocs.t b/t/dh_installdocs/dh_installdocs.t index 34d5a3b4..86746cfc 100755 --- a/t/dh_installdocs/dh_installdocs.t +++ b/t/dh_installdocs/dh_installdocs.t @@ -78,8 +78,3 @@ each_compat_subtest { remove_tree(qw(debian/foo debian/bar debian/baz)); }; -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh_installinit/dh_installinit.t b/t/dh_installinit/dh_installinit.t index 098107cd..20860f19 100755 --- a/t/dh_installinit/dh_installinit.t +++ b/t/dh_installinit/dh_installinit.t @@ -44,8 +44,3 @@ each_compat_from_and_above_subtest(11, sub { ok(run_dh_tool('dh_clean')); }); -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh_link/01-basic.t b/t/dh_link/01-basic.t index 220ea19d..88c8e49c 100755 --- a/t/dh_link/01-basic.t +++ b/t/dh_link/01-basic.t @@ -48,8 +48,3 @@ each_compat_subtest { ok(readlink("debian/debhelper/usr/bin/2"),"../lib/1"); }; -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh_link/02-346405.t b/t/dh_link/02-346405.t index ce64ddd9..95053ca8 100755 --- a/t/dh_link/02-346405.t +++ b/t/dh_link/02-346405.t @@ -27,8 +27,3 @@ each_compat_subtest { ok(readlink("debian/debhelper/usr/lib/geant4/d"), "/"); }; -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh_missing/01-no-missing.t b/t/dh_missing/01-no-missing.t index 2528d2d5..e3cd3116 100755 --- a/t/dh_missing/01-no-missing.t +++ b/t/dh_missing/01-no-missing.t @@ -26,8 +26,3 @@ each_compat_subtest { ok(run_dh_tool('dh_missing', '--fail-missing'), 'dh_missing failed'); }; -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh_missing/02-fail-on-missing.t b/t/dh_missing/02-fail-on-missing.t index fa1a6869..711ed984 100755 --- a/t/dh_missing/02-fail-on-missing.t +++ b/t/dh_missing/02-fail-on-missing.t @@ -31,8 +31,3 @@ each_compat_subtest { is($exitcode, 2, 'dh_missing exited with exit code 2'); }; -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/dh_missing/03-dh_install-redirection.t b/t/dh_missing/03-dh_install-redirection.t index ce56fec1..2235b086 100755 --- a/t/dh_missing/03-dh_install-redirection.t +++ b/t/dh_missing/03-dh_install-redirection.t @@ -28,8 +28,3 @@ each_compat_up_to_and_incl_subtest(10, sub { '-X', 'more', '--exclude', 'lots', '--fail-missing')); }); -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/maintscript.t b/t/maintscript.t index 8e421585..a69c99c7 100755 --- a/t/maintscript.t +++ b/t/maintscript.t @@ -38,8 +38,3 @@ EOF } }); -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/override_target.t b/t/override_target.t index 2e4a4548..b56c9862 100755 --- a/t/override_target.t +++ b/t/override_target.t @@ -23,9 +23,3 @@ system("chmod +x t/tmp/debian/rules"); my @output=`cd t/tmp && debian/rules build 2>&1`; ok(grep { m/override called/ } @output); system("rm -rf t/tmp"); - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/pod.t b/t/pod.t index b5b5694e..8a9c0bf0 100755 --- a/t/pod.t +++ b/t/pod.t @@ -8,9 +8,3 @@ eval 'use Test::Pod'; plan skip_all => 'Test::Pod required' if $@; all_pod_files_ok(grep { -x $_ } glob 'dh_*'); - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/size.t b/t/size.t index 94d45dfd..79564af8 100755 --- a/t/size.t +++ b/t/size.t @@ -29,9 +29,3 @@ foreach my $file (@progs) { ok($lines < 200, $file); ok($maxlength < 160, $file); } - -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: diff --git a/t/syntax/syntax-progs.t b/t/syntax/syntax-progs.t index 37ece051..0dbdb2a2 100755 --- a/t/syntax/syntax-progs.t +++ b/t/syntax/syntax-progs.t @@ -22,8 +22,3 @@ foreach my $file (@targets) { or diag("$file failed syntax check"); } -# Local Variables: -# indent-tabs-mode: t -# tab-width: 4 -# cperl-indent-level: 4 -# End: -- cgit v1.2.3 From 1d94471647f372c55bfed8e33f9e6d33c30ab85c Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Fri, 7 Jul 2017 10:43:25 +0000 Subject: Dh_Lib: Embed tool versions into auto-generated snippets Use $main::VERSION to determine the version of the tool and embed that into auto-generated snippets (e.g. via autoscript). This enables lintian to extract the tool + version and display it on: https://lintian.debian.org/tags/debhelper-autoscript-in-maintainer-scripts.html Signed-off-by: Niels Thykier --- Debian/Debhelper/Dh_Lib.pm | 33 ++++++++++++++++++++++++++++----- debian/changelog | 3 +++ dh | 2 ++ dh_auto_build | 3 +++ dh_auto_clean | 2 ++ dh_auto_configure | 3 +++ dh_auto_install | 2 ++ dh_auto_test | 2 ++ dh_bugfiles | 2 ++ dh_builddeb | 2 ++ dh_clean | 2 ++ dh_compress | 2 ++ dh_fixperms | 2 ++ dh_gconf | 2 ++ dh_gencontrol | 2 ++ dh_icons | 2 ++ dh_install | 2 ++ dh_installcatalogs | 2 ++ dh_installchangelogs | 2 ++ dh_installcron | 2 ++ dh_installdeb | 2 ++ dh_installdebconf | 2 ++ dh_installdirs | 2 ++ dh_installdocs | 2 ++ dh_installemacsen | 2 ++ dh_installexamples | 2 ++ dh_installgsettings | 2 ++ dh_installifupdown | 2 ++ dh_installinfo | 2 ++ dh_installinit | 2 ++ dh_installlogcheck | 2 ++ dh_installlogrotate | 2 ++ dh_installman | 2 ++ dh_installmanpages | 2 ++ dh_installmenu | 2 ++ dh_installmime | 2 ++ dh_installmodules | 2 ++ dh_installpam | 2 ++ dh_installppp | 2 ++ dh_installudev | 2 ++ dh_installwm | 2 ++ dh_installxfonts | 2 ++ dh_link | 2 ++ dh_lintian | 2 ++ dh_listpackages | 2 ++ dh_makeshlibs | 2 ++ dh_md5sums | 2 ++ dh_missing | 2 ++ dh_movefiles | 2 ++ dh_perl | 2 ++ dh_prep | 2 ++ dh_shlibdeps | 2 ++ dh_strip | 2 ++ dh_systemd_enable | 2 ++ dh_systemd_start | 2 ++ dh_testdir | 2 ++ dh_testroot | 3 +++ dh_ucf | 2 ++ dh_update_autotools_config | 2 ++ dh_usrlocal | 2 ++ doc/PROGRAMMING | 9 ++++++--- 61 files changed, 156 insertions(+), 8 deletions(-) (limited to 'dh_installifupdown') diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 1b97f3d9..6ef9c371 100644 --- a/Debian/Debhelper/Dh_Lib.pm +++ b/Debian/Debhelper/Dh_Lib.pm @@ -21,6 +21,8 @@ use constant { 'MAX_COMPAT_LEVEL' => 11, # Magic value for xargs 'XARGS_INSERT_PARAMS_HERE' => \'', #'# Hi emacs. + # Magic value for debhelper tools to request "current version" + 'DH_BUILTIN_VERSION' => \'', #'# Hi emacs. }; my %NAMED_COMPAT_LEVELS = ( @@ -60,13 +62,14 @@ use vars qw(@EXPORT %dh); &rm_files &make_symlink_raw_target &on_items_in_parallel XARGS_INSERT_PARAMS_HERE &glob_expand_error_handler_reject &glob_expand_error_handler_warn_and_discard &glob_expand - &glob_expand_error_handler_silently_ignore + &glob_expand_error_handler_silently_ignore DH_BUILTIN_VERSION ); # The Makefile changes this if debhelper is installed in a PREFIX. my $prefix="/usr"; my $MAX_PROCS = get_buildoption("parallel") || 1; +my $DH_TOOL_VERSION; sub init { my %params=@_; @@ -758,6 +761,24 @@ sub pkgfilename { } } +sub _tool_version { + return $DH_TOOL_VERSION if defined($DH_TOOL_VERSION); + if (defined($main::VERSION)) { + $DH_TOOL_VERSION = $main::VERSION; + } + if (defined($DH_TOOL_VERSION) and $DH_TOOL_VERSION eq DH_BUILTIN_VERSION) { + my $version = "UNRELEASED-${\MAX_COMPAT_LEVEL}"; + eval { + require Debian::Debhelper::Dh_Version; + $version = $Debian::Debhelper::Dh_Version::version; + }; + $DH_TOOL_VERSION = $version; + } else { + $DH_TOOL_VERSION //= 'UNDECLARED'; + } + return $DH_TOOL_VERSION; +} + # Automatically add a shell script snippet to a debian script. # Only works if the script has #DEBHELPER# in it. # @@ -773,6 +794,7 @@ sub autoscript { my $filename=shift; my $sed=shift || ""; + my $tool_version = _tool_version(); # This is the file we will modify. my $outfile="debian/".pkgext($package)."$script.debhelper"; @@ -794,14 +816,14 @@ sub autoscript { if (-e $outfile && ($script eq 'postrm' || $script eq 'prerm') && !compat(5)) { # Add fragments to top so they run in reverse order when removing. - complex_doit("echo \"# Automatically added by ".basename($0)."\"> $outfile.new"); + complex_doit("echo \"# Automatically added by ".basename($0)."/${tool_version}\"> $outfile.new"); autoscript_sed($sed, $infile, "$outfile.new"); complex_doit("echo '# End automatically added section' >> $outfile.new"); complex_doit("cat $outfile >> $outfile.new"); rename_path("${outfile}.new", $outfile); } else { - complex_doit("echo \"# Automatically added by ".basename($0)."\">> $outfile"); + complex_doit("echo \"# Automatically added by ".basename($0)."/${tool_version}\">> $outfile"); autoscript_sed($sed, $infile, $outfile); complex_doit("echo '# End automatically added section' >> $outfile"); } @@ -832,7 +854,7 @@ sub autoscript_sed { sub autotrigger { my ($package, $trigger_type, $trigger_target) = @_; - my ($triggers_file, $ifd); + my ($triggers_file, $ifd, $tool_version); if (not exists($VALID_TRIGGER_TYPES{$trigger_type})) { require Carp; @@ -840,6 +862,7 @@ sub autoscript_sed { } return if $dh{NO_ACT}; + $tool_version = _tool_version(); $triggers_file = generated_file($package, 'triggers'); if ( -f $triggers_file ) { open($ifd, '<', $triggers_file) @@ -856,7 +879,7 @@ sub autoscript_sed { }x; print {$ofd} $line; } - print {$ofd} '# Triggers added by ' . basename($0) . "\n"; + print {$ofd} '# Triggers added by ' . basename($0) . "/${tool_version}\n"; print {$ofd} "${trigger_type} ${trigger_target}\n"; close($ofd) or error("closing ${triggers_file}.new failed: $!"); close($ifd); diff --git a/debian/changelog b/debian/changelog index ee9c3f30..5abbf644 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ debhelper (10.6.3) UNRELEASED; urgency=medium "dpkg-parsechangelog | grep". * debhelper.pod: Use substitution to ensure examples always use the recommended compatibility level. + * Dh_Lib.pm: Embed tool versions into autoscripts so lintian can + extract and display them. Tools that want to rely on this + feature should set "$main::VERSION" to the version of the tool. -- Niels Thykier Wed, 05 Jul 2017 15:51:48 +0000 diff --git a/dh b/dh index 4200af28..e6d81cd6 100755 --- a/dh +++ b/dh @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B I [B<--with> I[B<,>I ...]] [B<--list>] [S>] diff --git a/dh_auto_build b/dh_auto_build index bc932df2..c189a216 100755 --- a/dh_auto_build +++ b/dh_auto_build @@ -8,8 +8,11 @@ dh_auto_build - automatically builds a package use strict; use warnings; +use Debian::Debhelper::Dh_Lib; use Debian::Debhelper::Dh_Buildsystems; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [S>] [S I>] diff --git a/dh_auto_clean b/dh_auto_clean index 0f4ce092..e71448ee 100755 --- a/dh_auto_clean +++ b/dh_auto_clean @@ -11,6 +11,8 @@ use warnings; use Debian::Debhelper::Dh_Lib; use Debian::Debhelper::Dh_Buildsystems; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [S>] [S I>] diff --git a/dh_auto_configure b/dh_auto_configure index 8a2c23d2..4bd1b368 100755 --- a/dh_auto_configure +++ b/dh_auto_configure @@ -8,8 +8,11 @@ dh_auto_configure - automatically configure a package prior to building use strict; use warnings; +use Debian::Debhelper::Dh_Lib; use Debian::Debhelper::Dh_Buildsystems; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [S>] [S I>] diff --git a/dh_auto_install b/dh_auto_install index 5ca6a524..6b34eb19 100755 --- a/dh_auto_install +++ b/dh_auto_install @@ -13,6 +13,8 @@ use Debian::Debhelper::Dh_Buildsystems; use File::Spec; use Cwd; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [S>] [S I>] diff --git a/dh_auto_test b/dh_auto_test index 547a469c..a64bb2dc 100755 --- a/dh_auto_test +++ b/dh_auto_test @@ -11,6 +11,8 @@ use warnings; use Debian::Debhelper::Dh_Lib; use Debian::Debhelper::Dh_Buildsystems; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [S>] [S I>] diff --git a/dh_bugfiles b/dh_bugfiles index 32722777..62b9ac9f 100755 --- a/dh_bugfiles +++ b/dh_bugfiles @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [B<-A>] [S>] diff --git a/dh_builddeb b/dh_builddeb index 533006db..90dd4725 100755 --- a/dh_builddeb +++ b/dh_builddeb @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--destdir=>I] [B<--filename=>I] [S I>] diff --git a/dh_clean b/dh_clean index 7a058a71..11a00df0 100755 --- a/dh_clean +++ b/dh_clean @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-k>] [B<-d>] [B<-X>I] [S ...>] diff --git a/dh_compress b/dh_compress index 127178d3..b5b1fb36 100755 --- a/dh_compress +++ b/dh_compress @@ -12,6 +12,8 @@ use Cwd qw(getcwd abs_path); use File::Spec::Functions qw(abs2rel); use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-X>I] [B<-A>] [S ...>] diff --git a/dh_fixperms b/dh_fixperms index 20813e1f..6f7017aa 100755 --- a/dh_fixperms +++ b/dh_fixperms @@ -11,6 +11,8 @@ use warnings; use Config; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-X>I] diff --git a/dh_gconf b/dh_gconf index 4e4968ca..ba8f51ab 100755 --- a/dh_gconf +++ b/dh_gconf @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--priority=>I] diff --git a/dh_gencontrol b/dh_gencontrol index 8238a417..aae4b222 100755 --- a/dh_gencontrol +++ b/dh_gencontrol @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [S I>] diff --git a/dh_icons b/dh_icons index acbbd4ce..b7e84532 100755 --- a/dh_icons +++ b/dh_icons @@ -11,6 +11,8 @@ use warnings; use File::Find; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-n>] diff --git a/dh_install b/dh_install index 2b41deea..3cf24185 100755 --- a/dh_install +++ b/dh_install @@ -11,6 +11,8 @@ use warnings; use File::Find; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [B<-X>I] [B<--autodest>] [B<--sourcedir=>I] [S>] [S ... I>] diff --git a/dh_installcatalogs b/dh_installcatalogs index dc1fad93..f15a6878 100755 --- a/dh_installcatalogs +++ b/dh_installcatalogs @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + my $sgmlbasever = "1.28"; =head1 SYNOPSIS diff --git a/dh_installchangelogs b/dh_installchangelogs index bc20ec06..18b9bc0a 100755 --- a/dh_installchangelogs +++ b/dh_installchangelogs @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-k>] [B<-X>I] [I] diff --git a/dh_installcron b/dh_installcron index 9bc3d7a1..abfdefe2 100755 --- a/dh_installcron +++ b/dh_installcron @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--name=>I] diff --git a/dh_installdeb b/dh_installdeb index fc81147d..60b1fbb8 100755 --- a/dh_installdeb +++ b/dh_installdeb @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] diff --git a/dh_installdebconf b/dh_installdebconf index ba2e9bc8..a8cf0409 100755 --- a/dh_installdebconf +++ b/dh_installdebconf @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-n>] [S I>] diff --git a/dh_installdirs b/dh_installdirs index 222968ce..7254df16 100755 --- a/dh_installdirs +++ b/dh_installdirs @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-A>] [S ...>] diff --git a/dh_installdocs b/dh_installdocs index 4b9cdcb4..bb2616c1 100755 --- a/dh_installdocs +++ b/dh_installdocs @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-A>] [B<-X>I] [S ...>] diff --git a/dh_installemacsen b/dh_installemacsen index 96e77100..fcae6dfe 100755 --- a/dh_installemacsen +++ b/dh_installemacsen @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-n>] [B<--priority=>I] [B<--flavor=>I] diff --git a/dh_installexamples b/dh_installexamples index bb02d915..530e03de 100755 --- a/dh_installexamples +++ b/dh_installexamples @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-A>] [B<-X>I] [S ...>] diff --git a/dh_installgsettings b/dh_installgsettings index 05c0b339..db0d1032 100755 --- a/dh_installgsettings +++ b/dh_installgsettings @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--priority=>] diff --git a/dh_installifupdown b/dh_installifupdown index 7114a26b..bd0aaf44 100755 --- a/dh_installifupdown +++ b/dh_installifupdown @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--name=>I] diff --git a/dh_installinfo b/dh_installinfo index 33137ed3..dbef7de6 100755 --- a/dh_installinfo +++ b/dh_installinfo @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-A>] [S ...>] diff --git a/dh_installinit b/dh_installinit index a10ea1a2..02282e0d 100755 --- a/dh_installinit +++ b/dh_installinit @@ -11,6 +11,8 @@ use warnings; use Debian::Debhelper::Dh_Lib; use File::Find; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--name=>I] [B<-n>] [B<-R>] [B<-r>] [B<-d>] [S I>] diff --git a/dh_installlogcheck b/dh_installlogcheck index 646b7ef4..9b8473e8 100755 --- a/dh_installlogcheck +++ b/dh_installlogcheck @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] diff --git a/dh_installlogrotate b/dh_installlogrotate index 0c43d8fd..ca561bd5 100755 --- a/dh_installlogrotate +++ b/dh_installlogrotate @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--name=>I] diff --git a/dh_installman b/dh_installman index ead17526..72606604 100755 --- a/dh_installman +++ b/dh_installman @@ -11,6 +11,8 @@ use warnings; use File::Find; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [S ...>] diff --git a/dh_installmanpages b/dh_installmanpages index b7bbe8d5..22c669ef 100755 --- a/dh_installmanpages +++ b/dh_installmanpages @@ -11,6 +11,8 @@ use warnings; use File::Find; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [S ...>] diff --git a/dh_installmenu b/dh_installmenu index a534782c..b4464a27 100755 --- a/dh_installmenu +++ b/dh_installmenu @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-n>] diff --git a/dh_installmime b/dh_installmime index a1fd2adf..eb447869 100755 --- a/dh_installmime +++ b/dh_installmime @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] diff --git a/dh_installmodules b/dh_installmodules index bb48553a..e24f6ea2 100755 --- a/dh_installmodules +++ b/dh_installmodules @@ -11,6 +11,8 @@ use warnings; use Debian::Debhelper::Dh_Lib; use File::Find; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-n>] [B<--name=>I] diff --git a/dh_installpam b/dh_installpam index 2cdcb2a5..256f7ab8 100755 --- a/dh_installpam +++ b/dh_installpam @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--name=>I] diff --git a/dh_installppp b/dh_installppp index 21d99a72..9eb09051 100755 --- a/dh_installppp +++ b/dh_installppp @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--name=>I] diff --git a/dh_installudev b/dh_installudev index 3e0ddde7..01d0f9d9 100755 --- a/dh_installudev +++ b/dh_installudev @@ -11,6 +11,8 @@ use warnings; use Debian::Debhelper::Dh_Lib; use File::Find; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-n>] [B<--name=>I] [B<--priority=>I] diff --git a/dh_installwm b/dh_installwm index 1bd49dad..4290b757 100755 --- a/dh_installwm +++ b/dh_installwm @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-n>] [B<--priority=>I] [S ...>] diff --git a/dh_installxfonts b/dh_installxfonts index e7f2b715..cc05aa56 100755 --- a/dh_installxfonts +++ b/dh_installxfonts @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] diff --git a/dh_link b/dh_link index 1da51d1c..7e2fe3ba 100755 --- a/dh_link +++ b/dh_link @@ -11,6 +11,8 @@ use warnings; use File::Find; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-A>] [B<-X>I] [S ...>] diff --git a/dh_lintian b/dh_lintian index 2c6608d8..fb3bdbf3 100755 --- a/dh_lintian +++ b/dh_lintian @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] diff --git a/dh_listpackages b/dh_listpackages index 3fb4f150..170f16b8 100755 --- a/dh_listpackages +++ b/dh_listpackages @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] diff --git a/dh_makeshlibs b/dh_makeshlibs index c2d50bd7..7f7bf59c 100755 --- a/dh_makeshlibs +++ b/dh_makeshlibs @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-m>I] [B<-V>I<[dependencies]>] [B<-n>] [B<-X>I] [S I>] diff --git a/dh_md5sums b/dh_md5sums index 887e2134..b3a3a741 100755 --- a/dh_md5sums +++ b/dh_md5sums @@ -11,6 +11,8 @@ use warnings; use Cwd; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-x>] [B<-X>I] [B<--include-conffiles>] diff --git a/dh_missing b/dh_missing index c78bf6d7..f882fb8e 100755 --- a/dh_missing +++ b/dh_missing @@ -11,6 +11,8 @@ use warnings; use File::Find; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [B<-X>I] [B<--sourcedir=>I] [S>] diff --git a/dh_movefiles b/dh_movefiles index 1014c084..7c5c8ffd 100755 --- a/dh_movefiles +++ b/dh_movefiles @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--sourcedir=>I] [B<-X>I] [S ...>] diff --git a/dh_perl b/dh_perl index 8a70c99e..b536099d 100755 --- a/dh_perl +++ b/dh_perl @@ -12,6 +12,8 @@ use Config; use File::Find; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-d>] [S ...>] diff --git a/dh_prep b/dh_prep index 57410d54..518b6eb7 100755 --- a/dh_prep +++ b/dh_prep @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-X>I] diff --git a/dh_shlibdeps b/dh_shlibdeps index 82f7d1ea..0e847c66 100755 --- a/dh_shlibdeps +++ b/dh_shlibdeps @@ -11,6 +11,8 @@ use warnings; use Cwd; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-L>I] [B<-l>I] [B<-X>I] [S I>] diff --git a/dh_strip b/dh_strip index c2741c50..bcc8e090 100755 --- a/dh_strip +++ b/dh_strip @@ -11,6 +11,8 @@ use warnings; use File::Find; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-X>I] [B<--dbg-package=>I] [B<--keep-debug>] diff --git a/dh_systemd_enable b/dh_systemd_enable index b89c9518..9a256b0c 100755 --- a/dh_systemd_enable +++ b/dh_systemd_enable @@ -11,6 +11,8 @@ use warnings; use Debian::Debhelper::Dh_Lib; use File::Find; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--no-enable>] [B<--name=>I] [S ...>] diff --git a/dh_systemd_start b/dh_systemd_start index 46c14a7d..740a3117 100755 --- a/dh_systemd_start +++ b/dh_systemd_start @@ -12,6 +12,8 @@ use Debian::Debhelper::Dh_Lib; use File::Find; use Cwd qw(getcwd abs_path); +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<--restart-after-upgrade>] [B<--no-stop-on-upgrade>] [S ...>] diff --git a/dh_testdir b/dh_testdir index 4c8715d3..4fb5a9cf 100755 --- a/dh_testdir +++ b/dh_testdir @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [S ...>] diff --git a/dh_testroot b/dh_testroot index 557207ee..ed324e8c 100755 --- a/dh_testroot +++ b/dh_testroot @@ -19,6 +19,9 @@ L use strict; use warnings; use Debian::Debhelper::Dh_Lib; + +our $VERSION = DH_BUILTIN_VERSION; + inhibit_log(); if ($< != 0) { diff --git a/dh_ucf b/dh_ucf index 638ca1a0..4f940dc1 100755 --- a/dh_ucf +++ b/dh_ucf @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-n>] diff --git a/dh_update_autotools_config b/dh_update_autotools_config index 1c14ba8f..d9ce75a1 100755 --- a/dh_update_autotools_config +++ b/dh_update_autotools_config @@ -10,6 +10,8 @@ use strict; use warnings; use Debian::Debhelper::Dh_Lib; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] diff --git a/dh_usrlocal b/dh_usrlocal index a5527880..86f2bd99 100755 --- a/dh_usrlocal +++ b/dh_usrlocal @@ -12,6 +12,8 @@ use Debian::Debhelper::Dh_Lib; use File::Find; use File::stat; +our $VERSION = DH_BUILTIN_VERSION; + =head1 SYNOPSIS B [S>] [B<-n>] diff --git a/doc/PROGRAMMING b/doc/PROGRAMMING index c5627b35..0cbe21a7 100644 --- a/doc/PROGRAMMING +++ b/doc/PROGRAMMING @@ -62,11 +62,14 @@ with the rest of debhelper if it does, so this is highly encouraged. Use Dh_Lib like this: -use Debian::Debhelper::Dh_Lib +use Debian::Debhelper::Dh_Lib; +our $VERSION = '1.0'; init(); -The init() function causes Dh_lib to parse the command line and do some other -initialization tasks. +The init() function causes Dh_lib to parse the command line and do +some other initialization tasks. If present, $main::VERSION will be +used to determine the version of the tool (e.g. embedded into +autoscript snippets). Argument processing: ------------------- -- cgit v1.2.3