summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rw-r--r--scripts/Dpkg/Source/Quilt.pm3
2 files changed, 7 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index ee103a5..074a3d6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
dpkg (1.16.9) UNRELEASED; urgency=low
+ [ Raphaƫl Hertzog ]
+ * Fix dpkg-source regression in "3.0 (quilt)" source packages while
+ unapplying patches that remove all files in a directory. Closes: #683547
+
[ Updated programs translations ]
* Czech (Miroslav Kure).
* Portuguese (Miguel Figueiredo). Closes: #682582
diff --git a/scripts/Dpkg/Source/Quilt.pm b/scripts/Dpkg/Source/Quilt.pm
index 25819df..5ca9fb7 100644
--- a/scripts/Dpkg/Source/Quilt.pm
+++ b/scripts/Dpkg/Source/Quilt.pm
@@ -29,6 +29,8 @@ use Dpkg::Vendor qw(get_current_vendor);
use File::Spec;
use File::Copy;
use File::Find;
+use File::Path qw(make_path);
+use File::Basename;
sub new {
my ($this, $dir, %opts) = @_;
@@ -287,6 +289,7 @@ sub restore_quilt_backup_files {
my $target = File::Spec->catfile($self->{'dir'}, $relpath_in_srcpkg);
if (-s $_) {
unlink($target);
+ make_path(dirname($target));
unless (link($_, $target)) {
copy($_, $target) ||
syserr(_g("failed to copy %s to %s"), $_, $target);