summaryrefslogtreecommitdiff
path: root/Debian/Debhelper
AgeCommit message (Collapse)AuthorFilesLines
2017-06-24Dh_Lib: Ignore empty dpkg-architecture ENV variablesNiels Thykier1-2/+5
dpkg-architecture ignores them and instead computes the expected value (as if the variable had not been set in the first place). Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-24Dh_Lib: Use :unix with :gzip layerNiels Thykier1-2/+5
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-24Dh_Lib: Add on_selected_pkgs_in_parallelNiels Thykier1-3/+9
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-14Dh_Lib.pm: Make rename_path do nothing with --no-actNiels Thykier1-0/+6
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-14Dh_Lib: Fix export of on_pkgs_in_parallelNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-13Dh_Lib: Add on_pkgs_in_parallelNiels Thykier1-0/+55
Signed-off-by: Niels Thykier <niels@thykier.net> fixup! Dh_Lib: Add on_each_pkg_in_parallel
2017-06-13Avoid forking for most renamesNiels Thykier1-8/+18
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-13Dh_Lib: Migrate doit to internal file copyNiels Thykier1-2/+1
2017-06-13Dh_Lib: Use File::Copy instead of calling install(1)Niels Thykier1-8/+34
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-07Fix typo in error messageNiels Thykier2-2/+2
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 Stapelberg2-3/+40
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-06-04Dh_Lib: When passing -a/-i only, and there are no arch/indep packages, exitIain Lane1-0/+7
This was accidentally removed when optimising a common case. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-05-26Dh_Lib: Fix bug in dh's internal pkgfile APINiels Thykier1-3/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-05-06meson: Pass --wrap-mode=nodownloadNiels Thykier1-1/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-05-06makefile: disable parallel during make installNiels Thykier2-0/+10
Apparently, libtool+automake has a race condition in some cases, where automake will try to relink a binary about be installed before the library is installed. The bug is many years old and apparently not a priority, so work around it in debhelper. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-05-06Remove remains of dh_pysupportNiels Thykier1-7/+2
There is no point in loading a sequence that conditionally adds a tool that no longer exists. Just give a deprecation warning for people still explicitly loading it and drop the rest. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-25pkgfile: Do the $dh{NAME} rewrite laterNiels Thykier1-5/+13
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-12autoconf.pm: Pass --runstatedir=/run in compat 11Niels Thykier1-1/+2
Suggested-by: Michael Biebl <biebl@debian.org> Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-10pkgfile: Create a "secret" bulk check call for dhNiels Thykier1-12/+27
With "enough" packages, pkgfile is still a very expensive part of dh. Mostly due to the can_skip check which often need to call pkgfile to determine if a helper can be skipped. By doing a "bulk check" we can reduce that overhead by about roughly 50% (20-25% of dh's total runtime). Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-10Dh_Lib: Make -i/-a to avoid Getopt::LongNiels Thykier1-0/+18
If we need to use Getopt::Long, we pay a ~0.020s overhead (per helper). When doing dpkg-buildpackage -A/-B builds, dh will unconditionally pass -i/-a in those cases making each helper cost a bit more. With this change, we short-cut -i and -a (but not their long variants) so Dh_Lib can handle those directly. This reduces the overhead for -A/-B so they are comparable to -b. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-10pkgfile: Attempt to make it scale better for more pkgsNiels Thykier1-30/+44
Each time pkgfile is called, it will glob the debian/ dir (with a filter). Obviously this adds up, but unfortunately, glob is a lot cheaper in some cases than calling buildarch()/buildos(), which requires Dpkg::Arch. To solve this, we implement a cache of the globbing so we at most glob once per file name. Depending on that result, we will now unconditionally check for architecture qualified files or not. This should make both cases faster for 2+ packages. It should also apply to dh when checking if it can skip a command. When testing about 500 empty "transitional" packages, we save about 7-8% run time for dh_install. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-10getpackages: Use elsif's for mutually exclusive conditionsNiels Thykier1-14/+11
Minor tweak: Also remove the trailing "\s*" which is unnecessary as there is a s/\s+$// just prior to all of these ifs. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-08dh_prep: Clean up debian/.debhelper/generated/$pkgNiels Thykier1-0/+1
That way, the generated files behave like other temporary debhelper files (which is what they are designed to be). Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-08log_installed_files: Avoid writing files during --no-actNiels Thykier1-0/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-08log_installed_files: Support it being called multiple timesNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-08log_installed_files: Compute the helper name automaticallyNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-08Move dh_install’s --{list,fail}-missing to dh_missingMichael Stapelberg1-0/+14
This commit splits dh_install’s --list-missing and --fail-missing functionality into the separate helper dh_missing. To make this work, dh_install logs its source patterns and dh_missing reads these patterns, treating them as installed. This allows us to address #415396, i.e. recognize files installed by other helpers (e.g. dh_installman) as installed. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-04Add ninja to build systems and fix a testNiels Thykier1-0/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-04-04Add support for Meson build systemMichael Biebl3-0/+163
Meson is a new build system which is supposed to be extremly fast and, even more importantly, as user friendly as possible. It uses Ninja as backend to manage the actual build process. Closes: #795253 Signed-off-by: Michael Biebl <biebl@debian.org>
2017-03-04dh_auto_configure: wrong CMAKE_SYSTEM_NAME for kfreebsd cross-buildsSteven Chamberlain1-1/+1
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 Thykier2-6/+16
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-19Dh_Lib: Tweak an error messageNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-18Avoid calling dpkg-architecture on each unknown valueNiels Thykier1-6/+9
Call dpkg-architecture at most once (per process) - even if dpkg_architecture_value() is passed unknown variables. Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-18Dh_Lib: Parse "Multi-Arch:same" correctlyNiels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-18getpackages(): Make parsing of paragraphs field order-insensitiveNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-18makefile.pm: Disable stripping via INSTALL in compat 11Niels Thykier1-1/+7
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-02-18Set PKG_CONFIG for makefile buildsystemsNiels Thykier1-2/+3
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-22Make the build-stamp optional via a build-stamp sequenceNiels Thykier1-0/+17
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-06Dh_Lib.pm: Fix typo of positiveNiels Thykier1-2/+2
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-05Remove obsolete commentNiels Thykier1-1/+0
2016-10-03fix autoconf/cross regression from #836988Helmut Grohne1-9/+5
When adding the makefile buildsystem cross variables, the intention was that it would not affect non-makefile buildsystems (in particular no downstream buildsystems). However, the decision which buildsystem to use is done on a per-target basis. Thus a typical autoconf package will use the autoconf buildsystem for configure and test, but fall back to the makefile buildsystem for clean and build. Thus the cross variables were added for autoconf build as well, which broke the cross build of icu. The solution chosen here is to have autoconf take over build and clean from makefile as well by inheriting its methods. Thus the semantics stay unchanged with the exception of not adding the cross variables for build. All other children of the makefile buildsystem (including mkcmake) already take over all targets, so this issue really only affects autoconf. Fixes: 7ea67c9aace4 ("makefile.pm: Set CC+CXX to the host compilers when cross-building") Signed-off-by: Helmut Grohne <helmut@subdivi.de> Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-02Dh_Lib: Add a reset_perm_and_owner functionNiels Thykier1-5/+8
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-02Refactor install_dir usage to avoid the "if -d " testsNiels Thykier1-10/+5
They were not needed in the first place (as "install -d" DTRT). Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-02Deprecate compat levels before 9Niels Thykier1-1/+1
Signed-off-by: Niels Thykier <niels@thykier.net>
2016-10-01cmake.pm: Dump CMakeOutput and CMakeError on cmake errorsNiels Thykier1-0/+6
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-09-18makefile.pm: Set CC+CXX to the host compilers when cross-buildingNiels Thykier1-1/+15
Co-Author: Helmut Grohne <helmut@subdivi.de> Signed-off-by: Niels Thykier <niels@thykier.net>
2016-09-18cmake.pm: Set pkg-config and LIBDIR when cross-buildingJulian Andres Klode1-0/+2
Co-Author: Helmut Grohne <helmut@subdivi.de> Signed-off-by: Niels Thykier <niels@thykier.net>