Просмотр исходного кода

Dpkg::Source::Archiver/Patch: Rename close() methods into finish()

* scripts/Dpkg/Source/Archiver.pm: Rename close() method into finish()
to avoid ambiguity with CORE::close().
* scripts/Dpkg/Source/Patch.pm: Same.
* scripts/dpkg-source.pl: Updated accordingly.
Raphael Hertzog лет назад: 18
Родитель
Сommit
d357ae0e90
3 измененных файлов с 5 добавлено и 5 удалено
  1. 1 1
      scripts/Dpkg/Source/Archiver.pm
  2. 2 2
      scripts/Dpkg/Source/Patch.pm
  3. 2 2
      scripts/dpkg-source.pl

+ 1 - 1
scripts/Dpkg/Source/Archiver.pm

@@ -67,7 +67,7 @@ sub add_directory {
     $self->_add_entry($file);
 }
 
-sub close {
+sub finish {
     my ($self) = @_;
     close($self->{'tar_input'}) or syserr(_g("close on tar input"));
     wait_child($self->{'pid'}, cmdline => 'tar -cf -');

+ 2 - 2
scripts/Dpkg/Source/Patch.pm

@@ -49,7 +49,7 @@ sub create {
         } else {
             $self->_fail_not_same_type($opts{'old'}, $opts{'new'});
         }
-        $self->close() unless $opts{"noclose"};
+        $self->finish() unless $opts{"nofinish"};
     }
 }
 
@@ -209,7 +209,7 @@ sub add_diff_directory {
     find({ wanted => $scan_old, no_chdir => 1 }, $old);
 }
 
-sub close {
+sub finish {
     my ($self) = @_;
     close($self->{'handle'}) ||
             syserr(_g("cannot close %s"), $self->get_filename());

+ 2 - 2
scripts/dpkg-source.pl

@@ -603,7 +603,7 @@ if ($opmode eq 'build') {
 		    compression_level => $comp_level);
 	$tar->create(options => \@tar_ignore);
 	$tar->add_directory($tardirname);
-	$tar->close();
+	$tar->finish();
         rename($newtar, $tarname) ||
             syserr(_g("unable to rename `%s' (newly created) to `%s'"),
                    $newtar, $tarname);
@@ -657,7 +657,7 @@ if ($opmode eq 'build') {
         $diff->add_diff_directory($origdir, $dir,
                 basedirname => $basedirname,
                 diff_ignore_regexp => $diff_ignore_regexp);
-        $diff->close() || $ur++;
+        $diff->finish() || $ur++;
 
 	rename($newdiffgz, $diffname) ||
 	    syserr(_g("unable to rename `%s' (newly created) to `%s'"),