Raphael Hertzog [Tue, 15 Jan 2008 09:43:28 +0000 (10:43 +0100)]
dpkg-shlibdeps: handle the case where the same binary is listed multiple times
* scripts/dpkg-shlibdeps.pl: When the same binary is passed
several times as parameters (associated to different fields),
associate it to the most important field.
Raphael Hertzog [Tue, 15 Jan 2008 08:02:56 +0000 (09:02 +0100)]
dpkg-shlibdeps: Fix filtering of duplicated deps in fields of lesser priority
* scripts/dpkg-shlibdeps.pl (filter_deps): Fix filtering of
duplicated dependencies in fields of lesser priority. Dependencies
coming from shlibs files have no associated version and this case
wasn't handled properly.
Raphael Hertzog [Fri, 11 Jan 2008 18:14:15 +0000 (19:14 +0100)]
Give some hints to Perl on the use of UTF-8 for output
* scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl,
scripts/dpkg-source.pl: Hint Perl into using UTF-8 for output
on *.dsc, *.changes and DEBIAN/control files. Updated some open() calls
for more consistency and added binmode() calls for filehandles that
handle only binary data.
Raphael Hertzog [Sun, 13 Jan 2008 21:03:28 +0000 (22:03 +0100)]
Dpkg::Fields: Change set_field_importance() into a method of Dpkg::Fields::Object
* scripts/Dpkg/Fields.pm: Drop public function
set_fields_importance() in favor of a method on
Dpkg::Fields::Object. Integrate public function
sort_field_by_importance() in the output() method where it was
used.
* scripts/Dpkg/Changelog.pm, scripts/dpkg-genchanges.pl,
scripts/dpkg-gencontrol.pl, scripts/dpkg-source.pl: Updated to use
the set_field_importance() method instead of the removed function.
* scripts/Dpkg/Control.pm: Update pod documentation to refer to
Dpkg::Fields::Object instead of the invalid Dpkg::Cdata::Object.
Dpkg::Fields::Object: Support filehandles and strings for output and dump
* scripts/Dpkg/Fields.pm (dump): Allow to omit the
filehandle argument. If the function is called in
non-void context, also remove the printed string
to the caller. Together this avoids having to fiddle
with filehandles if the caller doesn't want to.
(output): Likewise.
* scripts/Dpkg/Changelog.pm (data2rfc822): Simplify
using this new behaviour.
Dpkg::Changelog: Use Dpkg::Fields for field handling
* scripts/Dpkg/Changelog.pm: Replace all field hashes
with Dpkg::Changelog::Entry objects.
(Dpkg::Changelog::Entry): Base on Dpkg::Fields::Object.
(data2rfc822): Use Dpkg::Fields::Object->output and fix
handling of user-defined fields.
(data2rfc822_mult): Merge into data2rfc822 (autodetect
whether the argument is an object or an array of object).
* scripts/Dpkg/Changelog/Debian.pm: Adapt for
Dpkg::Changelog::Entry changes.
* scripts/t/600_Dpkg_Changelog.t: Likewise.
Raphael Hertzog [Fri, 11 Jan 2008 23:13:15 +0000 (00:13 +0100)]
Define list of valid debian/control fields in Dpkg::Fields
* scripts/Dpkg/Fields.pm: Define variables containing
authoritative list of fields for debian/control (one for source
stanza, one for package stanza).
* scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl,
scripts/dpkg-source.pl: Use the new variables to properly ignore
valid fields. Some related cleanup.
Raphael Hertzog [Thu, 10 Jan 2008 22:15:25 +0000 (23:15 +0100)]
Make sure dpkg-dev 1.14.13 and 1.14.14 are upgraded together with dpkg
* debian/control: Add a "Breaks: dpkg-dev (= 1.14.13),
dpkg-dev (= 1.14.14)" on dpkg to force upgrade of those dpkg-dev
versions that would break with the move of the compression related
variables from Dpkg.pm into Dpkg/Compression.pm.
Raphael Hertzog [Sun, 6 Jan 2008 20:21:04 +0000 (21:21 +0100)]
Fix dpkg-buildpackage to not double options when called with -j option
* scripts/Dpkg/BuildOptions.pm (set): Change the default value of
the overwrite parameter to 1. The only use of this function in
dpkg-buildpackage is missing the parameter and actually wants to
overwrite the whole variable.
* scripts/t/300_Dpkg_BuildOptions.t: Adjust the test suite for this
change.
Raphael Hertzog [Sun, 6 Jan 2008 17:07:07 +0000 (18:07 +0100)]
Dpkg::Shlibs::Objdump: Takes into account R_*_COPY relocations
* scripts/Dpkg/Shlibs/Objdump.pm: Also retrieve dynamic relocation
records from objdump by adding the -R option. Use this information
to mark symbols affected by R_*_COPY relocations as undefined.
They are initialized by the loader with values searched in the
needed libraries.
Raphael Hertzog [Fri, 4 Jan 2008 13:16:06 +0000 (14:16 +0100)]
Dpkg/Shlibs/SymbolFile.pm: Replace DEPRECATED by MISSING
People understand better that symbols disappeared with the marker MISSING
than with the marker DEPRECATED (which look like it was done on purpose).
Continue to accept DEPRECATED in the input however.
Raphael Hertzog [Thu, 3 Jan 2008 20:28:01 +0000 (21:28 +0100)]
dpkg-shlibdeps: adjust the search order of shlibs files
* scripts/dpkg-shlibdeps.pl (add_shlibs_dep): Use the same logic
as find_symbols_files to find shlibs files. Check
debian/*/DEBIAN/shlibs only when the library has not been found in
an installed package, and give precedence to the shlibs provided
by the binary package where the library has been found. Replaces
the previous work-around that gave precedence to the package
that contained the binary.
* man/dpkg-shlibdeps.1: Document the above change in the shlibs
search order.
Raphael Hertzog [Thu, 3 Jan 2008 19:41:21 +0000 (20:41 +0100)]
dpkg-shlibdeps: Add a new -S<pkgbuilddir> option
* scripts/dpkg-shlibdeps.pl: Add a new -S<pkgbuilddir> option to
indicate a package build tree that should be scanned first when
trying to find a library.
* man/dpkg-shlibdeps.1: Document the new -S option.
Raphael Hertzog [Thu, 3 Jan 2008 15:05:54 +0000 (16:05 +0100)]
dpkg-shlibdeps: also search libs in package build trees containing symbols files
* scripts/dpkg-shlibdeps.pl (my_find_library): When defining the
list of package build trees to scan, also consider those that
contain symbols files (instead of only considering those that have
a shlibs file).
* man/dpkg-shlibdeps.1: Document the change listed above.
Raphael Hertzog [Thu, 3 Jan 2008 14:41:23 +0000 (15:41 +0100)]
dpkg-shlibdeps: fix find_symbols_file to choose the right symbols file
* scripts/dpkg-shlibdeps.pl (find_symbols_file): When libraries
are found in non-packaged files, first try to find the
corresponding symbols file in the build tree containing that
library. On the opposite, don't look up symbols files in debian/*
build directories for libraries found in installed packages (build
trees are scanned first and thus if they contain a needed library
dpkg-shlibdeps will find the library there and not in an installed
package).
Raphael Hertzog [Tue, 1 Jan 2008 17:13:07 +0000 (18:13 +0100)]
Update all scripts to use Dpkg::Changelog::parse_changelog
* scripts/dpkg-buildpackage.pl, scripts/dpkg-checkbuilddeps.pl,
scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl,
scripts/dpkg-gensymbols.pl, scripts/dpkg-source.pl: Update scripts to use
Dpkg::Changelog::parse_changelog instead of the old controllib.pl's
parsechangelog. With this last change controllib.pl is no more used by
any script.
Raphael Hertzog [Tue, 1 Jan 2008 14:59:08 +0000 (15:59 +0100)]
Remove the last calls to chown(getfowner(), ...)
* scripts/dpkg-distaddfile.pl, scripts/dpkg-gencontrol.pl: Delete
the chown(getfowner(), ...) on new files. It doesn't seem to do anything
useful anymore as it got dropped from several other scripts over the years
without problems. This enables the removal of getfowner() from
controllib.pl.
Raphael Hertzog [Tue, 1 Jan 2008 14:50:01 +0000 (15:50 +0100)]
Dpkg::Vars: New module handling the global variable $sourcepackage
* scripts/Dpkg/Vars.pm: New module exporting $sourcepackage and
set_source_package to replace the $sourcepackage and setsourcepackage of
controllib.pl.
* scripts/dpkg-genchanges.pl: Updated to use Dpkg::Vars.
* scripts/dpkg-gencontrol.pl: Likewise.
* scripts/dpkg-source.pl: Likewise.
Raphael Hertzog [Tue, 1 Jan 2008 13:54:55 +0000 (14:54 +0100)]
Dpkg::Version: Add check_version to replace controllib's checkversion
* scripts/Dpkg/Version.pm (check_version): New function.
* scripts/dpkg-buildpackage.pl: Use the new check_version.
* scripts/dpkg-source.pl: Likewise.
Raphael Hertzog [Sat, 29 Dec 2007 18:04:07 +0000 (19:04 +0100)]
Dpkg::Cdata, Dpkg::Control, Dpkg::Fields::Object: Add new modules
* scripts/Dpkg/Cdata.pm: This module provides a function to parse a block of
fields/values like those in debian/control, in changes files or in dsc files.
* scripts/Dpkg/Fields.pm: Dpkg::Fields::Object implements a tied hash
which handles proper capitalization of fields and which can be dumped
back.
* scripts/Dpkg/Control.pm: This module parses debian/control and provide
access to the tied hash for each block (source one and binary ones).
Raphael Hertzog [Thu, 27 Dec 2007 14:22:38 +0000 (15:22 +0100)]
Makefile.am: Add missing files to EXTRA_DIST
Also add a new dist-hook rule with a check of the distdir to make sure
that all files contained in the git repository also end up in the
distribution tarball (except .gitignore files).