From d357ae0e902d838412eae57e5b9cd19e65f78d39 Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Fri, 22 Feb 2008 17:47:54 +0100 Subject: [PATCH] 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. --- scripts/Dpkg/Source/Archiver.pm | 2 +- scripts/Dpkg/Source/Patch.pm | 4 ++-- scripts/dpkg-source.pl | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/Dpkg/Source/Archiver.pm b/scripts/Dpkg/Source/Archiver.pm index 5f761bf2..69fd1045 100644 --- a/scripts/Dpkg/Source/Archiver.pm +++ b/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 -'); diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm index 6e7c2e62..14cd223f 100644 --- a/scripts/Dpkg/Source/Patch.pm +++ b/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()); diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 005240f7..1a793d84 100755 --- a/scripts/dpkg-source.pl +++ b/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'"), -- 2.39.5