summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Compression
AgeCommit message (Collapse)AuthorFilesLines
2019-11-26Dpkg: Say class instead of object when appropriateGuillem Jover1-9/+9
These were referring to the type and not the instance, which makes using the incorrect nomenclature confusing.
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-05-20test: Enable perlcritic Miscellanea::ProhibitTiesGuillem Jover1-1/+1
2016-10-30Dpkg::Compression::FileHandle: Inherit from IO::File instead of FileHandleGuillem Jover1-3/+3
Avoid the indirection, and use the more current module.
2016-07-31Dpkg: Rename various private methods and functionsGuillem Jover1-8/+8
Rename private functions names, so that they have an underscore and more uniform names. This way it is made explicit that those functions are not expected to be used by external modules, and provide no guarantees on their API stability.
2016-07-03Dpkg::Compression::FileHandle: Fix example code in SYNOPSISGuillem Jover1-3/+5
Make it compile.
2016-07-03man, perl: Remove most AUTHOR sectionsGuillem Jover2-8/+0
These are strongly discouraged by the man-pages project, because they are redundant with the copyright notices, and tend to get out-of-sync. In addition their format is inconsitent. Just remove them in the same way we did for man pages in the past.
2015-07-28Dpkg: Remove my keyword from POD function prototypesGuillem Jover2-6/+6
2015-05-18scripts: Document dpkg version when module versions got bumpedGuillem Jover2-3/+3
This has two purposes, first it will make it easier to know if the module version needs to be bumped for the current development release, and second it will make it easier for users to know how "old" that module version is, and to which dpkg series and specific version it corresponds to.
2015-03-30perl: Rework use and exporter declarationsGuillem Jover1-3/+3
Place 'use' strict and warnings first, then Exporter 'our' declarations, then Test module imports, then system module imports, then Dpkg module imports, then 'use' parent and overload pragmas, separated by a blank line for each block. Split each exported symbol declaration into its own line to ease modifications.
2015-01-28Dpkg: Use shift instead of @_ on single argument unpackingGuillem Jover2-5/+5
2015-01-28scripts: Rename and deprecate _g function with g_Guillem Jover2-5/+5
The old function name was inconsistent with the other gettext family of short aliases which has already caused some code typos, and functions starting with underscore are considered by convention private in Perl.
2014-10-12scripts: Document all public module versions in a CHANGES sectionGuillem Jover2-0/+10
This makes it clear what is the current version of the module, and that it is a public interface.
2014-10-06scripts: Unpack arguments just onceGuillem Jover1-4/+6
Addresses Subroutines::RequireArgUnpacking. Warned-by: perlcritic
2014-10-06scripts: Use named variables instead of using the topic variableGuillem Jover1-3/+3
Switch code that uses roughly more explicit instances of the topic variable than implicit ones. Addresses BuiltinFunctions::ProhibitUselessTopic. Warned-by: perlcritic
2014-08-09Dpkg::Compression::FileHandle: Add %opts to ensure_open() memberGuillem Jover1-10/+23
This options will be passed down the the (un)compressor spawn()'s call.
2014-08-09scripts: Use // instead of || where appropriateGuillem Jover1-1/+1
Replace only safe usages, i.e. those that fallback on initialization values that evaluate to false anyway. Or when the API is explicit about the variable being undefined.
2014-08-09scripts: Use //= instead of ||= when appropriateGuillem Jover1-1/+1
Replace only safe usages, i.e. those that fallback on initialization values that evaluate to false anyway. Or when the API is explicit about the variable being undefined.
2014-01-15Dpkg::Compression::FileHandle: Use croak instead of error on programming errorsGuillem Jover1-2/+8
2013-12-07Use https:// URLs instead of http:// when possibleGuillem Jover2-2/+2
2013-12-04scripts: Use croak instead of internerr on programming errors in modulesGuillem Jover2-8/+14
Remove now unused internerr() function, replaced by croak which does a way better job. Addresses ErrorHandling::RequireCarping. Warned-by: perlcritic
2013-12-04perl: Switch to use low precedence boolean operators for error checksGuillem Jover1-4/+4
This will make it safe to remove parenthesis around builtins.
2013-11-24Dpkg::Compression: Add new compression_get_file_extension_regex() functionGuillem Jover1-1/+2
Replace all direct accesses to $compression_re_file_ext with calls to the new function, and mark the variable as deprecated to be removed on VERSION 2.00. Addresses Variables::ProhibitPackageVars. Warned-by: perlcritic
2013-08-11Dpkg::Compression::FileHandle: Fix typo in POD stringGuillem Jover1-1/+1
2013-06-22scripts: Inherit from parent instead of baseGuillem Jover1-1/+1
Use the lightweight parent instead of the bloated base.
2013-05-04Do not use double-quotes on strings that do not need interpolationGuillem Jover2-44/+44
Using double-quotes imposes a small performance penalty as the perl parser needs to check if any interpolation is needed. Use double-quotes only when the string contains single-quotes. Ideally we'd use double-quotes too for escaped meta-characters that might otherwise be confusing to immediately see if they need interpolation or not, but the policy does not (currently) allow to ignore these. Fixes ValuesAndExpressions::ProhibitInterpolationOfLiterals. Warned-by: perlcritic
2013-04-30Do not quote simple identifier hash keys in element accessesGuillem Jover2-76/+76
Addresses ValuesAndExpressions::ProhibitInterpolationOfLiterals. Warned-by: perlcritic
2013-04-27Dpkg::Compression::FileHandle: Import POSIX tags instead of explicit symbolsGuillem Jover1-1/+1
2013-04-27Dpkg::Compression::FileHandle: Handle new EOF method paramaterGuillem Jover1-1/+3
Do not forward the integer parameter passed to the EOF method since perl 5.12, as the IO::Handle::eof function rejects it. This problem has been latent because for example Dpkg::Source::Patch was importing the whole POSIX module, including the EOF constant, which shadowed the EOF method.
2013-04-19Use just 'return' instead of 'return undef' in perl codeGuillem Jover1-2/+2
This makes sure the functions always return the appropriate value independent of the context. Fixes Subroutines::ProhibitExplicitReturnUndef. Warned-by: perlcritic
2010-02-26Update POD documentation to indicate that it's using UTF-8 encodingRaphaël Hertzog2-1/+5
Also fix many spelling errors spotted by lintian.
2010-02-25libdpkg-perl: Make comp_prog and decomp_prog %COMP properties arraysGuillem Jover1-2/+2
This will allow storing arguments alongside the command names themselves.
2010-02-21Add $VERSION numbers to all perl modulesRaphaël Hertzog2-0/+4
Modules whose API should be stable have a version 1.00. The modules with version 0.01 are expected to have further API changes in the (near) future or are deemed to be useful mostly for dpkg-dev's internal usage.
2010-02-20Dpkg::Compression::FileHandle: fix behaviour when the file is not openRaphaël Hertzog1-6/+15
The syscall-like interface should not error out when the file has not been opened, it must simply return failure codes.
2010-02-19libdpkg-perl: Rename Dpkg::IPC::fork_and_exec() to Dpkg::IPC::spawn()Guillem Jover1-4/+4
2010-01-22Dpkg::Compression::Process: add POD documentationRaphaël Hertzog1-4/+92
2010-01-22Rename Dpkg::Compression::CompressedFile and Dpkg::Compression::CompressorRaphaël Hertzog2-24/+24
Dpkg::Compression::CompressedFile -> Dpkg::Compression::FileHandle Dpkg::Compression::Compressor -> Dpkg::Compression::Process The new names are more expressive and avoid repeating "Compress". Update all scripts and modules to use the new name.
2010-01-22Move handling of default compression method/level to Dpkg::CompressionRaphaël Hertzog1-21/+3
Dpkg::Compression now provides new functions to get/set the default compression method and the default compression level. There was no good reason to have it in Dpkg::Compression::Compressor in the first place. Factorize some code to verify validity of what should be a compression level in new function compression_is_valid_level($level). dpkg-source has been updated to cope with the changes.
2010-01-22Dpkg::Compression: new API based on public functionsRaphaël Hertzog2-7/+8
This API change requires lots of adjustements through the source code.
2010-01-22Dpkg::Compression::CompressedFile: update APIRaphaël Hertzog1-38/+319
Change the Dpkg::Compression::CompressedFile API to make it behave like a normal filehandle. Update all users of the object to use the new API.
2010-01-22Rename Dpkg::Source::CompressedFile into Dpkg::Compression::CompressedFileRaphaël Hertzog1-0/+149
2010-01-22Rename Dpkg::Source::Compressor into Dpkg::Compression::CompressorRaphaël Hertzog1-0/+131