summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2017-09-24dpkg-buildpackage: Rename withecho to run_cmdGuillem Jover1-15/+14
2017-09-24dpkg-buildpackage: Error out if --as-root is passed w/o --rules-targetGuillem Jover1-0/+5
2017-09-24scripts/t: Switch from IO::String to native open supportGuillem Jover2-17/+19
We can also remove the versioned dpkg-dev Build-Depends now that we do not use any build profile anymore.
2017-09-24scripts: Use split() with ' ' instead of /\s+/Guillem Jover5-7/+7
2017-09-24Dpkg::Control::HashCore: Use substr instead of a regexGuillem Jover1-2/+2
When we want to match the first character on a parsed control file line, using substr is more efficient than using a regex.
2017-09-24Dpkg::Control::FieldsCore: Do not execute code at import timeGuillem Jover1-11/+21
2017-09-24Dpkg::Control::FieldsCore: Remove dependency on Dpkg::ChecksumsGuillem Jover1-19/+39
2017-09-24Dpkg::Control::FieldsCore: Switch internal field name handling to lowercaseGuillem Jover1-157/+271
Change field name handling to always work with them as lowercase, add a new name key to store the capitalized form, and use that when we need to return that form instead of computing it on every instance.
2017-09-24scripts/t: Add new unit test for Dpkg::Control::FieldsGuillem Jover2-0/+248
2017-09-24Dpkg::Control::FieldsCore: Complete field order for all control typesGuillem Jover1-3/+8
The CTRL_PKG_DEB and CTRL_FILE_STATUS types were missing some allowed fields in their order list, which meant that the field information was not coherent.
2017-09-24Dpkg::Control::FieldsCore: Mark all missing CTRL_INDEX_* fields as allowedGuillem Jover1-6/+6
2017-09-24Dpkg::Control::Types: Move misplaced commentsGuillem Jover1-2/+2
2017-09-24Dpkg::Changelog::Parse: Disable compression when using the default fileGuillem Jover1-2/+11
2017-09-24Dpkg::Gettxt: Add support for new DPKG_NLS environment variableGuillem Jover1-7/+26
When set to 0, it will disable NLS (i18n) support in the Dpkg modules, and reduce the load chain.
2017-09-24Dpkg::File: Move file_lock() into a new Dpkg::Lock moduleGuillem Jover8-36/+94
This reduces the load chain for several Dpkg modules.
2017-09-24Dpkg::Vendor: Disable decompression support for origin filesGuillem Jover1-1/+1
These files are not supposed to be compressed, disabling decompression support gives a significant performance improvement for anything that is making use of vendor hooks, even if indirectly.
2017-09-24Dpkg::Interface::Storable: Add new option to disable compression supportGuillem Jover1-13/+27
Only load the Dpkg::Compression::FileHandle module if the compression option is enabled. Some control files are not supposed to ever be compressed, and making it possible to disable the compression support reduces substantially the amount of modules being loaded by default.
2017-09-24scripts/t: Avoid many function arguments in check_options()Guillem Jover1-97/+137
Fixes: Subroutines::ProhibitManyArgs Warned-by: perlcritic
2017-09-24Dpkg::Shlibs::SymbolFile: Avoid many function arguments in parse()Guillem Jover1-20/+24
Addresses: Subroutines::ProhibitManyArgs Warned-by: perlcritic
2017-09-24Dpkg::ErrorHandling: Move printforhelp initialization into usageerr()Guillem Jover1-2/+2
This way we remove code executed at import time.
2017-09-24Dpkg::ErrorHandling: Move color setup into report_prettyGuillem Jover1-3/+4
Call setup_color() only if we are going to print something, so that we remove code executed at import time.
2017-09-24Dpkg::ErrorHandling: Only load Term::ANSIColor if we are using colorsGuillem Jover1-2/+3
If we are not using colors we should not be imposing the additional load times over most modules using the error handling functionality.
2017-09-24Dpkg::Vendor: Only load Dpkg::BuildOptions and Dpkg::Arch if neededGuillem Jover2-7/+14
The Dpkg::Vendor-specific modules are loaded as part of many other modules load-chains. But not all parts of these modules are used, as they are hook-specific. Switch these two modules to be required only when we are going over the specific code paths needing them.
2017-09-24Dpkg::Compression::FileHandle: Only load POSIX if we need signal handlingGuillem Jover1-2/+3
If we are not using signal handling code we should not be imposing the additional load times over most modules using the transparent compression support, which currently includes all Dpkg::Control users.
2017-09-24Dpkg::Vendor::Ubuntu: Remove unused Dpkg::PathGuillem Jover1-1/+0
Missed in commit d62520090a7dafb123b6f1f4d4e9b61b75218057.
2017-09-24Dpkg::Source: Use Errno module instead of the slow to import POSIXGuillem Jover2-2/+2
2017-09-24perl: Remove unused use POSIX module importsGuillem Jover4-5/+0
2017-08-26Dpkg::Source::Package::V1: Re-enable upstream tar signatures when buildingGuillem Jover1-3/+1
2017-08-26Dpkg::Substvars: Make the warnings output deterministicChris Lamb1-1/+1
Closes: #870221 Signed-off-by: Guillem Jover <guillem@debian.org>
2017-08-26Dpkg::Vendor::Debian: Mark ppc64 as having builtin PIEGuillem Jover1-1/+1
2017-08-26perl: Use -> operator for function variablesGuillem Jover9-18/+18
2017-07-11Update German scripts translationHelge Kreutzmann1-2/+7
Update to 588t.
2017-07-11dpkg-genbuildinfo: Always use the binary version for the .buildinfo filenameGuillem Jover1-2/+3
We should use the binary (instead of the source) version for the .buildinfo filename, otherwise on binNMUs the filename will be wrong. Reported-by: Raphaël Hertzog <hertzog@debian.org>
2017-07-11dpkg-shlibdeps: Cache get_control_path() callsGuillem Jover1-1/+7
It is basically a thin-wrapper around «dpkg-query --control-path» and the repeated calls add up to quite a sum. Results from a poor-mans performance test on ~90 ELF binaries from piglit: * BEFORE: real 0m35.892s user 0m15.652s sys 0m18.584s * AFTER: real 0m10.884s user 0m7.316s sys 0m3.296s Closes: #846405 Based-on-patch-by: Niels Thykier <niels@thykier.net> Signed-off-by: Guillem Jover <guillem@debian.org>
2017-07-11po: Add all source files to POTFILES.in filesGuillem Jover1-0/+5
Even though some do not have any translation currently, not listing all the source files by principle means that we might start adding translated strings to existing files and forget to update the needed POTFILES.in. In this case also there were some files that did have translations.
2017-07-04dpkg-source: Remove unused Dpkg::Index module importGuillem Jover1-1/+0
2017-07-04Dpkg::Index: Add a new "unique_tuple_key" option to set_options()Guillem Jover1-10/+59
When the option is true it will set a get_func_key to a function that generates a unique tuple for that item. For CTRL_INDEX_SRC and CTRL_PKG_SRC use the Package and Version fields, for CTRL_INDEX_PKG and CTRL_PKG_DEB use the Package, Version and Architecture fields, all joined by "_" to index the entries. This behavior will become the default in dpkg 1.20.x. A deprecation warning will be emitted now requesting to set the option to true or to set a get_key_func options. Prompted-by: Johannes Schauer <josch@debian.org>
2017-07-04Dpkg::Index: Itemize the CTRL_* constants in the PODGuillem Jover1-9/+41
2017-05-20man: Document currently accepted syntax for changelogsGuillem Jover1-4/+4
The current implementation supports several comment lines, VCS and editor variable settings which get ignored. In addition, to be able to handle ancient changelog entries, the parser will detect those and ignore while preserving them for output. Closes: #858579 Reviewed-by: G. Branden Robinson <g.branden.robinson@gmail.com>
2017-05-20dpkg-shlibdeps: Remove unused my $file variableNiels Thykier1-1/+0
Signed-off-by: Niels Thykier <niels@thykier.net>
2017-05-20Test::Dpkg: Add new all_perl_modules functionGuillem Jover1-1/+9
2017-05-20test: Enable perlcritic Miscellanea::ProhibitTiesGuillem Jover2-2/+2
2017-05-20build: Install perl man pages in section 3perlGuillem Jover1-5/+7
2017-05-20Dpkg::Util: Remove and replace with core module List::UtilGuillem Jover19-115/+14
Our current minimal Perl version contains a new enough List::Util module implementing none and any, and several other functions.
2017-05-18Bump version to 1.19.0Guillem Jover1-1/+1
2017-05-18po: Regenerate .pot files and merge .po files with themGuillem Jover8-120/+108
2017-05-17Dpkg::Source::Package: Ignore debian/files and debian/files.new by defaultGuillem Jover2-4/+12
These are generated files, and these pathnames are part of the external interface. With the introduction of the buildinfo support, these get generated even on source builds, which means that it can disrupt previous workflows based on not cleaning the source tree, because they assumed that source-only builds did not have filesystem side-effects.
2017-05-17dpkg-genbuildinfo: Add duplicate prevention code for debian/filesGuillem Jover1-1/+13
We should do something similar to what dpkg-gencontrol is doing, by preventing duplicated entries for the same file with different versions. In this case, because the assumption is that there can ever only be one buildinfo file for a «source» or «all» build, but possibly multiple for arch-specific builds (from another build driver than dpkg-buildpackage), we filter based on this.
2017-05-17dpkg-maintscript-helper: Print all unowned files from a directoryGuillem Jover1-8/+23
Add a new internal command that is not part of the public interface, that takes care of checking whether a pathname is owned by a package. This internal command has some logic to prevent external abuse, by checking whether the parent has set a specific environment variable with a token that changes per release. The code will list all unowned files because xargs does not short-circuit on the first command erroring out, as long these do not terminate with an exit code of 255. Closes: #813454, #860238 Based-on-patch-by: Bastien ROUCARIÈS <roucaries.bastien@gmail.com>
2017-05-17dpkg-shlibdeps: Preserve the order when scanning symbols/shlibs filesGuillem Jover1-23/+51
The code was getting all the possible shared library pathnames for the wanted SONAME, but was not preserving the order carefully constructed in find_library(), so we were overwriting symbols/shlibs information when parsing multiple entries, and selecting the symbols/shlibs files randomly based on the perl hash order. This causes regressions when multiple packages provide the same SONAME on different directories. An example would be libc6:amd64 and libc6-amd64:i386. Fixes: commit a927295c93fb7a17742441aa863aaffcf4a351b5 Closes: #860979 Reported-by: Helmut Grohne <helmut@subdivi.de>