| author | Raphaël Hertzog <hertzog@debian.org> | |
| Fri, 23 Dec 2011 13:52:34 +0000 (14:52 +0100) | ||
| committer | Raphaël Hertzog <hertzog@debian.org> | |
| Fri, 23 Dec 2011 13:52:34 +0000 (14:52 +0100) |
With the “3.0 (quilt)” source format, dpkg-source would happily ignore the
patch-file parameter if it was not found, instead of properly erroring
out. Furthermore a relative filename would also not be found when the
given directory is "." since dpkg-source does a chdir("..") in that case.
Both issues are fixed by this commit.
Closes: #652414
Reported-by: Sam Hartman <hartmans@debian.org>
patch-file parameter if it was not found, instead of properly erroring
out. Furthermore a relative filename would also not be found when the
given directory is "." since dpkg-source does a chdir("..") in that case.
Both issues are fixed by this commit.
Closes: #652414
Reported-by: Sam Hartman <hartmans@debian.org>
| debian/changelog | patch | blob | history | |
| scripts/Dpkg/Source/Package/V2.pm | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
* Error out if a dpkg database .list file is not a regular file. LP: #369898
* Fix dpkg-mergechangelogs to not error out on invalid versions.
Closes: #651993
+ * Fix dpkg-source --commit on "3.0 (quilt)" when an explicit patch file
+ is given with a relative filename. Closes: #652414
[ Jonathan Nieder ]
* Bump po4a version in Build-Depends to 0.41, since earlier versions do
$self->prepare_build($dir);
- unless ($tmpdiff && -e $tmpdiff) {
+ # Try to fix up a broken relative filename for the patch
+ if ($tmpdiff and not -e $tmpdiff) {
+ $tmpdiff = File::Spec->catfile($dir, $tmpdiff)
+ unless File::Spec->file_name_is_absolute($tmpdiff);
+ error(_g("patch file '%s' doesn't exist"), $tmpdiff) if not -e $tmpdiff;
+ }
+
+ unless ($tmpdiff) {
$tmpdiff = $self->generate_patch($dir, usage => "commit");
}
push @Dpkg::Exit::handlers, sub { unlink($tmpdiff) };
