From e668f8a56fdd423492f40288d1900b198b9b188c Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sat, 1 Mar 2008 00:00:10 +0100 Subject: [PATCH] Use the new Dpkg::ErrorHandling::info() function --- scripts/Dpkg/Source/Package/V1_0.pm | 18 +++++++++--------- scripts/Dpkg/Source/Package/V2_0.pm | 16 ++++++++-------- scripts/Dpkg/Source/Package/V3_0/git.pm | 8 ++++---- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/Dpkg/Source/Package/V1_0.pm b/scripts/Dpkg/Source/Package/V1_0.pm index 9e0c5234..4d63b3f0 100644 --- a/scripts/Dpkg/Source/Package/V1_0.pm +++ b/scripts/Dpkg/Source/Package/V1_0.pm @@ -23,7 +23,7 @@ use base 'Dpkg::Source::Package'; use Dpkg; use Dpkg::Gettext; -use Dpkg::ErrorHandling qw(error syserr warning usageerr subprocerr); +use Dpkg::ErrorHandling qw(error syserr warning usageerr subprocerr info); use Dpkg::Compression; use Dpkg::Source::Archive; use Dpkg::Source::Patch; @@ -86,7 +86,7 @@ sub do_extract { "$newdirectory.tmp-keep"); } - printf(_g("%s: unpacking %s")."\n", $progname, $tarfile); + info(_g("unpacking %s"), $tarfile); my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile"); $tar->extract($expectprefix); @@ -145,7 +145,7 @@ sub do_extract { if ($difffile) { my $patch = "$dscdir$difffile"; - printf(_g("%s: applying %s")."\n", $progname, $patch); + info(_g("applying %s"), $patch); my $patch_obj = Dpkg::Source::Patch->new(filename => $patch); $patch_obj->apply($newdirectory, force_timestamp => 1, timestamp => time()); @@ -285,8 +285,8 @@ sub do_build { syserr(_g("unable to check for existence of `%s'"), $tarname); } - printf(_g("%s: building %s in %s")."\n", - $progname, $sourcepackage, $tarname); + info(_g("building %s in %s"), + $sourcepackage, $tarname); my ($ntfh, $newtar) = tempfile("$tarname.new.XXXXXX", DIR => getcwd(), UNLINK => 0); @@ -302,8 +302,8 @@ sub do_build { chmod(0666 &~ umask(), $tarname) || syserr(_g("unable to change permission of `%s'"), $tarname); } else { - printf(_g("%s: building %s using existing %s")."\n", - $progname, $sourcepackage, $tarname); + info(_g("building %s using existing %s"), + $sourcepackage, $tarname); } $self->add_file($tarname); @@ -330,8 +330,8 @@ sub do_build { my $ur; # Unrepresentable changes if ($sourcestyle =~ m/[kpursKPUR]/) { my $diffname = "$basenamerev.diff.gz"; - printf(_g("%s: building %s in %s")."\n", - $progname, $sourcepackage, $diffname); + info(_g("building %s in %s"), + $sourcepackage, $diffname); my ($ndfh, $newdiffgz) = tempfile("$diffname.new.XXXXXX", DIR => getcwd(), UNLINK => 0); my $diff = Dpkg::Source::Patch->new(filename => $newdiffgz, diff --git a/scripts/Dpkg/Source/Package/V2_0.pm b/scripts/Dpkg/Source/Package/V2_0.pm index 2eeb3677..309bb7d4 100644 --- a/scripts/Dpkg/Source/Package/V2_0.pm +++ b/scripts/Dpkg/Source/Package/V2_0.pm @@ -23,7 +23,7 @@ use base 'Dpkg::Source::Package'; use Dpkg; use Dpkg::Gettext; -use Dpkg::ErrorHandling qw(error syserr warning usageerr subprocerr); +use Dpkg::ErrorHandling qw(error syserr warning usageerr subprocerr info); use Dpkg::Compression; use Dpkg::Source::Archive; use Dpkg::Source::Patch; @@ -71,14 +71,14 @@ sub do_extract { erasedir($newdirectory); # Extract main tarball - printf(_g("%s: unpacking %s")."\n", $progname, $tarfile); + info(_g("unpacking %s"), $tarfile); my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile"); $tar->extract($newdirectory); # Extract additional orig tarballs foreach my $subdir (keys %origtar) { my $file = $origtar{$subdir}; - printf(_g("%s: unpacking %s")."\n", $progname, $file); + info(_g("unpacking %s"), $file); $tar = Dpkg::Source::Archive->new(filename => "$dscdir$file"); $tar->extract("$newdirectory/$subdir"); } @@ -117,7 +117,7 @@ sub apply_patches { my ($self, $dir, $skip_auto) = @_; my $timestamp = time(); foreach my $patch ($self->get_patches($dir, $skip_auto)) { - printf(_g("%s: applying %s")."\n", $progname, basename($patch)) unless $skip_auto; + info(_g("applying %s"), basename($patch)) unless $skip_auto; my $patch_obj = Dpkg::Source::Patch->new(filename => $patch); $patch_obj->apply($dir, force_timestamp => 1, timestamp => $timestamp); @@ -168,8 +168,8 @@ sub do_build { error(_g("no orig.tar file found")) unless $tarfile; - printf(_g("%s: building %s using existing %s")."\n", - $progname, $sourcepackage, "@origtarballs"); + info(_g("building %s using existing %s"), + $sourcepackage, "@origtarballs"); # Unpack a second copy for comparison my $tmp = tempdir("$dirname.orig.XXXXXX", DIR => $updir); @@ -225,8 +225,8 @@ sub do_build { # Create the debian.tar my $debianfile = "$basenamerev.debian.tar." . $self->{'options'}{'comp_ext'}; - printf(_g("%s: building %s in %s")."\n", - $progname, $sourcepackage, $debianfile); + info(_g("building %s in %s"), + $sourcepackage, $debianfile); $tar = Dpkg::Source::Archive->new(filename => $debianfile); $tar->create(options => \@tar_ignore, 'chdir' => $dir); $tar->add_directory("debian"); diff --git a/scripts/Dpkg/Source/Package/V3_0/git.pm b/scripts/Dpkg/Source/Package/V3_0/git.pm index 37dce26b..73171a6a 100644 --- a/scripts/Dpkg/Source/Package/V3_0/git.pm +++ b/scripts/Dpkg/Source/Package/V3_0/git.pm @@ -33,7 +33,7 @@ use File::Temp qw(tempdir); use Dpkg; use Dpkg::Gettext; use Dpkg::Compression; -use Dpkg::ErrorHandling qw(error warning subprocerr syserr); +use Dpkg::ErrorHandling qw(error warning subprocerr syserr info); use Dpkg::Version qw(check_version); use Dpkg::Source::Archive; use Dpkg::Exit; @@ -205,8 +205,8 @@ sub do_build { # Create the tar file my $debianfile = "$basenamerev.git.tar." . $self->{'options'}{'comp_ext'}; - printf(_g("%s: building %s in %s")."\n", - $progname, $sourcepackage, $debianfile); + info(_g("building %s in %s"), + $sourcepackage, $debianfile); my $tar = Dpkg::Source::Archive->new(filename => $debianfile, compression => $self->{'options'}{'compression'}, compression_level => $self->{'options'}{'comp_level'}); @@ -245,7 +245,7 @@ sub do_extract { erasedir($newdirectory); # Extract main tarball - printf(_g("%s: unpacking %s")."\n", $progname, $tarfile); + info(_g("unpacking %s"), $tarfile); my $tar = Dpkg::Source::Archive->new(filename => "$dscdir$tarfile"); $tar->extract($newdirectory); -- 2.39.5