]> err.no Git - dpkg/commitdiff
Miscellaneous fixes
authorRaphael Hertzog <hertzog@debian.org>
Sun, 2 Mar 2008 13:08:55 +0000 (14:08 +0100)
committerRaphael Hertzog <hertzog@debian.org>
Sun, 2 Mar 2008 13:08:55 +0000 (14:08 +0100)
* 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.

scripts/Dpkg/Source/Package/V1_0.pm
scripts/Dpkg/Source/Patch.pm
scripts/Makefile.am

index 46ea4b1d20c9a49f15df0370d9273140dda37598..a4bd971f30e81d14a3b1dad96c8a653709974189 100644 (file)
@@ -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'"),
index 81974677b7ef6169e8546502df8746d775faf7d7..b272124fc83ddb6629d0ef659be327191586d305 100644 (file)
@@ -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 _) {
index 221c24b414704eff7a63d6cbf2902da7754dc035..aac6e43f47e628e4c241a72b819e7e8dc20390ad 100644 (file)
@@ -114,8 +114,8 @@ nobase_dist_perllib_DATA = \
        Dpkg/Source/Package/V1_0.pm \
        Dpkg/Source/Package/V1_0/native.pm \
        Dpkg/Source/Package/V2_0.pm \
+       Dpkg/Source/Package/V3_0/git.pm \
        Dpkg/Source/Patch.pm \
-       Dpkg/Source/VCS/git.pm \
        Dpkg.pm
 
 do_perl_subst = sed -e "s:^\#![:space:]*/usr/bin/perl:\#!$(PERL):" \