The following commit has been merged in the master branch:
commit 74f2648e4b8647fa30c881bf1524be9959aa75a1
Author: Raphaël Hertzog <[email protected]>
Date: Wed Nov 11 11:18:35 2009 +0100
dpkg-source: list upstream files modified by the diff during build
This only applies to "1.0" source packages using orig.tar.gz + diff.gz.
In that case, it also recommends usage of the new format 3.0 (quilt)
to keep changes separate and documented.
diff --git a/debian/changelog b/debian/changelog
index 76b8959..d31316b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -81,8 +81,10 @@ dpkg (1.15.5) UNRELEASED; urgency=low
* Modify dpkg-source -b to use default build options from
debian/source/options. Thus it's now possible to have sticky options, for
example for the choice of a compression method (-Z<comp>).
- * dpkg-source -x outputs the list of upstream files modified by the diff.gz
+ * dpkg-source outputs the list of upstream files modified by the diff.gz
(applies only to source packages using format 1.0). Closes: #482166
+ It also recommends usage of 3.0 (quilt) format during dpkg-source -b if it
+ detects changes to upstream files that are stored in the .diff.gz.
[ Updated dpkg translations ]
* Czech (Miroslav Kure).
diff --git a/scripts/Dpkg/Source/Package/V1.pm
b/scripts/Dpkg/Source/Package/V1.pm
index 17bd7ea..a7e8132 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -1,4 +1,4 @@
-# Copyright © 2008 Raphaël Hertzog <[email protected]>
+# Copyright © 2008-2009 Raphaël Hertzog <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -347,6 +347,16 @@ sub do_build {
$diff->finish() || $ur++;
pop @Dpkg::Exit::handlers;
+ my $analysis = $diff->analyze($origdir);
+ my @files = grep { ! m{^debian/} } map { s{^[^/]+/+}{}; $_ }
+ sort keys %{$analysis->{'filepatched'}};
+ if (scalar @files) {
+ warning(_g("the diff modifies the following upstream files: %s"),
+ "\n " . join("\n ", @files));
+ info(_g("use the '3.0 (quilt)' format to have separate and " .
+ "documented changes to upstream files, see
dpkg-source(1)"));
+ }
+
rename($newdiffgz, $diffname) ||
syserr(_g("unable to rename `%s' (newly created) to `%s'"),
$newdiffgz, $diffname);
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]