The following commit has been merged in the master branch:
commit c5d44e22a98b09414619a06723a05e85c944ea12
Author: Raphaël Hertzog <[email protected]>
Date: Mon Mar 29 12:36:20 2010 +0200
Dpkg::Source::Package: do not overwrite debian/source/format if it already
exists
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index 6f3e779..c7c4554 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -339,10 +339,12 @@ sub extract {
{
my $srcdir = File::Spec->catdir($newdirectory, "debian", "source");
my $format_file = File::Spec->catfile($srcdir, "format");
- mkdir($srcdir) unless -e $srcdir;
- open(FORMAT, ">", $format_file) || syserr(_g("cannot write %s"),
$format_file);
- print FORMAT $self->{'fields'}{'Format'} . "\n";
- close(FORMAT);
+ unless (-e $format_file) {
+ mkdir($srcdir) unless -e $srcdir;
+ open(FORMAT, ">", $format_file) || syserr(_g("cannot write %s"),
$format_file);
+ print FORMAT $self->{'fields'}{'Format'} . "\n";
+ close(FORMAT);
+ }
}
# Make sure debian/rules is executable
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]