Age | Commit message (Collapse) | Author | Files | Lines |
|
Use "my ($foo, $bar) = @_" rather than multiple shift()s.
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|
|
functionality
Signed-off-by: Modestas Vainius <modax@debian.org>
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|
|
* Rename previous tag tests to 'basictags'. Change the name everywhere and use
it consistenly throughout the testsuite. No new tests added.
* Fix 'wildcard symbol' test. It started failing due to changes in the symbol
data structure.
* Add a sub for save_load test.
Signed-off-by: Modestas Vainius <modax@debian.org>
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|
|
dclone() - deep cloning of the symbol.
sclone() - shallow copying of the symbol.
Signed-off-by: Modestas Vainius <modax@debian.org>
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|
|
This new module can be used to do symbol demangling with the c++filt
utility. For performance reasons, the c++filt program is run
in the background and used as a daemon: for each line written
it immediately outputs the demangled line.
The module also takes care of the c++filt process management
(forking and termination).
Signed-off-by: Modestas Vainius <modax@debian.org>
Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
|
|
|
|
No value results in a hash item with undef value while an empty value
results in a hash ite with an empty value.
Update the non-regression tests accordingly. Also update dpkg-buildpackage
that was using defined instead of exists to test the existence of an
option.
|
|
|
|
Rename public functions with deps_ prefix. Export them by default.
Update all scripts using Dpkg::Deps accordingly, including the test-suite.
|
|
Update test suite accordingly as well as all scripts using Dpkg::Deps.
Also use overload to provide a string representation corresponding to
what's returned by output().
|
|
Conflicts:
man/po/de.po
man/po/sv.po
scripts/dpkg-scanpackages.pl
scripts/po/de.po
scripts/po/sv.po
|
|
The fields in a compliant control-style file are allowed to have values
starting with any number of spaces. But that only applies to the first
line on multi-line field values, so do not do the same on subsequent
lines as those are handled differently.
Regression introduced in commit 7d8d193332478de82e20ed5b49053378801d160f.
Closes: #557547
|
|
This was causing diff problems as the file was changing depending on the
build system. Now it should be stable as it's always generated at check
time.
|
|
We avoid any name clashes during the test suite run. And the hierarchy
gets more clear when debugging in case any problem arises.
|
|
This allows to change it in a single place.
|
|
The copy was done to make the relative paths inside the ld.so.conf
fragments work even in out of tree builds. We now switch the current
directory to $srcdir in 200_Dpkg_Shlibs.t when loading the fragments
and then go back.
|
|
|
|
Accepting invalid version is the right default behaviour because
you often have to mix empty strings and versions and it's nice
to not have to special case too much.
In particular, we should be able to do "$vobj eq ''" without encountering
an error. Ensure this behaviour is kept by adding proper non-regression
tests.
Also enable fallback behaviour for all operators which have not been
explicitely implemented. The boolean operator returns true if the
version is valid, false otherwise.
Update the rest of the code that was doing "Dpkg::Version->new($v) || $v"
precisely to be able to store a version even if it's invalid.
|
|
|
|
|
|
Checking the validity of new field values at run-time was very expensive.
In order to avoid this check, the design of the object has been changed to
accept arbitrary values, they are simply escaped as necessary during
output. The only data lost in a save()/load() cycle are the
trailing whitespaces on every line of all values.
This API change implies fixes in all scripts/modules reading/creating
values for multiline fields.
The non-regression test also had to be adjusted.
|
|
|
|
The previous API was too different from the other modules inside dpkg-dev.
Dpkg::Changelog now behaves as an array of Dpkg::Changelog::Entry
and the documentation explains how it can be derived to create a new
changelog parser.
The non-regression tests as well as the official Debian
changelog parser script had to be updated to cope with the new API.
|
|
Drop the Dpkg::Changelog::Entry embedded in Dpkg::Changelog.
Update Dpkg::Changelog and Dpkg::Changelog::Debian to use the
new modules.
Some (undocumented) features have been removed with this rewrite.
The entries are not parsed item by item anymore. The Urgency field
will no longer receive the comment that can follow the urgency.
The content of “Closes” is exported by Dpkg::Changelog::Entry::Debian
as an optional field.
The test-suite also had to be updated to cope with the API changes
and the fact that bugs are no longer duplicated in the “Closes” field.
|
|
|
|
version_compare_op() becomes version_compare_relation().
version_normalize_cmp_op() becomes version_normalize_relation().
The CMP_OP_* constants become REL_*.
Update all scripts and modules accordingly.
|
|
The version string used at creation time should be returned
when you stringify a Dpkg::Version object. Ensure this by adding a
non-regression test.
|
|
Switch the non-regression tests to the new API.
|
|
The old implementation is still around in this commit so that
it's easy to checkout this commit and add supplementary test cases
in scripts/t/100_Dpkg_Version.t to verify that both implementations
have the same result. Some new test cases have been added during the
implementation.
The new object interface overrides all the comparison operators
so that you can directly compare two Dpkg::Version objects. The
object can also be used within strings and it will generate the
same version string than the one given at creation time.
|
|
Update all scripts and module to use Dpkg::Control instead
of parsecdata and Dpkg::Fields::Object.
|
|
Update all scripts and modules to use the new module names.
|
|
The heuristic to identify the version number that is most approaching
was not working properly for the case where the version number was smaller
than the oldest version (for example "0"). Add a non-regression test for
this case.
Also add supplementary warnings message so that people notice when
the parameters are discarded.
|
|
Ensure that an #include can change the name of the currently parsed
library (ELF object).
|
|
They were broken due to typo. Also add a test for wildcards.
Signed-off-by: Modestas Vainius <modestas@vainius.eu>
|
|
Fix dependency parsing code in Dpkg::Deps to not accept "foo\nbar"
even if foo is valid. A regex was improperly matching "\n" as
end of string due to usage of the "m" modifier.
Also improve the warning displayed when the dependency can't be parsed.
Add a non-regression test to ensure that this problem doesn't come back.
Reported-by: Andrew Sayers <andrew-dpkg@pileofstuff.org>
|
|
The addition of “_used” in the structure was in conflict with
a possible variable of the same name. So put the variables in
a dedicated hash to avoid this conflict and rename “_used” into
“used”.
Correct the warning message too.
Also add Joachim in the THANKS file for his contribution.
|
|
This commit adds tracking of used variables in Dpkg::Substvars. It adds
two new methods, no_warn() to disable warnings about one of the
variables, warn_about_unused() to issue warnings (via
Dpkg::ErrorHandling::warning()).
The test suite is extended accordingly.
|
|
|
|
Symbols might be tagged with arbitary number of tags which are separated by '|'
(aka pipe) character. Tags (only if there are any) must be enclosed in the ()
brackets right before a symbol name. Each tag can appear only once in the tag
specification for each symbol. A tag can optionally have a value. The tag value
is separated from the tag name by character '='. Tag names and values can be
arbitrary strings except they cannot contain any of the special ()|=
characters. A name of the tagged symbol can optionally be quoted with either '
or " characters (e.g. to allow whitespaces in the symbol name). If there are no
tags specified, symbol name cannot be quoted and symbol name continues up until
the first whitespace.
Example of the quoted symbol with 2 tags (the first tag has a value while the
second does not):
(tag1=value of the first tag|tag2)"Foo::Bar::foobar()"@Base 1.0 1
Tags serve two purposes:
* they can be used for symbol marking (e.g. when a symbol must be treated
specially under certain circumstances);
* they tell the parser that the specified symbol name must be processed in
certain way to become a raw symbol name as found in the object files.
Such tags are processed in the order they are specified.
Symbol files with tags are not backwards compatible, so a new parameter
'template_mode' has been added to SymbolFile::dump(). If template_mode is not
set (default), dump() emits a fully post-processed symbol specifications as
directed by their tags. Tags themselves are ommited from output and unknown
tags are ignored. If template_mode is set, dump() keeps tags in the output and
emits symbol specifications as they were read from the symbol file.
As a result, a new parameter -t was added to dpkg-gensymbols to support writing
the symbol file in template mode. Default is to write in non-template mode.
(tag|...|tagN)#include "file_to_include"
All symbols in the "file_to_include" will be tagged with #include tags by
default. A symbol in "file_to_include" can specify additional tags in its tag
specification or even override the tag value inherited from #include tags by
specifying another one in its own tag specifaction. There is no way for the
symbol to untag itself, even if the tag was inherited from #include. #include
tags are assumed to go always before (in tagorder) symbol specific tags even if
the symbol overrides the tag. Recursive tagged #includes are supported.
The patch also adds support for 2 tags:
* optional - a symbol marked as optional can disappear from the object file at
any time and that will never cause dpkg-gensymbols to fail (just emit the
diff). If optional symbol disappears, it is dumped as MISSING with
deprecated string set to the current package version (hence it always appears
in the dpkg-gensymbols diff). If optional symbol reappears, it gets
undeprecated but its minver is kept unchanged (contrary to reappearing
MISSING symbols).
Example: C++ template instantiation which disappearance is not ABI breaking
(i.e. basically it is a private symbol).
(optional)_ZN6Phonon22ObjectDescriptionModelILNS_21ObjectDescriptionTypeE0EE11qt_metacastEPKc@Base 4:4.2.0
* arch=<list of architectures as in Build-Depend dep> - allows to
mark a symbol as arch-specific. When dumping in non-templace mode, only
symbols concerned for the current host architecture are dumped. When dumping
in template mode, all arch-specific symbols are always dumped (including
proper tags). If arch-specific symbol appears on the arch that it is not
supposed to appear, it is made arch neutral (hence it appears in the
dpkg-gensymbols diff). If arch-specific symbol disappears from its arch, it
gets declared as MISSING.
Example: armel specific symbol due to qreal mangling as float on arm(el)
and double on other arches.
(arch=arm armel)_ZN6Phonon11AudioOutput13volumeChangedEd@Base 4:4.2.0
(arch=!armel !arm)_ZN6Phonon11AudioOutput13volumeChangedEf@Base 4:4.2.0
|
|
Set report options via this new function instead of directly exporting
private variables.
|
|
When an alternative is installed and a real file is in conflict, the real
file is kept. When the same alternative is fully removed, the real file
should be kept according to the same logic (but currently it was removed).
This commit modifies update-alternatives to follow this expected
behaviour.
Also add a non-regression test.
|
|
dpkg-shlibdeps did not always correctly initialize symbol-based
dependencies for libraries having symbols associated with a version "0".
“$minver ||= $sym->{minver};” changed $minver to the first non-null version
that followed a null version. Because the null version is evidently
selected as the minimal version but that code considers it unset and
replaces it with whatever it has.
Add a non-regression test for this part of the code.
|
|
|
|
This fixes “make distcheck”, as t.tmp is a read/write directory it has
to be used under builddir, which in most cases happens to be the same as
srcdir.
|
|
To better support packages of libraries that have different names
between architectures, offer the possibility to not hardcode the package
name in the symbols file by using #PACKAGE#. This marker is then
substituted by dpkg-gensymbols when the symbols files are installed inside
the binary package.
|
|
Make sure that all messages that are likely to appear in the
output as part of --install and --remove call are identified
as coming from update-alternatives. Factorize the logic of output and
verbosity in some standard function (info, warning, verbose).
|
|
This option overrides the default log file /var/log/dpkg.log.
It is needed to make the update-alternatives test-suite succeed
when run with fakeroot because without override the test-suite would
try to write to /var/log/dpkg.log and fail. Hence adjust
the test-suite accordingly.
|
|
--force
update-alternatives should not replace real files by symlinks. When
--install is called, the alternative link should either not exist
or already be a link. It that's not the case, it will simply skip
installing that link and display a warning. However if --force is given,
it will (try to) replace the file.
Ensure that behaviour within the test suite.
|
|
The option --set-selections is the counterpart of --get-selections,
it reads configuration on standard input and reconfigures alternatives
accordingly.
|
|
All slave links are optional in the sense that they are only installed
if the currently associated file does exist. This allows most
update-alternatives call to succeed even if the admin removed
documentation files or other optional files. Closes: #143701
A message is still displayed by default in this case to warn the
user that something uncommon has been detected.
Adjusted the test suite to verify this behaviour.
|