From: Guillem Jover Date: Tue, 3 Apr 2007 03:43:20 +0000 (+0000) Subject: * scripts/controllib.pl (warn): Rename to ... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28c713b4063eaf4500a831b3415ca3617987c8fb;p=dpkg * scripts/controllib.pl (warn): Rename to ... (warning): ... this, to avoid collisions with the perl builtin. Fix all users. --- diff --git a/ChangeLog b/ChangeLog index bfdb94e5..3bb38903 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-04-03 Guillem Jover + + * scripts/controllib.pl (warn): Rename to ... + (warning): ... this, to avoid collisions with the perl builtin. Fix + all users. + 2007-04-03 Guillem Jover * scripts/controllib.pl: Use defined instead of length, when variables diff --git a/scripts/822-date.pl b/scripts/822-date.pl index 800625dd..d7bd76cf 100755 --- a/scripts/822-date.pl +++ b/scripts/822-date.pl @@ -12,7 +12,7 @@ require 'controllib.pl'; @ARGV && die _g("Usage: 822-date")."\n"; -&warn(_g("This program is deprecated. Please use 'date -R' instead.")); +warning(_g("This program is deprecated. Please use 'date -R' instead.")); print `date -R`; diff --git a/scripts/controllib.pl b/scripts/controllib.pl index 59738e5c..a924d835 100755 --- a/scripts/controllib.pl +++ b/scripts/controllib.pl @@ -68,7 +68,7 @@ sub getfowner die(sprintf(_g('unable to get login information for username "%s"'), $getlogin)); } } else { - &warn (sprintf(_g('no utmp entry available and LOGNAME not defined; using uid of process (%d)'), $<)); + warning(sprintf(_g('no utmp entry available and LOGNAME not defined; using uid of process (%d)'), $<)); @fowner = getpwuid($<); if (!@fowner) { die (sprintf(_g('unable to get login information for uid %d'), $<)); @@ -156,7 +156,7 @@ sub substvars { $v= $lhs.$substvar{$vn}.$rhs; $count++; } else { - &warn(sprintf(_g("unknown substitution variable \${%s}"), $vn)); + warning(sprintf(_g("unknown substitution variable \${%s}"), $vn)); $v= $lhs.$rhs; } } @@ -283,7 +283,7 @@ ALTERNATE: } } if (length($dep_or)) { - &warn(sprintf(_g("can't parse dependency %s"),$dep_and)); + warning(sprintf(_g("can't parse dependency %s"), $dep_and)); return undef; } push @or_list, [ $package, $relation, $version, \@arches ]; @@ -437,7 +437,8 @@ sub parsecdata { sub unknown { my $field = $_; - &warn(sprintf(_g("unknown information field \`%s\' in input data in %s"), $field, $_[0])); + warning(sprintf(_g("unknown information field '%s' in input data in %s"), + $field, $_[0])); } sub syntax { @@ -448,14 +449,29 @@ sub failure { die sprintf(_g("%s: failure: %s"), $progname, $_[0])."\n"; } sub syserr { die sprintf(_g("%s: failure: %s: %s"), $progname, $_[0], $!)."\n"; } sub error { die sprintf(_g("%s: error: %s"), $progname, $_[0])."\n"; } sub internerr { die sprintf(_g("%s: internal error: %s"), $progname, $_[0])."\n"; } -sub warn { if (!$quiet_warnings) { warn sprintf(_g("%s: warning: %s"), $progname, $_[0])."\n"; } } + +sub warning +{ + if (!$quiet_warnings) { + warn sprintf(_g("%s: warning: %s"), $progname, $_[0])."\n"; + } +} + sub usageerr { printf(STDERR "%s: %s\n\n", $progname, "@_"); &usage; exit(2); } -sub warnerror { if ($warnable_error) { &warn( @_ ); } else { &error( @_ ); } } + +sub warnerror +{ + if ($warnable_error) { + warning(@_); + } else { + error(@_); + } +} sub subprocerr { local ($p) = @_; diff --git a/scripts/dpkg-architecture.pl b/scripts/dpkg-architecture.pl index 1c2b30b8..6194e613 100755 --- a/scripts/dpkg-architecture.pl +++ b/scripts/dpkg-architecture.pl @@ -163,7 +163,7 @@ $deb_build_gnu_type = &debian_to_gnu($deb_build_arch); # Default host: Current gcc. $gcc = `\${CC:-gcc} -dumpmachine`; if ($?>>8) { - &warn(_g("Couldn't determine gcc system type, falling back to default (native compilation)")); + warning(_g("Couldn't determine gcc system type, falling back to default (native compilation)")); $gcc = ''; } else { chomp $gcc; @@ -172,7 +172,7 @@ if ($?>>8) { if ($gcc ne '') { $deb_host_arch = &gnu_to_debian($gcc); unless (defined $deb_host_arch) { - &warn (sprintf(_g("Unknown gcc system type %s, falling back to default (native compilation)"), $gcc)); + warning(sprintf(_g("Unknown gcc system type %s, falling back to default (native compilation)"), $gcc)); $gcc = ''; } else { $gcc = $deb_host_gnu_type = &debian_to_gnu($deb_host_arch); @@ -241,7 +241,7 @@ if ($req_host_gnu_type ne '' && $req_host_arch eq '') { if ($req_host_gnu_type ne '' && $req_host_arch ne '') { $dfl_host_gnu_type = &debian_to_gnu ($req_host_arch); - &warn(sprintf(_g("Default GNU system type %s for Debian arch %s does not match specified GNU system type %s"), $dfl_host_gnu_type, $req_host_arch, $req_host_gnu_type)) if $dfl_host_gnu_type ne $req_host_gnu_type; + warning(sprintf(_g("Default GNU system type %s for Debian arch %s does not match specified GNU system type %s"), $dfl_host_gnu_type, $req_host_arch, $req_host_gnu_type)) if $dfl_host_gnu_type ne $req_host_gnu_type; } $deb_host_arch = $req_host_arch if $req_host_arch ne ''; @@ -249,7 +249,7 @@ $deb_host_gnu_type = $req_host_gnu_type if $req_host_gnu_type ne ''; #$gcc = `\${CC:-gcc} --print-libgcc-file-name`; #$gcc =~ s!^.*gcc-lib/(.*)/\d+(?:.\d+)*/libgcc.*$!$1!s; -&warn(sprintf(_g("Specified GNU system type %s does not match gcc system type %s."), $deb_host_gnu_type, $gcc)) if !($req_is_arch or $req_eq_arch) && ($gcc ne '') && ($gcc ne $deb_host_gnu_type); +warning(sprintf(_g("Specified GNU system type %s does not match gcc system type %s."), $deb_host_gnu_type, $gcc)) if !($req_is_arch or $req_eq_arch) && ($gcc ne '') && ($gcc ne $deb_host_gnu_type); # Split the Debian and GNU names ($deb_host_arch_os, $deb_host_arch_cpu) = &split_debian($deb_host_arch); diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl index bf43054f..5c01c31e 100755 --- a/scripts/dpkg-genchanges.pl +++ b/scripts/dpkg-genchanges.pl @@ -141,13 +141,13 @@ if (not $sourceonly) { while() { if (m/^(([-+.0-9a-z]+)_([^_]+)_([-\w]+)\.u?deb) (\S+) (\S+)$/) { defined($p2f{"$2 $4"}) && - &warn(sprintf(_g("duplicate files list entry for package %s (line %d)"), $2, $.)); + warning(sprintf(_g("duplicate files list entry for package %s (line %d)"), $2, $.)); $f2p{$1}= $2; $p2f{"$2 $4"}= $1; $p2f{$2}= $1; $p2ver{$2}= $3; defined($f2sec{$1}) && - &warn(sprintf(_g("duplicate files list entry for file %s (line %d)"), $1, $.)); + warning(sprintf(_g("duplicate files list entry for file %s (line %d)"), $1, $.)); $f2sec{$1}= $5; $f2pri{$1}= $6; push(@fileslistfiles,$1); @@ -159,7 +159,7 @@ if (not $sourceonly) { push(@fileslistfiles,$1); } elsif (m/^([-+.,_0-9a-zA-Z]+) (\S+) (\S+)$/) { defined($f2sec{$1}) && - &warn(sprintf(_g("duplicate files list entry for file %s (line %d)"), $1, $.)); + warning(sprintf(_g("duplicate files list entry for file %s (line %d)"), $1, $.)); $f2sec{$1}= $2; $f2pri{$1}= $3; push(@fileslistfiles,$1); @@ -187,7 +187,7 @@ for $_ (keys %fi) { if ((debian_arch_eq('all', $a) && !$archspecific) || debian_arch_is($arch, $a) || grep(debian_arch_is($arch, $_), split(/\s+/, $a))) { - &warn(sprintf(_g("package %s in control file but not in files list"), $p)); + warning(sprintf(_g("package %s in control file but not in files list"), $p)); next; } } else { @@ -257,7 +257,7 @@ if ($changesdescription) { for $p (keys %p2f) { my ($pp, $aa) = (split / /, $p); defined($p2i{"C $pp"}) || - &warn(sprintf(_g("package %s listed in files list but not in control info"), $pp)); + warning(sprintf(_g("package %s listed in files list but not in control info"), $pp)); } for $p (keys %p2f) { @@ -266,7 +266,7 @@ for $p (keys %p2f) { $sec = $sourcedefault{'Section'} if !defined($sec); if (!defined($sec)) { $sec = '-'; - &warn(sprintf(_g("missing Section for binary package %s; using '-'"), $p)); + warning(sprintf(_g("missing Section for binary package %s; using '-'"), $p)); } $sec eq $f2sec{$f} || &error(sprintf(_g("package %s has section %s in ". "control file but %s in files list"), @@ -275,7 +275,7 @@ for $p (keys %p2f) { $pri = $sourcedefault{'Priority'} if !defined($pri); if (!defined($pri)) { $pri = '-'; - &warn("missing Priority for binary package $p; using '-'"); + warning("missing Priority for binary package $p; using '-'"); } $pri eq $f2pri{$f} || &error(sprintf(_g("package %s has priority %s in ". "control file but %s in files list"), @@ -288,12 +288,12 @@ if (!$binaryonly) { $sec= $sourcedefault{'Section'}; if (!defined($sec)) { $sec = '-'; - &warn(_g("missing Section for source files")); + warning(_g("missing Section for source files")); } $pri= $sourcedefault{'Priority'}; if (!defined($pri)) { $pri = '-'; - &warn(_g("missing Priority for source files")); + warning(_g("missing Priority for source files")); } ($sversion = $substvar{'source:Version'}) =~ s/^\d+://; @@ -320,7 +320,7 @@ if (!$binaryonly) { @sourcefiles= grep(!m/\.orig\.tar\.gz$/,@sourcefiles); } else { if ($sourcestyle =~ m/d/ && !grep(m/\.diff\.gz$/,@sourcefiles)) { - &warn(_g("Ignoring -sd option for native Debian package")); + warning(_g("ignoring -sd option for native Debian package")); } $origsrcmsg= _g("including full source code in upload"); } @@ -352,7 +352,7 @@ for $f (@sourcefiles,@fileslistfiles) { $uf= "$uploadfilesdir/$f"; open(STDIN,"< $uf") || &syserr(sprintf(_g("cannot open upload file %s for reading"), $uf)); (@s=stat(STDIN)) || &syserr(sprintf(_g("cannot fstat upload file %s"), $uf)); - $size= $s[7]; $size || &warn(sprintf(_g("upload file %s is empty"), $uf)); + $size= $s[7]; $size || warning(sprintf(_g("upload file %s is empty"), $uf)); $md5sum=`md5sum`; $? && subprocerr(sprintf(_g("md5sum upload file %s"), $uf)); $md5sum =~ m/^([0-9a-f]{32})\s*-?\s*$/i || &failure(sprintf(_g("md5sum upload file %s gave strange output \`%s'"), $uf, $md5sum)); @@ -377,7 +377,7 @@ for $f (qw(Version Distribution Maintainer Changes)) { } for $f (qw(Urgency)) { - defined($f{$f}) || &warn(sprintf(_g("missing information for output field %s"), $f)); + defined($f{$f}) || warning(sprintf(_g("missing information for output field %s"), $f)); } for $f (keys %override) { $f{&capit($f)}= $override{$f}; } diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl index 45f87392..67af2ed1 100755 --- a/scripts/dpkg-gencontrol.pl +++ b/scripts/dpkg-gencontrol.pl @@ -150,7 +150,7 @@ for $_ (keys %fi) { } else { @archlist= split(/\s+/,$v); my @invalid_archs = grep m/[^\w-]/, @archlist; - &warn(sprintf(ngettext( + warning(sprintf(ngettext( "`%s' is not a legal architecture string.", "`%s' are not legal architecture strings.", scalar(@invalid_archs)), @@ -223,7 +223,7 @@ for $f (qw(Package Version)) { defined($f{$f}) || &error(sprintf(_g("missing information for output field %s"), $f)); } for $f (qw(Maintainer Description Architecture)) { - defined($f{$f}) || &warn(sprintf(_g("missing information for output field %s"), $f)); + defined($f{$f}) || warning(sprintf(_g("missing information for output field %s"), $f)); } $oppackage= $f{'Package'}; diff --git a/scripts/dpkg-parsechangelog.pl b/scripts/dpkg-parsechangelog.pl index 266e7499..93101f56 100755 --- a/scripts/dpkg-parsechangelog.pl +++ b/scripts/dpkg-parsechangelog.pl @@ -79,7 +79,7 @@ for $pd (@parserpath) { if (!stat("$pa")) { $! == ENOENT || &syserr(sprintf(_g("failed to check for format parser %s"), $pa)); } elsif (!-x _) { - &warn(sprintf(_g("format parser %s not executable"), $pa)); + warning(sprintf(_g("format parser %s not executable"), $pa)); } else { $pf= $pa; last; diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl index ad583015..628c4973 100755 --- a/scripts/dpkg-shlibdeps.pl +++ b/scripts/dpkg-shlibdeps.pl @@ -93,7 +93,7 @@ foreach (@ARGV) { } elsif (m/^-d/) { $dependencyfield= capit($POSTMATCH); defined($depstrength{$dependencyfield}) || - &warn(sprintf(_g("unrecognised dependency field \`%s'"), $dependencyfield)); + warning(sprintf(_g("unrecognised dependency field '%s'"), $dependencyfield)); } elsif (m/^-e/) { push(@exec,$POSTMATCH); push(@execfield,$dependencyfield); } elsif (m/^-t/) { @@ -162,7 +162,7 @@ if (opendir(DIR, $ldconfigdir)) { } open CONF, ' ) { next if /^\s*$/; chomp; @@ -202,7 +202,7 @@ for ($i=0;$i<=$#exec;$i++) { push(@libexec,$exec[$i]); } else { m,^\s*NEEDED\s+(\S+)$,; - &warn(sprintf(_g("format of \`NEEDED %s' not recognized"), $1)); + warning(sprintf(_g("format of 'NEEDED %s' not recognized"), $1)); } } elsif (/^\s*RPATH\s+(\S+)\s*$/) { push @{$rpaths{$exec[$i]}}, $1; @@ -281,12 +281,12 @@ if ($#libfiles >= 0) { while (

) { chomp; if (m/^local diversion |^diversion by/) { - &warn(_g("diversions involved - output may be incorrect")); + warning(_g("diversions involved - output may be incorrect")); print(STDERR " $_\n") || syserr(_g("write diversion info to stderr")); } elsif (m=^(\S+(, \S+)*): (\S+)$=) { push @{$pathpackages{$LAST_PAREN_MATCH}}, split(/, /, $1); } else { - &warn(sprintf(_g("unknown output from dpkg --search: \`%s'"), $_)); + warning(sprintf(_g("unknown output from dpkg --search: '%s'"), $_)); } } close(P); @@ -309,7 +309,7 @@ if ($#libfiles >= 0) { } } if (!@packages) { - &warn(sprintf(_g("could not find any packages for %s"), $libfiles[$i])); + warning(sprintf(_g("could not find any packages for %s"), $libfiles[$i])); } else { for my $p (@packages) { scanshlibsfile("$shlibsppdir/$p$shlibsppext", @@ -319,11 +319,11 @@ if ($#libfiles >= 0) { } scanshlibsfile($shlibsdefault,$libname[$i],$libsoname[$i],$libfield[$i]) && next; - &warn(sprintf(_g("unable to find dependency information for ". - "shared library %s (soname %s, ". - "path %s, dependency field %s)"), - $libname[$i], $libsoname[$i], - $libfiles[$i], $libfield[$i])); + warning(sprintf(_g("unable to find dependency information for ". + "shared library %s (soname %s, ". + "path %s, dependency field %s)"), + $libname[$i], $libsoname[$i], + $libfiles[$i], $libfield[$i])); } sub format_matches { @@ -367,7 +367,7 @@ sub scanshlibsfile { while () { s/\s*\n$//; next if m/^\#/; if (!m/^\s*(?:(\S+):\s+)?(\S+)\s+(\S+)/) { - &warn(sprintf(_g("shared libs info file \`%s' line %d: bad line \`%s'"), $fn, $., $_)); + warning(sprintf(_g("shared libs info file '%s' line %d: bad line '%s'"), $fn, $., $_)); next; } next if defined $1 && $1 ne $packagetype; diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index c65abf53..551de9bf 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -133,7 +133,7 @@ while (@ARGV && $ARGV[0] =~ m/^-/) { } elsif (m/^-x$/) { &setopmode('extract'); } elsif (m/^-s([akpursnAKPUR])$/) { - &warn( sprintf(_g("-s%s option overrides earlier -s%s option" ), $1, $sourcestyle)) + warning(sprintf(_g("-s%s option overrides earlier -s%s option"), $1, $sourcestyle)) if $sourcestyle ne 'X'; $sourcestyle= $1; } elsif (m/^-c/) { @@ -275,7 +275,8 @@ if ($opmode eq 'build') { defined($f{$f}) || &error(sprintf(_g("missing information for critical output field %s"), $f)); } for $f (qw(Maintainer Architecture Standards-Version)) { - defined($f{$f}) || &warn(sprintf(_g("missing information for output field %s"), $f)); + defined($f{$f}) || + warning(sprintf(_g("missing information for output field %s"), $f)); } defined($sourcepackage) || &error(_g("unable to determine source package name !")); $f{'Source'}= $sourcepackage; @@ -334,23 +335,24 @@ if ($opmode eq 'build') { } } $dirbase= $dir; $dirbase =~ s,/?$,,; $dirbase =~ s,[^/]+$,,; $dirname= $&; - $dirname eq $basedirname || &warn(sprintf(_g("source directory `%s' is not ". - "- `%s'"), $dir, $basedirname)); - + $dirname eq $basedirname || + warning(sprintf(_g("source directory '%s' is not " . + "- '%s'"), $dir, $basedirname)); + if ($sourcestyle ne 'n') { $origdirbase= $origdir; $origdirbase =~ s,/?$,,; $origdirbase =~ s,[^/]+$,,; $origdirname= $&; $origdirname eq "$basedirname.orig" || - &warn(sprintf(_g(".orig directory name %s is not ". - "- (wanted %s)"), - $origdirname, "$basedirname.orig")); + warning(sprintf(_g(".orig directory name %s is not " . + "- (wanted %s)"), + $origdirname, "$basedirname.orig")); $tardirbase= $origdirbase; $tardirname= $origdirname; $tarname= $origtargz; $tarname eq "$basename.orig.tar.gz" || - &warn(sprintf(_g(".orig.tar.gz name %s is not _". - ".orig.tar.gz (wanted %s)"), $tarname, "$basename.orig.tar.gz")); + warning(sprintf(_g(".orig.tar.gz name %s is not _" . + ".orig.tar.gz (wanted %s)"), $tarname, "$basename.orig.tar.gz")); } else { $tardirbase= $dirbase; $tardirname= $dirname; $tarname= "$basenamerev.tar.gz"; @@ -467,11 +469,11 @@ if ($opmode eq 'build') { $! == ENOENT || &syserr(sprintf(_g("cannot stat orig file %s"), "$origdir/$fn")); $ofnread= '/dev/null'; if( $mode & ( S_IXUSR | S_IXGRP | S_IXOTH ) ) { - &warn( sprintf( _g("executable mode %04o of `%s' will not be represented in diff"), $mode, $fn ) ) + warning(sprintf(_g("executable mode %04o of '%s' will not be represented in diff"), $mode, $fn)) unless $fn eq 'debian/rules'; } if( $mode & ( S_ISUID | S_ISGID | S_ISVTX ) ) { - &warn( sprintf( _g("special mode %04o of `%s' will not be represented in diff"), $mode, $fn ) ); + warning(sprintf(_g("special mode %04o of '%s' will not be represented in diff"), $mode, $fn)); } } elsif (-f _) { $ofnread= "$origdir/$fn"; @@ -500,8 +502,8 @@ if ($opmode eq 'build') { } elsif (m/^[-+\@ ]/) { $difflinefound=1; } elsif (m/^\\ No newline at end of file$/) { - &warn(sprintf(_g("file %s has no final newline ". - "(either original or modified version)"), $fn)); + warning(sprintf(_g("file %s has no final newline " . + "(either original or modified version)"), $fn)); } else { s/\n$//; &internerr(sprintf(_g("unknown line from diff -u on %s: `%s'"), $fn, $_)); @@ -555,11 +557,11 @@ if ($opmode eq 'build') { next if defined($type{$fn}); lstat("$origdir/$fn") || &syserr(sprintf(_g("cannot check orig file %s"), "$origdir/$fn")); if (-f _) { - &warn(sprintf(_g("ignoring deletion of file %s"), $fn)); + warning(sprintf(_g("ignoring deletion of file %s"), $fn)); } elsif (-d _) { - &warn(sprintf(_g("ignoring deletion of directory %s"), $fn)); + warning(sprintf(_g("ignoring deletion of directory %s"), $fn)); } elsif (-l _) { - &warn(sprintf(_g("ignoring deletion of symlink %s"), $fn)); + warning(sprintf(_g("ignoring deletion of symlink %s"), $fn)); } else { &unrepdiff2(_g('not a file, directory or link'), _g('nonexistent')); @@ -634,10 +636,10 @@ if ($opmode eq 'build') { if ($gpg_status == 1); } } else { - &warn(sprintf(_g("could not verify signature on %s since gpg isn't installed"), $dsc)); + warning(sprintf(_g("could not verify signature on %s since gpg isn't installed"), $dsc)); } } else { - &warn(sprintf(_g("extracting unsigned source package (%s)"), $dsc)); + warning(sprintf(_g("extracting unsigned source package (%s)"), $dsc)); } open(CDATA,"< $dsc") || &error(sprintf(_g("cannot open .dsc file %s: %s"), $dsc, $!)); @@ -706,14 +708,14 @@ if ($opmode eq 'build') { &error(_g("no tarfile in Files field")) unless @tarfiles; my $native = !($difffile || $debianfile); if ($native) { - &warn(_g("multiple tarfiles in native package")) if @tarfiles > 1; - &warn(_g("native package with .orig.tar")) + warning(_g("multiple tarfiles in native package")) if @tarfiles > 1; + warning(_g("native package with .orig.tar")) unless $seen{'.tar'} or $seen{"-$revision.tar"}; } else { - &warn(_g("no upstream tarfile in Files field")) unless $seen{'.orig.tar'}; + warning(_g("no upstream tarfile in Files field")) unless $seen{'.orig.tar'}; if ($dscformat =~ /^1\./) { - &warn(sprintf(_g("multiple upstream tarballs in %s format dsc"), $dscformat)) if @tarfiles > 1; - &warn(sprintf(_g("debian.tar in %s format dsc"), $dscformat)) if $debianfile; + warning(sprintf(_g("multiple upstream tarballs in %s format dsc"), $dscformat)) if @tarfiles > 1; + warning(sprintf(_g("debian.tar in %s format dsc"), $dscformat)) if $debianfile; } } @@ -871,12 +873,12 @@ if ($opmode eq 'build') { if (!(@s= lstat("$newdirectory/debian/rules"))) { $! == ENOENT || &syserr(sprintf(_g("cannot stat %s"), "$newdirectory/debian/rules")); - &warn(sprintf(_g("%s does not exist"), "$newdirectory/debian/rules")); + warning(sprintf(_g("%s does not exist"), "$newdirectory/debian/rules")); } elsif (-f _) { chmod($s[2] | 0111, "$newdirectory/debian/rules") || &syserr(sprintf(_g("cannot make %s executable"), "$newdirectory/debian/rules")); } else { - &warn(sprintf(_g("%s is not a plain file"), "$newdirectory/debian/rules")); + warning(sprintf(_g("%s is not a plain file"), "$newdirectory/debian/rules")); } $execmode= 0777 & ~umask; @@ -1080,8 +1082,8 @@ sub checktarsane { && (substr ($fn, 0, 99) eq substr ($tarfn, 0, 99))) { # this file doesn't match because cpio truncated the name # to the first 100 characters. let it slide for now. - &warn (sprintf(_g("filename `%s' was truncated by cpio;" . - " unable to check full pathname"), $pname)); + warning(sprintf(_g("filename '%s' was truncated by cpio;" . + " unable to check full pathname"), $pname)); # Since it didn't match, later checks will not be able # to stat this file, so we replace it with the filename # fetched from tar.