diff options
author | Raphael Hertzog <hertzog@debian.org> | 2008-03-02 14:08:55 +0100 |
---|---|---|
committer | Raphael Hertzog <hertzog@debian.org> | 2008-03-02 14:08:55 +0100 |
commit | ccc7a64b078e4b2c807aef3d56274e2f9178a6aa (patch) | |
tree | 71703c05e3b71b32d8f678763cd613db7680273c /scripts/Dpkg | |
parent | d3b6e4bca1dc499c61a177c72e6facdd3c0d9efa (diff) | |
download | dpkg-ccc7a64b078e4b2c807aef3d56274e2f9178a6aa.tar.gz |
Miscellaneous fixes
* scripts/Dpkg/Source/Package/V1_0.pm: Remove properly the
temporary file used for creating diff.gz file in case of
failure during its generation.
* scripts/Dpkg/Source/Patch.pm: The bad file was analyzed and
lead to failure of the stat call.
* scripts/Makefile.am: Add the new V3_0/git.pm file and
remove the old VCS/git.pm.
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r-- | scripts/Dpkg/Source/Package/V1_0.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Patch.pm | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/scripts/Dpkg/Source/Package/V1_0.pm b/scripts/Dpkg/Source/Package/V1_0.pm index 46ea4b1d2..a4bd971f3 100644 --- a/scripts/Dpkg/Source/Package/V1_0.pm +++ b/scripts/Dpkg/Source/Package/V1_0.pm @@ -314,6 +314,7 @@ sub do_build { $sourcepackage, $diffname); my ($ndfh, $newdiffgz) = tempfile("$diffname.new.XXXXXX", DIR => getcwd(), UNLINK => 0); + push @Dpkg::Exit::handlers, sub { unlink($newdiffgz) }; my $diff = Dpkg::Source::Patch->new(filename => $newdiffgz, compression => "gzip"); $diff->create(); @@ -321,6 +322,7 @@ sub do_build { basedirname => $basedirname, diff_ignore_regexp => $diff_ignore_regexp); $diff->finish() || $ur++; + pop @Dpkg::Exit::handlers; rename($newdiffgz, $diffname) || syserr(_g("unable to rename `%s' (newly created) to `%s'"), diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm index 81974677b..b272124fc 100644 --- a/scripts/Dpkg/Source/Patch.pm +++ b/scripts/Dpkg/Source/Patch.pm @@ -208,7 +208,7 @@ sub add_diff_directory { my $fn = File::Spec->abs2rel($_, $old); return if &$diff_ignore($fn); return if $files_in_new{$fn}; - lstat("$new/$fn") || syserr(_g("cannot stat file %s"), "$old/$fn"); + lstat("$old/$fn") || syserr(_g("cannot stat file %s"), "$old/$fn"); if (-f _) { warning(_g("ignoring deletion of file %s"), $fn); } elsif (-d _) { |