summaryrefslogtreecommitdiff
path: root/scripts/t
AgeCommit message (Collapse)AuthorFilesLines
2013-03-18Dpkg: Fix OpenPGP armored signature parsingGuillem Jover6-2/+104
Change parsing code to honour RFC4880. Handle whitespaces at EOL, and correctly expect five trailing dashes on the Armor Header Lines. Closes: #695919 Reported-by: Ansgar Burchardt <ansgar@debian.org>
2012-10-19Dpkg::Substvars: Always fix up the source version in set_version_substvarsGuillem Jover1-1/+5
The caller can explicitly pass both versions, but the source version might still need to be fixed up, for example in case of legacy binNMUs (when not using the Binary-Only changelog field), whenever the binary version has been forced through dpkg-gencontrol, then just comparing if they are equal will not trigger the fix up, which will produce bogus source versions, affecting the Source field on binary packages. Instead, always fix up the source version, regardless of the versions matching or not. Regression introduced in commit 094d3a7e61e6fc1f5634d880957d18ed70954a60. Closes: #690823
2012-06-30Add support for binary-only key-value option in changelogsGuillem Jover1-1/+5
This allows to mark changelog entries as being for a binary-only upload, which implies there cannot be any source produced, and the binary version is going to be different to the source version. As such the version substvars will get different values, w/o needing to hardcode a specific syntax. Although we fallback to the old syntax just in case, for example to handle possible multiple consecutive binary-only entries w/o needing to complicate the code too much. Closes: #440094, #672723
2012-05-23Dpkg::Package: Add new perl moduleGuillem Jover1-0/+29
This includes a public function to validate package names.
2012-05-23Dpkg::Substvars: Rename no_warn() member function to mark_as_used()Guillem Jover1-1/+1
Keep the old name for backwards compatibility, but make it issue a warning.
2012-03-30Fix coding-styleGuillem Jover1-10/+10
2011-12-21dpkg-mergechangelogs: supplementary non-regression testMartin Packman5-2/+37
Add a test that ensures that dpkg-mergechangelogs deals correctly with invalid versions. Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
2011-12-13build: Reintroduce objdump pattern and tag test case data filesGuillem Jover4-7/+379
Generating these at check time causes several problems. It requires a system supporting versioned symbols and a GNU ld command line compatible linker. Those are not available for example on Mac OS X. Using libtool could have been an option to portably build the shared libraries, although that still does not provide versioned symbols where they are not available. The problem with libtool is that there's no sane way to refer to the actual built shared library on the build tree. Introduce a refresh-test-data target to be able to easily regenerate those files when needed, e.g. when the test suite changes. Reported-by: Stuart Ambler <stuart@zulazon.com>
2011-12-13scripts: Move single space objdump test case into a new data fileGuillem Jover3-1/+14
This will allow to regenerate the objdump.ls file.
2011-10-24Dpkg::Deps: Fix dependency evaluation logic to use arch qualifierRaphaël Hertzog1-3/+11
This required adding the Architecture and Multi-Arch values in Dpkg::Deps::KnownFacts and is thus an API extension.
2011-10-24Dpkg::Deps: Fix implications evaluation to use arch qualifiersRaphaël Hertzog1-1/+9
When evaluating implications, it's important to take into account the arch qualifier otherwise the dependency simplification code might strip dependencies that cannot be stripped without altering the meaning of the dependency. Sponsored-by: Linaro Limited
2011-09-08Dpkg::BuildOptions: enable usage of alternative variable namesRaphaël Hertzog1-1/+5
2011-08-20Dpkg::Compression: Change default values depending on the compressor usedGuillem Jover1-1/+11
This makes dpkg-source use more appropriate default compression values depending on the compressor used. Prompted-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
2011-08-20Fix spelling errorsGuillem Jover3-12/+12
Found by codespell.
2011-08-12Dpkg::Deps: fix simplification logic of union dependenciesRaphaël Hertzog1-1/+5
The code merging dependencies was wrongly updating the dependency that's not integrated in the resulting field. Reported-by: Andreas Metzler <ametzler@downhill.at.eu.org>
2011-07-29dpkg-mergechangelogs: fix test-suiteRaphaël Hertzog4-57/+57
In commit 5c233019cc770fb59671090d4a9462adb149921f I forgot to update the test-suite to match for the change of conflict markers. Doing this with this commit.
2011-06-25dpkg-source: add some supplementary checks of debian/controlRaphaël Hertzog2-0/+7
We're now ensuring that debian/control contains a source entry and at least one entry for a binary package. And we also ensure that the Architecture field is present. This a new restriction but it's really in-line with the change made in dpkg where we complain of the lack of this field. Reported-by: Niels Thykier <niels@thykier.net>
2011-04-03Dpkg::Version: update version_check to forbid versions starting with non digitsRaphaël Hertzog1-1/+5
Adapted the code to rely on the parsing done by the constructor to split the version number properly instead of redoing similar regexes in version_check(). Updated the test suite accordingly.
2010-11-25Merge branch 'sid' (through tag '1.15.8.6')Guillem Jover1-3/+4
Conflicts: debian/changelog m4/dpkg-funcs.m4 man/dpkg.1
2010-11-19libdpkg: Disallow versions starting with non-digitsGuillem Jover1-20/+20
Fail on strict parsing, and warn otherwise.
2010-11-19Cleanup white spacesGuillem Jover5-6/+0
Remove trailing spaces. Remove blank lines not separating different code blocks. Remove blank lines at the end of the file.
2010-10-03Add non-regression test for Dpkg::Version ensuring -0.6.5 << 0.9.1James Vega1-3/+4
dpkg treats "-0.6.5" as a version with only a revision component, so it compares less than any version with a version component > 0. Signed-off-by: James Vega <jamessan@debian.org> Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
2010-07-11build: Move dpkg_divert test case from scripts to srcGuillem Jover1-560/+0
2010-07-11build: Skip all dpkg-divert tests if the binary is not availableGuillem Jover1-0/+5
2010-07-03dpkg-divert: Rewrite in CGuillem Jover1-1/+1
2010-07-03dpkg-divert: Add new test-caseMikhail Gusarov1-0/+555
Devel::Cover reports 97% coverage. Remaining branches are hard-to-test without root privilege error handling. [guillem@debian.org: - Add new test into test_cases. - Run program from builddir. - Do not check for usage output on badusage. - Use note() instead of diag(). - Sort database and list output. - Skip some tests when under fakeroot. ] Signed-off-by: Guillem Jover <guillem@debian.org>
2010-06-28Dpkg::Changelog: fixed to cope properly with an entry of version "0"Raphaël Hertzog2-1/+7
The change of the boolean evaluation of Dpkg::Version introduced in 5b9f353b2940de751df47036608afbe71992d622 broke Dpkg::Changelog's ability to correctly export an entry with a version of "0". Add a non-regression test for this.
2010-06-09update-alternatives: rewritten in CRaphaël Hertzog1-367/+0
update-alternative has been rewritten as a mostly standalone C program. It has thus been moved to utils/ instead of scripts/ together with its README and its test suite. This rewrite is based on some initial conversion work done by Guillem Jover <guillem@debian.org>. The program now logs to /var/log/alternatives.log instead of dpkg.log. The logrotate file has been updated to deal with that file too.
2010-05-21Add tests for Ubuntu changelog parsingColin Watson6-3/+46
Ubuntu's changelog parsing is nearly identical to Debian's, but may emit an additional Launchpad-Bugs-Fixed header. Test that changelogs matching the appropriate regex are parsed correctly both for Debian and Ubuntu. To do this, we take copies of the standard origin files and add an internal mechanism allowing Dpkg::Vendor to be pointed at them; and we run 600_Dpkg_Changelog.t a second time with DEB_VENDOR set, to avoid duplicating lots of code. See the discussion in #536066 for background.
2010-04-30Dpkg::Version: fix boolean evaluation of the objectRaphaël Hertzog1-1/+8
In a boolean context, the object evaluates like the version string if the version is valid, otherwise it evaluates like undef. Document this behaviour and add non-regression test to ensure it's kept. This implicitly fix dpkg-shlibdeps who relies on the boolean evaluation of the object to decide whether or not a minimal version specification is needed or not.
2010-04-19dpkg-mergechangelogs: add non-regression testsRaphaël Hertzog8-0/+815
2010-02-25Add accent on Raphaël's name in several filesGuillem Jover2-4/+4
2010-02-24Dpkg::BuildOptions: provide an object oriented interfaceRaphaël Hertzog1-30/+32
Also update the test-suite and dpkg-buildpackage to match the new API. Increase $VERSION to 1.00 since it's supposed to be a stable API now.
2010-02-21Dpkg::Control::Info: provide an array representation of the objectRaphaël Hertzog1-1/+3
Add non-regression test for this interface.
2010-02-20Dpkg::Shlibs::*: rename parse() functionsRaphaël Hertzog1-8/+8
To avoid confusion with the parse() function expected by objects inheriting from Dpkg::Interface::Storable (which is supposed to restore the object from its serialized data), the various parse() functions have been renamed into something more explicit like analyze() for Dpkg::Shlibs::Objdump or parse_symbolspec() for Dpkg::Shlibs::Symbol.
2010-02-20Update Dpkg::Shlibs::SymbolFile to use Dpkg::Interface::StorableRaphaël Hertzog1-3/+3
In the process dump() is renamed output() and save() is dropped in favor of the version provided by Dpkg::Interface::Storable. load() is transformed in parse().
2010-02-20Update Dpkg::Substvars to use Dpkg::Interface::StorableRaphaël Hertzog1-1/+1
The parse() function is replaced by load() for most users.
2010-02-20Update Dpkg::Control::* to use Dpkg::Interface::StorableRaphaël Hertzog1-1/+1
This implies renaming parse_fh() into parse() and parse() into load(). Update all scripts and modules using those methods.
2010-02-19Dpkg::Shlibs:* add more abstract methods and clean up API.Modestas Vainius1-65/+49
* Make SymbolFile::lookup_*(), SymbolFile::find_matching_pattern() accept both symbol/pattern objects AND names. * Make SymbolFile::lookup_*(), SymbolFile::find_matching_pattern() accept both single soname and an array of sonames. * Make SymbolFile::lookup_*(), SymbolFile::find_matching_pattern() detect context and return either a hash of ( soname => .., symbol => .. ) or just a scalar symbol reference. In either case, do NOT clone symbols. * SymbolFile::get_{new,lost}_symbols() returns an array of { soname => .., symbol => .. } hashes where 'symbol' is a real reference, not a clone. * Add new abstract methods and use them everywhere: - SymbolFile::get_arch() - architecture the file is processed under/for. - SymbolFile::get_sonames() - names of all sonames. - SymbolFile::get_object() - soname object reference by name or object reference. - SymbolFile::get_symbols($soname) - if $soname is undef, returns ALL symbol file symbols. - SymbolFile::get_patterns($soname) - if $soname is undef, returns ALL symbol file patterns. - SymbolFile::get_symbol_object(Ssym, $soname) - a convenience method combining both SymbolFile::lookup_{symbol,pattern} methods. * Make SymbolFile::create_symbol() more flexible. Now it can parse a dummy spec without minver. * Remove Symbol::sclone() as no longer used and needed. Rename Symbol::dclone() back to Symbol::clone().
2010-02-19Dpkg::Shlibs::SymbolFile::add_symbol() reverse $sym, $soname argument order.Modestas Vainius1-1/+1
This makes order consistent with lookup_{symbol,pattern}.
2010-02-19Dpkg::Shlibs::Cppfilt: add and export cppfilt_demangle_cpp().Modestas Vainius1-9/+5
This function is needed to unify how demangling of C++ symbols is done in dpkg-dev. Passing 'auto' to cppfilt_demangle() each time is not very obvious and error prone.
2010-02-19libdpkg-perl: Rename Dpkg::IPC::fork_and_exec() to Dpkg::IPC::spawn()Guillem Jover2-16/+16
2010-02-19scripts/t: Add missing function prototypesGuillem Jover1-0/+6
2010-02-19scripts/t: Use void in function arguments to denote no argumentsGuillem Jover1-6/+6
Fixes warnings due to old style function definition.
2010-02-19scripts/t: Make symbol22_i386 function return void instead of void *Guillem Jover1-1/+1
2010-01-22Rename Dpkg::Compression::CompressedFile and Dpkg::Compression::CompressorRaphaël Hertzog1-5/+5
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-22Add non-regression tests for Dpkg::Compression::CompressedFileRaphaël Hertzog1-0/+99
2010-01-12Dpkg::Shlibs::Symbol.pm: change handling of old-style wildcardsRaphaël Hertzog2-5/+11
Really treat "*@version" like "(symver|optional)version" and don't care if the diff output might not apply in that specific case. The difference are minor anyway when you use that feature to maintain your symbols file.
2010-01-12Dpkg::Shlibs::Symbol/SymbolFile: introduce symver pattern, deprecate wildcardsModestas Vainius4-25/+67
Wildcards are still recognized. Their functionality is like of (symver|optional). Also underline notations of all basic pattern names in the man page. Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
2010-01-12Dpkg::Shlibs::Symbol: use 'auto' c++filt format for demangling C++ symbolsModestas Vainius1-1/+1
'auto' will try to select appropriate C++ demangling type automatically. Please note that 'auto' format is limited to C++ symbols as of binutils 2.20. Signed-off-by: Raphaël Hertzog <hertzog@debian.org>