The branch, master has been updated
via 4d76102f2bf3edc126f1acf79e417cb0b313374e (commit)
via 1b5580ade0807f1a873773222ea0a7e85f5b23ca (commit)
via 2ddc84d8d20490a862b0204ef054e615f3f648f4 (commit)
via 51c74632203efa343b61f5f54ec960fbbc6d95a6 (commit)
via 025d6e02b697abefa6c349074fc7d20cf3704065 (commit)
via 4c01feffd3f467a63f934568f0c8762ed33580d4 (commit)
via 894364fca9657e42b529d7bb647699dfc5dd4e50 (commit)
via d53f573b44388a375dc174645c199a98bf580009 (commit)
via e3b720f8f1b0d1957cebd3b55a601220106e9e4b (commit)
via 3b1eb76983cd67b8645c569baba02746f8e1364b (commit)
via a758c0f19cdb2ca8ccfc4b5e3a28fa9c63149cf4 (commit)
via f4d652c97156ddefaeef06c9060632efa0f64706 (commit)
via 65dcc473ae8d2505033b5ce5b7f00dab0f850c13 (commit)
via 5fb2ef86c87de7b4821fca99d7db15af2d5ec204 (commit)
via 86d0cbbb25e6517031c491ff443f9685e65df84d (commit)
via 120ecd5161f4cf468d611b3dea05ac8a43313a75 (commit)
via 1a5c8d6b7cf3e15f093ebccff8b9633d31bc7fcb (commit)
via 73c0afdba488997dfd34c8363533707aaedbd98e (commit)
via 38fbc26b5403d51ffda0dde4149e5144bdb347db (commit)
via ea7f8214a2583c6d969d79245701b0fd93937c0e (commit)
via 24b37628a18c4921882d7e9068f12ca4bd42151d (commit)
via 0287c4c511e38a97a9b87e67332b80bd89f2413c (commit)
via 78adb13396e4eb966269b338b0e382a424b54f52 (commit)
via 352ac7c7d2ed1bdad84096d1c33a11ca75dc43c5 (commit)
via 2d2cda573d619b203b944d48e80acb56026be4f9 (commit)
via 56d96807333a93135c349a4e7b9a955a5b079d2c (commit)
via 50cd7649d73629aa377ebad856689c39801b8976 (commit)
via 3a0acd9df121cd3d96c426f905ec89a536dd6fd3 (commit)
via 571014e137c1765637416ae301f5b093986cd594 (commit)
via 16b90057dd938d3f0bd725aa4ff979827da9f7b7 (commit)
via 7a970d3d153565ffcdf1bf22e62e6999337dee70 (commit)
via 9b0dc09dc1e51d4a862f9e0d5bf247fd7e0cd2c3 (commit)
via 3e6159b6f15f2d96fba5e56488eeb1179af8ba76 (commit)
via dacc191d48ac524a97c9e8b490a0911462e914ce (commit)
via 3e08a921ba067840c9012eeedf74a3bb27f07a02 (commit)
via 496a5b6f7163ca67742c0bee82c40b52b780349d (commit)
via 33283a4b7078bf7b25cef28005e0454674ba3b4f (commit)
via a760a6d5ffd1a0b85ae6eed87d5332ce99b68e6b (commit)
via 51dced9b6269ee7b529bb68522dd5887fe38f89a (commit)
via 7698092d0b7483340618981652c3aa69894520b8 (commit)
from 2006f645b0e4510871a9c69f37a2b25b6a1e19be (commit)
- Shortlog ------------------------------------------------------------
4d76102 Add missing changelog entries from controllib-removal branch
1b5580a Merge branch 'controllib-removal'
Summary of changes:
ChangeLog | 75 ++
debian/changelog | 18 +
debian/dpkg-dev.install | 9 +-
scripts/Dpkg/Cdata.pm | 124 ++
scripts/Dpkg/Changelog.pm | 865 ++++++++++++++
scripts/Dpkg/Changelog/Debian.pm | 358 ++++++
scripts/Dpkg/Control.pm | 169 +++
scripts/Dpkg/ErrorHandling.pm | 8 +-
scripts/Dpkg/Fields.pm | 138 +++
scripts/Dpkg/Substvars.pm | 185 +++
scripts/Dpkg/Vars.pm | 53 +
scripts/Dpkg/Version.pm | 15 +-
scripts/Makefile.am | 20 +-
scripts/changelog/debian.pl | 234 ++---
scripts/controllib.pl | 332 ------
scripts/dpkg-buildpackage.pl | 6 +-
scripts/dpkg-checkbuilddeps.pl | 25 +-
scripts/dpkg-distaddfile.pl | 5 -
scripts/dpkg-genchanges.pl | 158 ++--
scripts/dpkg-gencontrol.pl | 250 ++---
scripts/dpkg-gensymbols.pl | 18 +-
scripts/dpkg-parsechangelog.pl | 49 +-
scripts/dpkg-shlibdeps.pl | 12 +-
scripts/dpkg-source.pl | 191 ++--
scripts/po/POTFILES.in | 11 +-
scripts/t/600_Dpkg_Changelog.t | 207 ++++
scripts/t/600_Dpkg_Changelog/countme | 41 +
scripts/t/600_Dpkg_Changelog/misplaced-tz | 12 +
scripts/t/600_Dpkg_Changelog/shadow | 1755 +++++++++++++++++++++++++++++
scripts/t/700_Dpkg_Control.t | 63 +
scripts/t/700_Dpkg_Control/control-1 | 22 +
31 files changed, 4580 insertions(+), 848 deletions(-)
-----------------------------------------------------------------------
Details of changes:
commit 4d76102f2bf3edc126f1acf79e417cb0b313374e
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Tue Jan 8 09:22:06 2008 +0100
Add missing changelog entries from controllib-removal branch
diff --git a/ChangeLog b/ChangeLog
index 91590f0..0f1178b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2008-01-08 Raphael Hertzog <[EMAIL PROTECTED]>
+
+ * scripts/Dpkg/Version.pm: Import missing error function from
+ Dpkg::ErrorHandling.
+
+ * scripts/po/POTFILES.in: Add many modules containing translatable
+ strings.
+
+ * scripts/Dpkg/Changelog.pm (parse_changelog): New function to
+ replace controllib's parsechangelog.
+
+ * 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.
+
+ * scripts/controllib.pl: Removed as it's no more used by any
+ script.
+
+ * debian/dpkg-dev.install: Add missing modules.
+
2008-01-08 Frank Lichtenheld <[EMAIL PROTECTED]>
* scripts/dpkg-parsechangelog.pl: Make the
@@ -6,7 +29,7 @@
* scripts/Dpkg/ErrorHandling.pm (report): export.
-2007-01-08 Raphael Hertzog <[EMAIL PROTECTED]>
+2008-01-08 Raphael Hertzog <[EMAIL PROTECTED]>
* scripts/Dpkg/Cdata.pm, scripts/Dpkg/Control.pm: Add two new
module to parse and manipulate files like debian/control.
@@ -45,7 +68,7 @@
* scripts/Makefile.am: Include all the new files in the
distributed tarball.
-2007-01-08 Raphael Hertzog <[EMAIL PROTECTED]>
+2008-01-08 Raphael Hertzog <[EMAIL PROTECTED]>
* scripts/Dpkg/ErrorHandling.pm (syntaxerr): New function to
replace the syntax() function in controllib.pl.
diff --git a/debian/changelog b/debian/changelog
index 00912d3..a58ccdb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,13 @@ dpkg (1.14.16) UNRELEASED; urgency=low
- Various options to better control how many entries
should be displayed. Closes: #226932
+ [ Raphael Hertzog ]
+ * Replaced all the remaining code in controllib.pl by new modules. All
+ scripts have been adjusted to use the new modules and controllib.pl has
+ been removed.
+ * The code to parse debian/control is available in a perl module
+ Dpkg::Control. Closes: #26554
+
[ Updated dpkg translations ]
* Basque (Piarres Beobide). Closes: #459565
* French (Christian Perrier).
commit 1b5580ade0807f1a873773222ea0a7e85f5b23ca
Merge: 2006f645b0e4510871a9c69f37a2b25b6a1e19be
2ddc84d8d20490a862b0204ef054e615f3f648f4
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Tue Jan 8 09:04:39 2008 +0100
Merge branch 'controllib-removal'
Conflicts:
ChangeLog
scripts/dpkg-buildpackage.pl
scripts/dpkg-checkbuilddeps.pl
diff --combined ChangeLog
index 87744f7,6205b84..91590f0
--- a/ChangeLog
+++ b/ChangeLog
@@@ -1,185 -1,80 +1,237 @@@
-2008-01-01 Frank Lichtenheld <[EMAIL PROTECTED]>
++2008-01-08 Frank Lichtenheld <[EMAIL PROTECTED]>
+
+ * scripts/dpkg-parsechangelog.pl: Make the
+ -L option actually work (it's only been eleven
+ years...)
-
++
+ * scripts/Dpkg/ErrorHandling.pm (report): export.
+
-2008-01-01 Samuel Thibault <[EMAIL PROTECTED]>
-
- * utils/start-stop-daemon.c (do_stop): Do not print 'failed to kill'
- warning when doing pid polling.
-
-2008-01-01 Guillem Jover <[EMAIL PROTECTED]>
-
- * src/archives.c (archivefiles): Remove pointless strdup for execvp
- arguments.
-
-2008-01-01 Ian Zimmerman <[EMAIL PROTECTED]>
-
- * scripts/install-info.pl: Ignore wrapped lines when matching
- section titles.
-
-2008-01-01 John Zaitseff <[EMAIL PROTECTED]>
-
- * dselect/baselist.cc (baselist::wordwrapinfo): Stop processing when
- exceeding infopad line limit, and add a warning message.
-
-2008-01-01 Sven Rudolph <[EMAIL PROTECTED]>
-
- * dselect/baselist.cc (baselist::startdisplay): Set helpscreen_attr
- on monochrome terminals.
-
-2007-12-28 Raphael Hertzog <[EMAIL PROTECTED]>
++2007-01-08 Raphael Hertzog <[EMAIL PROTECTED]>
+
+ * scripts/Dpkg/Cdata.pm, scripts/Dpkg/Control.pm: Add two new
+ module to parse and manipulate files like debian/control.
+ * scripts/t/600_Dpkg_Control.t,
+ scripts/t/600_Dpkg_Control/control-1: Add non-regression tests for
+ Dpkg::Control and Dpkg::Cdata.
+ * scripts/dpkg-checkbuilddeps.pl, scripts/dpkg-genchanges.pl,
+ scripts/dpkg-gencontrol.pl, scripts/dpkg-gensymbols.pl,
+ scripts/dpkg-shlibdeps.pl, scripts/dpkg-source.pl: Update scripts
+ to use the new modules Dpkg::Cdata, Dpkg::Control,
+ Dpkg::Fields::Object and Dpkg::Substvars.
+
+ * scripts/Dpkg/Version.pm (check_version): New function replacing
+ checkversion of controllib.pl.
+ * scripts/dpkg-source.pl, scripts/dpkg-buildpackage.pl: Use the
+ new check_version.
+
+ * scripts/Dpkg/Vars.pm (set_source_package): New function to set
+ and check the global variable $sourcepackage (replacing
+ controllib's setsourcepackage).
+ * scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl,
+ scripts/dpkg-source.pl: Use the new set_source_package.
+
+ * 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.
+
+ * scripts/dpkg-source.pl: Integrate readmd5sum from controllib here
+ as it's the only user of that function.
+
+ * scripts/controllib.pl: Get rid of everything except
+ parsechangelog and its dependencies (parsecdata, syntax) that are
+ still needed.
+
+ * scripts/Makefile.am: Include all the new files in the
+ distributed tarball.
+
-2007-12-28 Raphael Hertzog <[EMAIL PROTECTED]>
++2007-01-08 Raphael Hertzog <[EMAIL PROTECTED]>
+
+ * scripts/Dpkg/ErrorHandling.pm (syntaxerr): New function to
+ replace the syntax() function in controllib.pl.
+
+2008-01-07 Guillem Jover <[EMAIL PROTECTED]>
+
+ * scripts/dpkg-genchanges.pl: Ignore Homepage field in binary package
+ stanzas.
+ * scripts/dpkg-source.pl: Likewise.
+
+2008-01-07 Guillem Jover <[EMAIL PROTECTED]>
+
+ * scripts/dpkg-checkbuilddeps.pl: Remove unused $dep_regex.
+
+2008-01-07 Guillem Jover <[EMAIL PROTECTED]>
+
+ * scripts/dpkg-checkbuilddeps.pl: Add build-essential as an implicit
+ Build-Depends.
+
+2008-01-07 Guillem Jover <[EMAIL PROTECTED]>
+
+ * configure.ac: Bump version to 1.14.16~.
+
+2008-01-07 Guillem Jover <[EMAIL PROTECTED]>
+
+ * configure.ac: Release 1.14.15.
+
+2008-01-07 Guillem Jover <[EMAIL PROTECTED]>
+
+ * src/archives.c (archivefiles): Use arglist instead of narglist.
+
+2008-01-07 Guillem Jover <[EMAIL PROTECTED]>
+
+ * lib/nfmalloc.c (nfmalloc): Remove inline keyword as extern inline
+ changes semantics from GNU C to C99.
+ * lib/varbuf.c (varbufaddc): Likewise.
+
+2008-01-07 Guillem Jover <[EMAIL PROTECTED]>
+
+ * dpkg-deb/extract.c (extracthalf): Move negative member length check
+ to ...
+ (parseheaderlength): ... here. Change return type to size_t. Change
+ variable r to ssize_t. Use strtol instead of strtoul to easily catch
+ negative values.
+ * dpkg-deb/info.c (info_spew): Use %zu in a format string instead of
+ %lu to print pathlen, a size_t variable.
+ * dpkg-split/queue.c (do_auto): Change j from unsinged int to int.
+ Cast j to unsigned int when comparing it to i.
+ * lib/varbuf.c (varbufprintf): Change ou from unsigned int to size_t.
+ Change r from unsigned int to int. Cast value compared to r to int.
+ (varbufprintf): Likewise.
+ * src/archives.c (tarobject): Change r from size_t to ssize_t.
+ Cast r to size_t when comparing it to symlinkfn.size.
+ * src/main.c (setforce): Cast string difference to size_t instead of
+ int.
+ * utils/start-stop-daemon.c (parse_schedule): Change str_len from
+ ptrdiff_t to size_t. Cast string difference to size_t instead of
+ ptrdiff_t. Remove ptrdiff_t cast to sizeof.
+
+2008-01-07 Guillem Jover <[EMAIL PROTECTED]>
+
+ * scripts/Dpkg/BuildOptions.pm (set): Parse all options separated
+ by spaces or comma, do not lowercase the option names, do not match
+ on name substrings, and on recognized options with invalid values
+ discard the value or the entire option.
+ * scripts/t/300_Dpkg_BuildOptions.t: Adjust test suite.
+
+2008-01-06 Raphael Hertzog <[EMAIL PROTECTED]>
+
+ * 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.
+
+ * 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.
+
+2008-01-04 Raphael Hertzog <[EMAIL PROTECTED]>
+
+ * scripts/Dpkg/Shlibs/SymbolFile.pm: Replace #DEPRECATED by
+ #MISSING in the output and recognize both while parsing. People
+ understand better that way.
+
+2008-01-03 Raphael Hertzog <[EMAIL PROTECTED]>
+
+ * 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).
+ * 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.
+
+ * 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.
+
+ * 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.
+
+2008-01-03 Guillem Jover <[EMAIL PROTECTED]>
+
+ * scripts/dpkg-buildpackage.pl: Do not automatically enable '-j'
+ if DEB_BUILD_OPTIONS contains parallel=n, and allow overriding
+ its value from the environment.
+
+2008-01-02 Guillem Jover <[EMAIL PROTECTED]>
+
+ * utils/start-stop-daemon.c [!__GNUC__] (fatal, badusage): Remove
+ redundant function declarations.
+
+2008-01-02 Guillem Jover <[EMAIL PROTECTED]>
+
+ * src/main.h (struct stat): New forward declaration.
+
+2008-01-02 Guillem Jover <[EMAIL PROTECTED]>
+
+ * lib/dpkg.h (warningf): Add PRINTFFORMAT attribute.
+ (buffer_copy_setup_PtrInt): Likewise.
+ (buffer_copy_setup_PtrPtr): Likewise.
+ (buffer_copy_setup_IntPtr): Likewise.
+ (buffer_copy_setup_IntInt): Likewise.
+ (decompress_cat): Likewise.
+ (compress_cat): Likewise.
+ * lib/dpkg-db.h (log_message): Likewise.
+
+2008-01-02 Guillem Jover <[EMAIL PROTECTED]>
+
+ * lib/dpkg.h (NONRETURNPRINTFFORMAT): Remove macro.
+ (ohshit): Use NONRETURNING and PRINTFFORMAT instead of
+ NONRETURNPRINTFFORMAT.
+ (ohshite): Likewise.
+ (badusage): Likewise.
+ * utils/start-stop-daemon.c (NONRETURNPRINTFFORMAT): Remove macro.
+ (fatal): Use NONRETURNING and PRINTFFORMAT instead of
+ NONRETURNPRINTFFORMAT.
+
+2008-01-01 Guillem Jover <[EMAIL PROTECTED]>
+
+ * scripts/dpkg-buildpackage.pl: Use Dpkg::Compression. Use $comp_regex
+ to match compressed diffs and tarballs.
+
+2008-01-01 Samuel Thibault <[EMAIL PROTECTED]>
+
+ * utils/start-stop-daemon.c (do_stop): Do not print 'failed to kill'
+ warning when doing pid polling.
+
+2008-01-01 Guillem Jover <[EMAIL PROTECTED]>
+
+ * src/archives.c (archivefiles): Remove pointless strdup for execvp
+ arguments.
+
+2008-01-01 Ian Zimmerman <[EMAIL PROTECTED]>
+
+ * scripts/install-info.pl: Ignore wrapped lines when matching
+ section titles.
+
+2008-01-01 John Zaitseff <[EMAIL PROTECTED]>
+
+ * dselect/baselist.cc (baselist::wordwrapinfo): Stop processing when
+ exceeding infopad line limit, and add a warning message.
+
+2008-01-01 Sven Rudolph <[EMAIL PROTECTED]>
+
+ * dselect/baselist.cc (baselist::startdisplay): Set helpscreen_attr
+ on monochrome terminals.
+
2007-12-28 Raphael Hertzog <[EMAIL PROTECTED]>
* scripts/Dpkg.pm: Add a warning to avoid adding unnecessary stuff
diff --combined debian/changelog
index 00ac28b,df07f3e..00912d3
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,18 -1,4 +1,29 @@@
-dpkg (1.14.15) UNRELEASED; urgency=low
+dpkg (1.14.16) UNRELEASED; urgency=low
+
+ [ Guillem Jover ]
+ * Add build-essential as an implicit Build-Depends in dpkg-checkbuilddeps.
+ Closes: #402901
+ * Do not warn about unrecognized Homepage field in binary package stanzas
+ in dpkg-genchanges and dpkg-source.
+
++ [ Frank Lichtenheld ]
++ * Make the -L option of dpkg-parsechangelog actually work (it's
++ only been eleven years...)
++ * Import the code from my external Parse::DebianChangelog as
++ Dpkg::Changelog and Dpkg::Changelog::Debian. Using this
++ from parsechangelog/debian adds the following requested
++ features:
++ - Option to use a non-lossy format. Closes: #95579
++ - Various options to better control how many entries
++ should be displayed. Closes: #226932
++
+ [ Updated dpkg translations ]
+ * Basque (Piarres Beobide). Closes: #459565
+ * French (Christian Perrier).
+
+ -- Guillem Jover <[EMAIL PROTECTED]> Mon, 07 Jan 2008 12:39:36 +0200
+
+dpkg (1.14.15) unstable; urgency=low
[ Raphael Hertzog ]
* Make sure {dpkg-dev,dselect}.preinst are included in the source tarball.
@@@ -20,20 -6,6 +31,20 @@@
* Blacklist armel-specific symbols in dpkg-gensymbols. Reported by Riku
Voipio. Closes: #457964
* Fix typos in various manpages. Patch from A. Costa. Closes: #458276
+ * Make dpkg-shlibdeps choose the right symbols files when we have several
+ debian/*/DEBIAN/symbols for a given soname. Closes: #458860
+ * Add a -S<pkgbuilddir> option to dpkg-shlibdeps to indicate a package build
+ tree to scan first when trying to find a needed library.
+ * Change dpkg-gensymbols to mark symbols that disappeared with #MISSING
+ instead of #DEPRECATED, it's clearer for people.
+ * Fix Dpkg::Shlibs::Objdump to properly take into account R_*_COPY
+ relocations. Closes: #454036
+ * Explain better the order in which postinst/prerm scripts are called
+ between a package and its dependencies. Thanks to Nicolas François and
+ Helge Kreutzmann for their suggestions. Closes: #379641
+ * Fix Dpkg::BuildOptions so that dpkg-buildpackage doesn't double all
+ options in DEB_BUILD_OPTIONS when called with the -j parameter.
+ Closes: #453656
[ Guillem Jover ]
* Move compression related variables to a new Dpkg::Compression module.
@@@ -53,33 -25,25 +64,33 @@@
* Do not print 'failed to kill' warning in start-stop-daemon when polling
the pid. Closes: #157305, #352554
Thanks to Samuel Thibault.
-
- [ Frank Lichtenheld ]
- * Make the -L option of dpkg-parsechangelog actually work (it's
- only been eleven years...)
- * Import the code from my external Parse::DebianChangelog as
- Dpkg::Changelog and Dpkg::Changelog::Debian. Using this
- from parsechangelog/debian adds the following requested
- features:
- - Option to use a non-lossy format. Closes: #95579
- - Various options to better control how many entries
- should be displayed. Closes: #226932
+ * Properly print build message in dpkg-buildpackage for lzma and bzip2
+ compressed sources. Closes: #458519
+ * Promote bzip2 Recommends to Depends for dpkg-dev. Closes: #458521
+ * Add lzma to dpkg-dev Depends.
+ * Do not automatically enable -j if DEB_BUILD_OPTIONS contains parallel=n,
+ and allow overriding its value from the environment. Closes: #458589
+ * Fix Dpkg::BuildOptions to parse all options in DEB_BUILD_OPTIONS, so
+ that dpkg-buildpackage called with -j preserves unrecognized options.
+ * Fix several signed vs unsigned value comparisons that were making some
+ code to never be executed.
[ Updated dpkg translations ]
- * Norwegian Bokmål (Hans Fredrik Nordhaug). Closes: #457918
+ * French (Christian Perrier).
+ * German (Sven Joachim). Closes: #459223
+ * Norwegian Bokmål (Hans Fredrik Nordhaug). Closes: #457918, #458732
+ * Simplified Chinese (Deng Xiyue). Closes: #459018
+ * Swedish (Peter Karlsson).
+ * Vietnamese (Clytie Siddall). Closes: #459016
+
+ [ Updated scripts translations ]
+ * French (Christian Perrier).
+ * Swedish (Peter Karlsson).
[ Updated man pages translations ]
* Swedish (Peter Karlsson).
- -- Raphael Hertzog <[EMAIL PROTECTED]> Thu, 27 Dec 2007 12:21:57 +0100
+ -- Guillem Jover <[EMAIL PROTECTED]> Mon, 07 Jan 2008 12:12:16 +0200
dpkg (1.14.14) unstable; urgency=low
diff --combined scripts/dpkg-buildpackage.pl
index 84b984b,7e37368..9ff387c
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@@ -11,10 -11,7 +11,8 @@@ use Dpkg::Gettext
use Dpkg::ErrorHandling qw(warning error failure syserr subprocerr usageerr
$warnable_error);
use Dpkg::BuildOptions;
+use Dpkg::Compression;
-
- push (@INC, $dpkglibdir);
- require 'controllib.pl';
+ use Dpkg::Version qw(check_version);
textdomain("dpkg-dev");
@@@ -241,15 -238,17 +239,15 @@@ if ($signcommand && ($signinterface !~
warning(_g("unknown sign command, assuming pgp style interface"));
}
-if ($parallel || $ENV{DEB_BUILD_OPTIONS}) {
+if ($parallel) {
my $build_opts = Dpkg::BuildOptions::parse();
- $parallel ||= $build_opts->{parallel};
- if (defined $parallel) {
- $ENV{MAKEFLAGS} ||= '';
- if ($parallel eq '-1') {
- $ENV{MAKEFLAGS} .= " -j";
- } else {
- $ENV{MAKEFLAGS} .= " -j$parallel";
- }
+ $parallel = $build_opts->{parallel} if (defined $build_opts->{parallel});
+ $ENV{MAKEFLAGS} ||= '';
+ if ($parallel eq '-1') {
+ $ENV{MAKEFLAGS} .= " -j";
+ } else {
+ $ENV{MAKEFLAGS} .= " -j$parallel";
}
$build_opts->{parallel} = $parallel;
Dpkg::BuildOptions::set($build_opts);
@@@ -282,7 -281,7 +280,7 @@@ sub mustsetvar
my $pkg = mustsetvar($changes{source}, _g('source package'));
my $version = mustsetvar($changes{version}, _g('source version'));
- checkversion($version);
+ check_version($version);
my $maintainer;
if ($changedby) {
@@@ -437,9 -436,9 +435,9 @@@ sub fileomitted
my $srcmsg;
if (fileomitted '\.deb') {
# source only upload
- if (fileomitted '\.diff\.gz') {
+ if (fileomitted "\.diff\.$comp_regex") {
$srcmsg = _g('source only upload: Debian-native package');
- } elsif (fileomitted '\.orig\.tar\.gz') {
+ } elsif (fileomitted "\.orig\.tar\.$comp_regex") {
$srcmsg = _g('source only, diff-only upload (original source NOT
included)');
} else {
$srcmsg = _g('source only upload (original source is included)');
@@@ -448,9 -447,9 +446,9 @@@
$srcmsg = _g('full upload (original source is included)');
if (fileomitted '\.dsc') {
$srcmsg = _g('binary only upload (no source included)');
- } elsif (fileomitted '\.diff\.gz') {
+ } elsif (fileomitted "\.diff\.$comp_regex") {
$srcmsg = _g('full upload; Debian-native package (full source is
included)');
- } elsif (fileomitted '\.orig\.tar\.gz') {
+ } elsif (fileomitted "\.orig\.tar\.$comp_regex") {
$srcmsg = _g('binary and diff upload (original source NOT included)');
} else {
$srcmsg = _g('full upload (original source is included)');
diff --combined scripts/dpkg-checkbuilddeps.pl
index 68ace33,b89fd21..1a82dbc
--- a/scripts/dpkg-checkbuilddeps.pl
+++ b/scripts/dpkg-checkbuilddeps.pl
@@@ -10,11 -10,7 +10,7 @@@ use Dpkg::Gettext
use Dpkg::ErrorHandling qw(error);
use Dpkg::Arch qw(get_host_arch);
use Dpkg::Deps;
-
- push(@INC,$dpkglibdir);
- require 'controllib.pl';
-
- our %fi;
+ use Dpkg::Control;
textdomain("dpkg-dev");
@@@ -46,32 -42,31 +42,33 @@@ if ($want_help)
my $controlfile = shift || "debian/control";
- parsecontrolfile($controlfile);
+ my $control = Dpkg::Control->new($controlfile);
+ my $fields = $control->get_source();
my $facts = parse_status("$admindir/status");
my (@unmet, @conflicts);
-my $dep_regex=qr/[ \t]*(([^\n]+|\n[ \t])*)\s/; # allow multi-line
+push @unmet, build_depends('Implicit-Build-Depends',
+ Dpkg::Deps::parse('build-essential'), $facts);
+
- if (defined($fi{"C Build-Depends"})) {
+ if (defined($fields->{"Build-Depends"})) {
push @unmet, build_depends('Build-Depends',
- Dpkg::Deps::parse($fi{"C Build-Depends"},
+
Dpkg::Deps::parse($fields->{"Build-Depends"},
reduce_arch => 1), $facts);
}
- if (defined($fi{"C Build-Conflicts"})) {
+ if (defined($fields->{"C Build-Conflicts"})) {
push @conflicts, build_conflicts('Build-Conflicts',
- Dpkg::Deps::parse($fi{"C
Build-Conflicts"},
+
Dpkg::Deps::parse($fields->{"Build-Conflicts"},
reduce_arch => 1, union => 1),
$facts);
}
- if (! $binary_only && defined($fi{"C Build-Depends-Indep"})) {
+ if (! $binary_only && defined($fields->{"Build-Depends-Indep"})) {
push @unmet, build_depends('Build-Depends-Indep',
- Dpkg::Deps::parse($fi{"C
Build-Depends-Indep"},
+
Dpkg::Deps::parse($fields->{"Build-Depends-Indep"},
reduce_arch => 1), $facts);
}
- if (! $binary_only && defined($fi{"C Build-Conflicts-Indep"})) {
+ if (! $binary_only && defined($fields->{"Build-Conflicts-Indep"})) {
push @conflicts, build_conflicts('Build-Conflicts-Indep',
- Dpkg::Deps::parse($fi{"C
Build-Conflicts-Indep"},
+
Dpkg::Deps::parse($fields->{"Build-Conflicts-Indep"},
reduce_arch => 1, union => 1),
$facts);
}
diff --combined scripts/dpkg-genchanges.pl
index fdb9d62,39e2818..625f3c7
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@@ -13,14 -13,11 +13,11 @@@ use Dpkg::ErrorHandling qw(warning erro
use Dpkg::Arch qw(get_host_arch debarch_eq debarch_is);
use Dpkg::Fields qw(capit set_field_importance sort_field_by_importance);
use Dpkg::Compression;
-
- push(@INC,$dpkglibdir);
- require 'controllib.pl';
-
- our (%f, %fi);
- our %p2i;
- our %substvar;
- our $sourcepackage;
+ use Dpkg::Control;
+ use Dpkg::Cdata;
+ use Dpkg::Substvars;
+ use Dpkg::Vars;
+ use Dpkg::Changelog qw(parse_changelog);
textdomain("dpkg-dev");
@@@ -36,6 -33,8 +33,8 @@@ my $varlistfile = 'debian/substvars'
my $uploadfilesdir = '..';
my $sourcestyle = 'i';
my $quiet = 0;
+ my $host_arch = get_host_arch();
+ my $changes_format = "1.7";
my %f2p; # - file to package map
my %p2f; # - package to file map, has entries for "packagename"
@@@ -64,6 -63,8 +63,8 @@@ my $forcemaint
my $forcechangedby;
my $since;
+ my $substvars = Dpkg::Substvars->new();
+
use constant SOURCE => 1;
use constant ARCH_DEP => 2;
use constant ARCH_INDEP => 4;
@@@ -169,7 -170,7 +170,7 @@@ while (@ARGV)
} elsif (m/^-U([^\=:]+)$/) {
$remove{$1}= 1;
} elsif (m/^-V(\w[-:0-9A-Za-z]*)[=:]/) {
- $substvar{$1}= $POSTMATCH;
+ $substvars->set($1, $POSTMATCH);
} elsif (m/^-(h|-help)$/) {
&usage; exit(0);
} elsif (m/^--version$/) {
@@@ -179,8 -180,10 +180,10 @@@
}
}
- parsechangelog($changelogfile, $changelogformat, $since);
- parsecontrolfile($controlfile);
+ my $changelog = parse_changelog($changelogfile, $changelogformat, $since);
+ my $control = Dpkg::Control->new($controlfile);
+ my $fields = Dpkg::Fields::Object->new();
+ $substvars->set_version_substvars($changelog->{"Version"});
if (not is_sourceonly) {
open(FL,"<",$fileslistfile) || &syserr(_g("cannot read files list file"));
@@@ -221,28 -224,30 +224,30 @@@
close(FL);
}
- for $_ (keys %fi) {
- my $v = $fi{$_};
-
- if (s/^C //) {
- if (m/^Source$/) {
- setsourcepackage($v);
- }
- elsif (m/^Section$|^Priority$/i) { $sourcedefault{$_}= $v; }
- elsif (m/^Maintainer$/i) { $f{$_}= $v; }
- elsif (s/^X[BS]*C[BS]*-//i) { $f{$_}= $v; }
- elsif (m/^X[BS]+-/i ||
- m/^Build-(Depends|Conflicts)(-Indep)?$/i ||
- m/^(Standards-Version|Uploaders|Homepage|Origin|Bugs)$/i ||
- m/^Vcs-(Browser|Arch|Bzr|Cvs|Darcs|Git|Hg|Mtn|Svn)$/i) {
- }
- else { &unknown(_g('general section of control info file')); }
- } elsif (s/^C(\d+) //) {
- my $i = $1;
- my $p = $fi{"C$i Package"};
- my $a = $fi{"C$i Architecture"};
- my $host_arch = get_host_arch();
+ # Scan control info of source package
+ my $src_fields = $control->get_source();
+ foreach $_ (keys %{$src_fields}) {
+ my $v = $src_fields->{$_};
+ if (m/^Source$/) {
+ set_source_package($v);
+ }
+ elsif (m/^Section$|^Priority$/i) { $sourcedefault{$_}= $v; }
+ elsif (m/^Maintainer$/i) { $fields->{$_} = $v; }
+ elsif (s/^X[BS]*C[BS]*-//i) { $fields->{$_} = $v; }
+ elsif (m/^X[BS]+-/i ||
+ m/^Build-(Depends|Conflicts)(-Indep)?$/i ||
+ m/^(Standards-Version|Uploaders|Homepage|Origin|Bugs)$/i ||
+ m/^Vcs-(Browser|Arch|Bzr|Cvs|Darcs|Git|Hg|Mtn|Svn)$/i) {
+ }
+ else { &unknown(_g('general section of control info file')); }
+ }
+ # Scan control info of all binary packages
+ foreach my $pkg ($control->get_packages()) {
+ my $p = $pkg->{"Package"};
+ my $a = $pkg->{"Architecture"};
+ foreach $_ (keys %{$pkg}) {
+ my $v = $pkg->{$_};
if (!defined($p2f{$p}) && not is_sourceonly) {
if ((debarch_eq('all', $a) and ($include & ARCH_INDEP)) ||
(grep(debarch_is($host_arch, $_), split(/\s+/, $a))
@@@ -271,21 -276,21 +276,21 @@@
} elsif (m/^Priority$/) {
$f2pricf{$_} = $v foreach (@f);
} elsif (s/^X[BS]*C[BS]*-//i) {
- $f{$_}= $v;
+ $fields->{$_} = $v;
} elsif (m/^Architecture$/) {
if (not is_sourceonly) {
if (grep(debarch_is($host_arch, $_), split(/\s+/, $v))
and ($include & ARCH_DEP)) {
$v = $host_arch;
} elsif (!debarch_eq('all', $v)) {
- $v= '';
+ $v = '';
}
} else {
$v = '';
}
push(@archvalues,$v) unless !$v || $archadded{$v}++;
} elsif (m/^(Package|Package-Type|Kernel-Version|Essential)$/ ||
- m/^(Tag|Installer-Menu-Item|Subarchitecture)$/i ||
+ m/^(Homepage|Tag|Installer-Menu-Item|Subarchitecture)$/i ||
m/^(Pre-Depends|Depends|Recommends|Suggests|Provides)$/ ||
m/^(Enhances|Conflicts|Breaks|Replaces)$/ ||
m/^X[BS]+-/i) {
@@@ -293,38 -298,38 +298,38 @@@
&unknown(_g("package's section of control info file"));
}
}
- } elsif (s/^L //) {
- if (m/^Source$/i) {
- setsourcepackage($v);
- } elsif (m/^Maintainer$/i) {
- $f{"Changed-By"}=$v;
- } elsif (m/^(Version|Changes|Urgency|Distribution|Date|Closes)$/i) {
- $f{$_}= $v;
- } elsif (s/^X[BS]*C[BS]*-//i) {
- $f{$_}= $v;
- } elsif (!m/^X[BS]+-/i) {
- &unknown(_g("parsed version of changelog"));
- }
- } elsif (m/^o:.*/) {
- } else {
- internerr("value from nowhere, with key >%s< and value >%s<",
- $_, $v);
+ }
+ }
+
+ # Scan fields of dpkg-parsechangelog
+ foreach $_ (keys %{$changelog}) {
+ my $v = $changelog->{$_};
+ if (m/^Source$/i) {
+ set_source_package($v);
+ } elsif (m/^Maintainer$/i) {
+ $fields->{"Changed-By"} = $v;
+ } elsif (m/^(Version|Changes|Urgency|Distribution|Date|Closes)$/i) {
+ $fields->{$_} = $v;
+ } elsif (s/^X[BS]*C[BS]*-//i) {
+ $fields->{$_} = $v;
+ } elsif (!m/^X[BS]+-/i) {
+ &unknown(_g("parsed version of changelog"));
}
}
if ($changesdescription) {
- $f{'Changes'}= '';
+ $fields->{'Changes'} = '';
open(X,"<",$changesdescription) || &syserr(_g("read changesdescription"));
while(<X>) {
s/\s*\n$//;
$_= '.' unless m/\S/;
- $f{'Changes'}.= "\n $_";
+ $fields->{'Changes'}.= "\n $_";
}
}
for my $pa (keys %pa2f) {
my ($pp, $aa) = (split / /, $pa);
- defined($p2i{"C $pp"}) ||
+ defined($control->get_pkg_by_name($pp)) ||
warning(_g("package %s listed in files list but not in control info"),
$pp);
}
@@@ -354,9 -359,6 +359,6 @@@ for my $p (keys %p2f)
}
}
- &init_substvars;
- init_substvar_arch();
-
my $origsrcmsg;
if (!is_binaryonly) {
@@@ -371,14 -373,15 +373,15 @@@
warning(_g("missing Priority for source files"));
}
- (my $sversion = $substvar{'source:Version'}) =~ s/^\d+://;
+ (my $sversion = $substvars->get('source:Version')) =~ s/^\d+://;
$dsc= "$uploadfilesdir/${sourcepackage}_${sversion}.dsc";
open(CDATA, "<", $dsc) || syserr(_g("cannot open .dsc file %s"), $dsc);
push(@sourcefiles,"${sourcepackage}_${sversion}.dsc");
- parsecdata(\*CDATA, 'S', -1, sprintf(_g("source control file %s"), $dsc));
+ my $dsc_fields = parsecdata(\*CDATA, sprintf(_g("source control file
%s"), $dsc),
+ allow_pgp => 1);
- my $files = $fi{'S Files'};
+ my $files = $dsc_fields->{'Files'};
for my $file (split(/\n /, $files)) {
next if $file eq '';
$file =~ m/^([0-9a-f]{32})[ \t]+\d+[
\t]+([0-9a-zA-Z][-+:.,=0-9a-zA-Z_~]+)$/
@@@ -410,25 -413,25 +413,25 @@@
print(STDERR "$progname: $origsrcmsg\n") ||
&syserr(_g("write original source message")) unless $quiet;
- $f{'Format'}= $substvar{'Format'};
+ $fields->{'Format'} = $changes_format;
- if (!defined($f{'Date'})) {
+ if (!defined($fields->{'Date'})) {
chomp(my $date822 = `date -R`);
$? && subprocerr("date -R");
- $f{'Date'}= $date822;
+ $fields->{'Date'}= $date822;
}
- $f{'Binary'}= join(' ',grep(s/C //,keys %p2i));
+ $fields->{'Binary'} = join(' ', map { $_->{'Package'} }
$control->get_packages());
unshift(@archvalues,'source') unless is_binaryonly;
@archvalues = ('all') if $include == ARCH_INDEP;
@archvalues = grep {!debarch_eq('all',$_)} @archvalues
unless $include & ARCH_INDEP;
- $f{'Architecture'}= join(' ',@archvalues);
+ $fields->{'Architecture'} = join(' ',@archvalues);
- $f{'Description'}= "\n ".join("\n ",sort @descriptions);
+ $fields->{'Description'} = "\n ".join("\n ",sort @descriptions);
- $f{'Files'}= '';
+ $fields->{'Files'} = '';
my %filedone;
@@@ -451,34 -454,35 +454,35 @@@ for my $f (@sourcefiles, @fileslistfile
defined($md5sum{$f}) && $md5sum{$f} ne $md5sum &&
error(_g("md5sum of source file %s (%s) is different from md5sum " .
"in %s (%s)"), $uf, $md5sum, $dsc, $md5sum{$f});
- $f{'Files'}.= "\n $md5sum $size $f2sec{$f} $f2pri{$f} $f";
+ $fields->{'Files'}.= "\n $md5sum $size $f2sec{$f} $f2pri{$f} $f";
}
- $f{'Source'}= $sourcepackage;
- if ($f{'Version'} ne $substvar{'source:Version'}) {
- $f{'Source'} .= " ($substvar{'source:Version'})";
+ $fields->{'Source'}= $sourcepackage;
+ if ($fields->{'Version'} ne $substvars->get('source:Version')) {
+ $fields->{'Source'} .= " (" . $substvars->get('source:Version') . ")";
}
- $f{'Maintainer'} = $forcemaint if defined($forcemaint);
- $f{'Changed-By'} = $forcechangedby if defined($forcechangedby);
+ $fields->{'Maintainer'} = $forcemaint if defined($forcemaint);
+ $fields->{'Changed-By'} = $forcechangedby if defined($forcechangedby);
for my $f (qw(Version Distribution Maintainer Changes)) {
- defined($f{$f}) ||
+ defined($fields->{$f}) ||
error(_g("missing information for critical output field %s"), $f);
}
for my $f (qw(Urgency)) {
- defined($f{$f}) ||
+ defined($fields->{$f}) ||
warning(_g("missing information for output field %s"), $f);
}
for my $f (keys %override) {
- $f{capit($f)} = $override{$f};
+ $fields->{$f} = $override{$f};
}
for my $f (keys %remove) {
- delete $f{capit($f)};
+ delete $fields->{$f};
}
set_field_importance(@changes_fields);
- outputclose();
+ $substvars->parse($varlistfile) if -e $varlistfile;
+ tied(%{$fields})->output(\*STDOUT, $substvars);
diff --combined scripts/dpkg-shlibdeps.pl
index 4488def,eefec12..8462d10
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@@ -18,9 -18,7 +18,7 @@@ use Dpkg::Shlibs::SymbolFile
use Dpkg::Arch qw(get_host_arch);
use Dpkg::Fields qw(capit);
use Dpkg::Deps;
-
- push(@INC,$dpkglibdir);
- require 'controllib.pl';
+ use Dpkg::Control;
# By increasing importance
my @depfields = qw(Suggests Recommends Depends Pre-Depends);
@@@ -38,15 -36,12 +36,15 @@@ my $varnameprefix = 'shlibs'
my $ignore_missing_info = 0;
my $debug = 0;
my @exclude = ();
+my @pkg_dir_to_search = ();
my $host_arch = get_host_arch();
-my (@pkg_shlibs, @pkg_symbols);
+my (@pkg_shlibs, @pkg_symbols, @pkg_root_dirs);
if (-d "debian") {
push @pkg_symbols, <debian/*/DEBIAN/symbols>;
push @pkg_shlibs, <debian/*/DEBIAN/shlibs>;
+ my %uniq = map { guess_pkg_root_dir($_) => 1 } (@pkg_symbols,
@pkg_shlibs);
+ push @pkg_root_dirs, keys %uniq;
}
my ($stdout, %exec);
@@@ -57,8 -52,6 +55,8 @@@ foreach (@ARGV)
$varnameprefix = $1;
} elsif (m/^-L(.*)$/) {
$shlibslocal = $1;
+ } elsif (m/^-S(.*)$/) {
+ push @pkg_dir_to_search, $1;
} elsif (m/^-O$/) {
$stdout = 1;
} elsif (m/^-(h|-help)$/) {
@@@ -92,10 -85,10 +90,10 @@@
scalar keys %exec || usageerr(_g("need at least one executable"));
- our %fi;
- parsecontrolfile("debian/control");
- my $build_depends = defined($fi{"C Build-Depends"}) ?
- $fi{"C Build-Depends"} : "";
+ my $control = Dpkg::Control->new();
+ my $fields = $control->get_source();
+ my $build_depends = defined($fields->{"Build-Depends"}) ?
+ $fields->{"Build-Depends"} : "";
my $build_deps = Dpkg::Deps::parse($build_depends, reduce_arch => 1);
my %dependencies;
@@@ -103,6 -96,7 +101,6 @@@ my %shlibs
my $cur_field;
foreach my $file (keys %exec) {
- my $pkg_root = guess_pkg_root_dir($file);
$cur_field = $exec{$file};
print "Scanning $file (for $cur_field field)\n" if $debug;
@@@ -119,7 -113,7 +117,7 @@@
$soname_notfound{$soname} = 1;
my $msg = _g("couldn't find library %s needed by %s (its RPATH is
'%s').\n" .
"Note: libraries are not searched in other binary
packages " .
- "that do not have any shlibs file.\nTo help
dpkg-shlibdeps " .
+ "that do not have any shlibs or symbols file.\nTo help
dpkg-shlibdeps " .
"find private libraries, you might need to set
LD_LIBRARY_PATH.");
if (scalar(split_soname($soname))) {
failure($msg, $soname, $file, join(":", @{$obj->{RPATH}}));
@@@ -164,7 -158,7 +162,7 @@@
my $dpkg_symfile;
if ($packagetype eq "deb") {
# Use fine-grained dependencies only on real deb
- $dpkg_symfile = find_symbols_file($pkg, $soname);
+ $dpkg_symfile = find_symbols_file($pkg, $soname, $lib);
if (defined $dpkg_symfile) {
# Load symbol information
print "Using symbols file $dpkg_symfile for $soname\n" if
$debug;
@@@ -186,7 -180,7 +184,7 @@@
my $libobj = $dumplibs_wo_symfile->get_object($id);
# Only try to generate a dependency for libraries with a SONAME
if ($libobj->is_public_library() and not
- add_shlibs_dep($soname, $pkg, $pkg_root)) {
+ add_shlibs_dep($soname, $pkg, $lib)) {
# This failure is fairly new, try to be kind by
# ignoring as many cases that can be safely ignored
my $ignore = 0;
@@@ -391,8 -385,6 +389,8 @@@ Options
-T<varlistfile> update variables here, not debian/substvars.
-t<type> set package type (default is deb).
-x<package> exclude package from the generated dependencies.
+ -S<pkgbuilddir> search needed libraries in the given
+ package build directory first.
--admindir=<directory> change the administrative directory.
-h, --help show this help message.
--version show the version.
@@@ -450,21 -442,12 +448,21 @@@ sub update_dependency_version
}
sub add_shlibs_dep {
- my ($soname, $pkg, $pkg_root) = @_;
+ my ($soname, $pkg, $libfile) = @_;
my @shlibs = ($shlibslocal, $shlibsoverride);
- # Make sure the shlibs of the current package is analyzed before the
- # shlibs of other binary package from the same source
- push @shlibs, "$pkg_root/DEBIAN/shlibs" if defined($pkg_root);
- push @shlibs, @pkg_shlibs, "$admindir/info/$pkg.shlibs", $shlibsdefault;
+ if ($pkg eq "") {
+ #Â If the file is not packaged, try to find out the shlibs file in
+ # the package being built where the lib has been found
+ my $pkg_root = guess_pkg_root_dir($libfile);
+ if (defined $pkg_root) {
+ push @shlibs, "$pkg_root/DEBIAN/shlibs";
+ }
+ # Fallback to other shlibs files but it shouldn't be necessary
+ push @shlibs, @pkg_shlibs;
+ } else {
+ push @shlibs, "$admindir/info/$pkg.shlibs";
+ }
+ push @shlibs, $shlibsdefault;
print "Looking up shlibs dependency of $soname provided by '$pkg'\n" if
$debug;
foreach my $file (@shlibs) {
next if not -e $file;
@@@ -535,24 -518,12 +533,24 @@@ sub extract_from_shlibs
}
sub find_symbols_file {
- my ($pkg, $soname) = @_;
- foreach my $file (@pkg_symbols,
- "/etc/dpkg/symbols/$pkg.symbols.$host_arch",
- "/etc/dpkg/symbols/$pkg.symbols",
- "$admindir/info/$pkg.symbols")
- {
+ my ($pkg, $soname, $libfile) = @_;
+ my @files;
+ if ($pkg eq "") {
+ #Â If the file is not packaged, try to find out the symbols file in
+ # the package being built where the lib has been found
+ my $pkg_root = guess_pkg_root_dir($libfile);
+ if (defined $pkg_root) {
+ push @files, "$pkg_root/DEBIAN/symbols";
+ }
+ # Fallback to other symbols files but it shouldn't be necessary
+ push @files, @pkg_symbols;
+ } else {
+ push @files, "/etc/dpkg/symbols/$pkg.symbols.$host_arch",
+ "/etc/dpkg/symbols/$pkg.symbols",
+ "$admindir/info/$pkg.symbols";
+ }
+
+ foreach my $file (@files) {
if (-e $file and symfile_has_soname($file, $soname)) {
return $file;
}
@@@ -604,23 -575,17 +602,23 @@@ sub my_find_library
push @RPATH, $path;
}
- # Look into the packages we're currently building (but only those
- # that provides shlibs file and the one that contains the binary being
- # anlyzed...)
- # TODO: we should probably replace that by a cleaner way to look into
- # the various temporary build directories...
- my @copy = (@pkg_shlibs);
+ # Look into the packages we're currently building in the following
+ # order:
+ # - package build tree of the binary which is analyzed
+ # - package build tree given on the command line (option -S)
+ # - other package build trees that contain either a shlibs or a
+ # symbols file
+ my @builddirs;
my $pkg_root = guess_pkg_root_dir($execfile);
- unshift @copy, $pkg_root if defined $pkg_root;
- foreach my $builddir (map { s{/DEBIAN/shlibs$}{}; $_ } @copy) {
+ push @builddirs, $pkg_root if defined $pkg_root;
+ push @builddirs, @pkg_dir_to_search;
+ push @builddirs, @pkg_root_dirs;
+ my %dir_checked;
+ foreach my $builddir (@builddirs) {
+ next if defined($dir_checked{$builddir});
$file = find_library($lib, [EMAIL PROTECTED], $format, $builddir);
return $file if defined($file);
+ $dir_checked{$builddir} = 1;
}
# Fallback in the root directory if we have not found what we were
diff --combined scripts/dpkg-source.pl
index e74feb6,6458007..f8445a1
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@@ -12,6 -12,12 +12,12 @@@ use Dpkg::Arch qw(debarch_eq)
use Dpkg::Deps qw(@src_dep_fields %dep_field_type);
use Dpkg::Fields qw(capit set_field_importance);
use Dpkg::Compression;
+ use Dpkg::Cdata;
+ use Dpkg::Control;
+ use Dpkg::Substvars;
+ use Dpkg::Version qw(check_version);
+ use Dpkg::Vars;
+ use Dpkg::Changelog qw(parse_changelog);
my @filesinarchive;
my %dirincluded;
@@@ -19,7 -25,7 +25,7 @@@ my %notfileobject
my $fn;
my $ur;
- my $varlistfile;
+ my $varlistfile = "debian/substvars";
my $controlfile;
my $changelogfile;
my $changelogformat;
@@@ -100,20 -106,14 +106,14 @@@ my %dirtocreate; # used by checkdif
my @tar_ignore;
+ my $substvars = Dpkg::Substvars->new();
+
use POSIX;
use Fcntl qw (:mode);
use English;
use File::Temp qw (tempfile);
use Cwd;
- push (@INC, $dpkglibdir);
- require 'controllib.pl';
-
- our (%f, %fi);
- our $sourcepackage;
- our %substvar;
- our @src_dep_fields;
-
textdomain("dpkg-dev");
my @dsc_fields = (qw(Format Source Binary Architecture Version Origin
@@@ -250,9 -250,9 +250,9 @@@ while (@ARGV && $ARGV[0] =~ m/^-/)
$tar_ignore_default_pattern_done = 1;
}
} elsif (m/^-V(\w[-:0-9A-Za-z]*)[=:]/) {
- $substvar{$1}= $POSTMATCH;
+ $substvars->set($1, $POSTMATCH);
} elsif (m/^-T/) {
- $varlistfile= $POSTMATCH;
+ $varlistfile = $POSTMATCH;
} elsif (m/^-(h|-help)$/) {
&usage; exit(0);
} elsif (m/^--version$/) {
@@@ -291,45 -291,49 +291,49 @@@ if ($opmode eq 'build')
$changelogfile= "$dir/debian/changelog" unless defined($changelogfile);
$controlfile= "$dir/debian/control" unless defined($controlfile);
- parsechangelog($changelogfile, $changelogformat);
- parsecontrolfile($controlfile);
- $f{"Format"}= $compression eq 'gzip' ? $def_dscformat : '2.0';
- &init_substvars;
+ my $changelog = parse_changelog($changelogfile, $changelogformat);
+ my $control = Dpkg::Control->new($controlfile);
+ my $fields = Dpkg::Fields::Object->new();
+
+ $fields->{"Format"} = $compression eq 'gzip' ? $def_dscformat : '2.0';
my @sourcearch;
my %archadded;
my $archspecific = 0; # XXX: Not used?!
- my %packageadded;
my @binarypackages;
- for $_ (keys %fi) {
- my $v = $fi{$_};
+ # Scan control info of source package
+ my $src_fields = $control->get_source();
+ foreach $_ (keys %{$src_fields}) {
+ my $v = $src_fields->{$_};
+ if (m/^Source$/i) {
+ set_source_package($v);
+ } elsif (m/^(Standards-Version|Origin|Maintainer|Homepage)$/i ||
+ m/^Vcs-(Browser|Arch|Bzr|Cvs|Darcs|Git|Hg|Mtn|Svn)$/i) {
+ $fields->{$_} = $v;
+ }
+ elsif (m/^Uploaders$/i) { ($fields->{$_} = $v) =~ s/[\r\n]//g; }
+ elsif (m/^Build-(Depends|Conflicts)(-Indep)?$/i) {
+ my $dep;
+ my $type = $dep_field_type{capit($_)};
+ $dep = Dpkg::Deps::parse($v, union => $type eq 'union');
+ error(_g("error occurred while parsing %s"), $_) unless defined
$dep;
+ my $facts = Dpkg::Deps::KnownFacts->new();
+ $dep->simplify_deps($facts);
+ $dep->sort();
+ $fields->{$_} = $dep->dump();
+ }
+ elsif (s/^X[BC]*S[BC]*-//i) { $fields->{$_} = $v; }
+ elsif (m/^(Section|Priority|Files|Bugs)$/i || m/^X[BC]+-/i) { }
+ else { &unknown(_g('general section of control info file')); }
+ }
- if (s/^C //) {
- if (m/^Source$/i) {
- setsourcepackage($v);
- } elsif (m/^(Standards-Version|Origin|Maintainer|Homepage)$/i ||
- m/^Vcs-(Browser|Arch|Bzr|Cvs|Darcs|Git|Hg|Mtn|Svn)$/i) {
- $f{$_}= $v;
- }
- elsif (m/^Uploaders$/i) { ($f{$_}= $v) =~ s/[\r\n]//g; }
- elsif (m/^Build-(Depends|Conflicts)(-Indep)?$/i) {
- my $dep;
- my $type = $dep_field_type{capit($_)};
- $dep = Dpkg::Deps::parse($v, union => $type eq 'union');
- error(_g("error occurred while parsing %s"), $_) unless defined
$dep;
- my $facts = Dpkg::Deps::KnownFacts->new();
- $dep->simplify_deps($facts);
- $dep->sort();
- $f{$_}= $dep->dump();
- }
- elsif (s/^X[BC]*S[BC]*-//i) { $f{$_}= $v; }
- elsif (m/^(Section|Priority|Files|Bugs)$/i || m/^X[BC]+-/i) { }
- else { &unknown(_g('general section of control info file')); }
- } elsif (s/^C(\d+) //) {
- my $i = $1;
- my $p = $fi{"C$i Package"};
- push(@binarypackages,$p) unless $packageadded{$p}++;
+ # Scan control info of binary packages
+ foreach my $pkg ($control->get_packages()) {
+ my $p = $pkg->{'Package'};
+ push(@binarypackages,$p);
+ foreach $_ (keys %{$pkg}) {
+ my $v = $pkg->{$_};
if (m/^Architecture$/) {
if (debarch_eq($v, 'any')) {
@sourcearch= ('any');
@@@ -355,11 -359,11 +359,11 @@@
}
}
}
- $f{'Architecture'}= join(' ',@sourcearch);
+ $fields->{'Architecture'}= join(' ',@sourcearch);
} elsif (s/^X[BC]*S[BC]*-//i) {
- $f{$_}= $v;
+ $fields->{$_} = $v;
} elsif (m/^(Package|Package-Type|Essential|Kernel-Version)$/ ||
- m/^(Subarchitecture|Installer-Menu-Item)$/i ||
+ m/^(Homepage|Subarchitecture|Installer-Menu-Item)$/i ||
m/^(Pre-Depends|Depends|Provides)$/i ||
m/^(Recommends|Suggests|Conflicts|Replaces)$/i ||
m/^(Breaks|Enhances|Description|Tag|Section|Priority)$/i
||
@@@ -367,46 -371,47 +371,47 @@@
} else {
&unknown(_g("package's section of control info file"));
}
- } elsif (s/^L //) {
- if (m/^Source$/) {
- setsourcepackage($v);
- } elsif (m/^Version$/) {
- checkversion( $v );
- $f{$_}= $v;
- } elsif (s/^X[BS]*C[BS]*-//i) {
- $f{$_}= $v;
- } elsif
(m/^(Maintainer|Changes|Urgency|Distribution|Date|Closes)$/i ||
- m/^X[BS]+-/i) {
- } else {
- &unknown(_g("parsed version of changelog"));
- }
- } elsif (m/^o:.*/) {
- } else {
- internerr(_g("value from nowhere, with key >%s< and value >%s<"),
- $_, $v);
- }
+ }
+ }
+
+ # Scan fields of dpkg-parsechangelog
+ foreach $_ (keys %{$changelog}) {
+ my $v = $changelog->{$_};
+
+ if (m/^Source$/) {
+ set_source_package($v);
+ } elsif (m/^Version$/) {
+ check_version($v);
+ $fields->{$_} = $v;
+ } elsif (s/^X[BS]*C[BS]*-//i) {
+ $fields->{$_} = $v;
+ } elsif (m/^(Maintainer|Changes|Urgency|Distribution|Date|Closes)$/i ||
+ m/^X[BS]+-/i) {
+ } else {
+ &unknown(_g("parsed version of changelog"));
+ }
}
- $f{'Binary'}= join(', ',@binarypackages);
- for my $f (keys %override) {
- $f{capit($f)} = $override{$f};
+ $fields->{'Binary'}= join(', ', @binarypackages);
+ foreach my $f (keys %override) {
+ $fields->{$f} = $override{$f};
}
for my $f (qw(Version)) {
- defined($f{$f}) ||
+ defined($fields->{$f}) ||
error(_g("missing information for critical output field %s"), $f);
}
for my $f (qw(Maintainer Architecture Standards-Version)) {
- defined($f{$f}) ||
+ defined($fields->{$f}) ||
warning(_g("missing information for output field %s"), $f);
}
defined($sourcepackage) || &error(_g("unable to determine source package
name !"));
- $f{'Source'}= $sourcepackage;
+ $fields->{'Source'} = $sourcepackage;
for my $f (keys %remove) {
- delete $f{capit($f)};
+ delete $fields->{$f};
}
- my $version = $f{'Version'};
+ my $version = $fields->{'Version'};
$version =~ s/^\d+://;
my $upstreamversion = $version;
$upstreamversion =~ s/-[^-]*$//;
@@@ -507,7 -512,7 +512,7 @@@
$tarname= $origtargz || "$basename.orig.tar.$comp_ext";
if ($tarname =~ /\Q$basename\E\.orig\.tar\.($comp_regex)/) {
- if (($1 ne 'gz') && ($f{'Format'} < 2)) { $f{'Format'} = '2.0' };
+ if (($1 ne 'gz') && ($fields->{'Format'} < 2)) {
$fields->{'Format'} = '2.0' };
} else {
warning(_g(".orig.tar name %s is not <package>_<upstreamversion>" .
".orig.tar (wanted %s)"),
@@@ -560,7 -565,7 +565,7 @@@
}
- addfile("$tarname");
+ addfile($fields, "$tarname");
if ($sourcestyle =~ m/[kpKP]/) {
@@@ -750,7 -755,7 +755,7 @@@
}
close(FIND); $? && subprocerr("find on $dirname");
- &addfile($diffname);
+ addfile($fields, $diffname);
}
@@@ -765,7 -770,8 +770,8 @@@
syserr(_g("create %s"), "$basenamerev.dsc");
set_field_importance(@dsc_fields);
- outputclose($varlistfile);
+ $substvars->parse($varlistfile) if -e $varlistfile;
+ tied(%{$fields})->output(\*STDOUT, $substvars);
if ($ur) {
printf(STDERR _g("%s: unrepresentable changes to source")."\n",
@@@ -829,31 -835,31 +835,31 @@@
warning(_g("extracting unsigned source package (%s)"), $dsc);
}
- open(CDATA, "< $dsc") || error(_g("cannot open .dsc file %s: %s"), $dsc,
$!);
- parsecdata(\*CDATA, 'S', -1, sprintf(_g("source control file %s"), $dsc));
+ open(CDATA, "<", $dsc) || error(_g("cannot open .dsc file %s: %s"), $dsc,
$!);
+ my $fields = parsecdata(\*CDATA, sprintf(_g("source control file %s"),
$dsc),
+ allow_pgp => 1);
close(CDATA);
for my $f (qw(Source Version Files)) {
- defined($fi{"S $f"}) ||
+ defined($fields->{$f}) ||
error(_g("missing critical source control field %s"), $f);
}
my $dscformat = $def_dscformat;
- if (defined $fi{'S Format'}) {
- if (not handleformat($fi{'S Format'})) {
- error(_g("Unsupported format of .dsc file (%s)"), $fi{'S Format'});
+ if (defined $fields->{'Format'}) {
+ if (not handleformat($fields->{'Format'})) {
+ error(_g("Unsupported format of .dsc file (%s)"),
$fields->{'Format'});
}
- $dscformat=$fi{'S Format'};
+ $dscformat=$fields->{'Format'};
}
- $sourcepackage = $fi{'S Source'}; # XXX: should use setsourcepackage??
- checkpackagename( $sourcepackage );
+ set_source_package($fields->{'Source'});
- my $version = $fi{'S Version'};
+ my $version = $fields->{'Version'};
my $baseversion;
my $revision;
- checkversion( $version );
+ check_version($version);
$version =~ s/^\d+://;
if ($version =~ m/-([^-]+)$/) {
$baseversion= $`; $revision= $1;
@@@ -861,7 -867,7 +867,7 @@@
$baseversion= $version; $revision= '';
}
- my $files = $fi{'S Files'};
+ my $files = $fields->{'Files'};
my @tarfiles;
my $difffile;
my $debianfile;
@@@ -1625,7 -1631,7 +1631,7 @@@ sub reapgzip
my %added_files;
sub addfile {
- my ($filename)= @_;
+ my ($fields, $filename)= @_;
$added_files{$filename}++ &&
internerr(_g("tried to add file `%s' twice"), $filename);
stat($filename) || syserr(_g("could not stat output file `%s'"),
$filename);
@@@ -1633,7 -1639,7 +1639,7 @@@
my $md5sum= `md5sum <$filename`;
$? && &subprocerr("md5sum $filename");
$md5sum = readmd5sum( $md5sum );
- $f{'Files'}.= "\n $md5sum $size $filename";
+ $fields->{'Files'}.= "\n $md5sum $size $filename";
}
# replace \ddd with their corresponding character, refuse \ddd > \377
@@@ -1656,3 -1662,10 +1662,10 @@@ sub deoctify
return join("", @_);
} }
+ sub readmd5sum {
+ (my $md5sum = shift) or return;
+ $md5sum =~ s/^([0-9a-f]{32})\s*\*?-?\s*\n?$/$1/o
+ || failure(_g("md5sum gave bogus output `%s'"), $md5sum);
+ return $md5sum;
+ }
+
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]