summaryrefslogtreecommitdiff
path: root/scripts/Dpkg
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2015-02-27 09:44:08 +0100
committerGuillem Jover <guillem@debian.org>2015-04-10 04:23:56 +0200
commitd465dca48fb9c7c03aedf6fd8f266d22085d2bec (patch)
tree51002134f1b1e6206c988eb05bc7c77f791aa977 /scripts/Dpkg
parent9929591b148577bec771400e003c820afcb9175d (diff)
downloaddpkg-d465dca48fb9c7c03aedf6fd8f266d22085d2bec.tar.gz
Consistently use proper quotation marks all over the place
That is "" or '', and not the unbalanced `' pair.
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r--scripts/Dpkg/Changelog/Entry/Debian.pm2
-rw-r--r--scripts/Dpkg/Control/HashCore.pm2
-rw-r--r--scripts/Dpkg/Source/Functions.pm2
-rw-r--r--scripts/Dpkg/Source/Package.pm2
-rw-r--r--scripts/Dpkg/Source/Package/V1.pm20
-rw-r--r--scripts/Dpkg/Source/Package/V2.pm15
-rw-r--r--scripts/Dpkg/Source/Package/V3/Bzr.pm10
-rw-r--r--scripts/Dpkg/Source/Package/V3/Custom.pm2
-rw-r--r--scripts/Dpkg/Source/Package/V3/Git.pm8
-rw-r--r--scripts/Dpkg/Source/Package/V3/Native.pm6
-rw-r--r--scripts/Dpkg/Source/Package/V3/Quilt.pm2
-rw-r--r--scripts/Dpkg/Source/Patch.pm29
-rw-r--r--scripts/Dpkg/Source/Quilt.pm2
-rw-r--r--scripts/Dpkg/Substvars.pm2
-rw-r--r--scripts/Dpkg/Version.pm2
15 files changed, 55 insertions, 51 deletions
diff --git a/scripts/Dpkg/Changelog/Entry/Debian.pm b/scripts/Dpkg/Changelog/Entry/Debian.pm
index bae0fbe57..acfc1550e 100644
--- a/scripts/Dpkg/Changelog/Entry/Debian.pm
+++ b/scripts/Dpkg/Changelog/Entry/Debian.pm
@@ -128,7 +128,7 @@ sub check_header {
my %optdone;
foreach my $opt (split(/\s*,\s*/, $options)) {
unless ($opt =~ m/^([-0-9a-z]+)\=\s*(.*\S)$/i) {
- push @errors, sprintf(g_("bad key-value after \`;': \`%s'"), $opt);
+ push @errors, sprintf(g_("bad key-value after ';': '%s'"), $opt);
next;
}
my ($k, $v) = (field_capitalize($1), $2);
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index d55842483..4579a4980 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -243,7 +243,7 @@ sub parse {
s/\s*\n$//;
unless (m/^-----BEGIN PGP SIGNATURE-----$/) {
$self->parse_error($desc, g_('expected OpenPGP signature, ' .
- "found something else \`%s'"), $_);
+ "found something else '%s'"), $_);
}
# Skip OpenPGP signature
while (<$fh>) {
diff --git a/scripts/Dpkg/Source/Functions.pm b/scripts/Dpkg/Source/Functions.pm
index 4e0ec7810..e1a228933 100644
--- a/scripts/Dpkg/Source/Functions.pm
+++ b/scripts/Dpkg/Source/Functions.pm
@@ -43,7 +43,7 @@ sub erasedir {
return if $! == ENOENT;
syserr(g_("unable to check for removal of directory '%s'"), $dir);
}
- error(g_("rm -rf failed to remove `%s'"), $dir);
+ error(g_("rm -rf failed to remove '%s'"), $dir);
}
sub fixperms {
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index 9b9e1a3c1..338b21786 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -289,7 +289,7 @@ sub upgrade_object_type {
}
bless $self, $module;
} else {
- error(g_("invalid Format field `%s'"), $format);
+ error(g_("invalid Format field '%s'"), $format);
}
}
diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm
index 447b54ae4..f008e5cda 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -131,7 +131,7 @@ sub do_extract {
erasedir($newdirectory);
if (-e $expectprefix) {
rename($expectprefix, "$newdirectory.tmp-keep")
- or syserr(g_("unable to rename `%s' to `%s'"), $expectprefix,
+ or syserr(g_("unable to rename '%s' to '%s'"), $expectprefix,
"$newdirectory.tmp-keep");
}
@@ -211,7 +211,7 @@ sub do_build {
my $origtargz = $self->get_basename() . '.orig.tar.gz';
if (-e $origtargz) {
unless (-f $origtargz) {
- error(g_("packed orig `%s' exists but is not a plain file"), $origtargz);
+ error(g_("packed orig '%s' exists but is not a plain file"), $origtargz);
}
} else {
$origtargz = undef;
@@ -262,12 +262,12 @@ sub do_build {
} else {
if (stat($origdir)) {
unless (-d _) {
- error(g_("unpacked orig `%s' exists but is not a directory"),
+ error(g_("unpacked orig '%s' exists but is not a directory"),
$origdir);
}
$sourcestyle =~ y/aA/rR/; # .orig directory
} elsif ($! != ENOENT) {
- syserr(g_("unable to stat putative unpacked orig `%s'"), $origdir);
+ syserr(g_("unable to stat putative unpacked orig '%s'"), $origdir);
} else {
$sourcestyle =~ y/aA/nn/; # Native tar.gz
}
@@ -306,11 +306,11 @@ sub do_build {
} elsif ($sourcestyle =~ m/[nurUR]/) {
if (stat($tarname)) {
unless ($sourcestyle =~ m/[nUR]/) {
- error(g_("tarfile `%s' already exists, not overwriting, " .
+ error(g_("tarfile '%s' already exists, not overwriting, " .
'giving up; use -sU or -sR to override'), $tarname);
}
} elsif ($! != ENOENT) {
- syserr(g_("unable to check for existence of `%s'"), $tarname);
+ syserr(g_("unable to check for existence of '%s'"), $tarname);
}
info(g_('building %s in %s'),
@@ -325,10 +325,10 @@ sub do_build {
$tar->add_directory($tardirname);
$tar->finish();
rename($newtar, $tarname)
- or syserr(g_("unable to rename `%s' (newly created) to `%s'"),
+ or syserr(g_("unable to rename '%s' (newly created) to '%s'"),
$newtar, $tarname);
chmod(0666 &~ umask(), $tarname)
- or syserr(g_("unable to change permission of `%s'"), $tarname);
+ or syserr(g_("unable to change permission of '%s'"), $tarname);
} else {
info(g_('building %s using existing %s'),
$sourcepackage, $tarname);
@@ -389,10 +389,10 @@ sub do_build {
}
rename($newdiffgz, $diffname)
- or syserr(g_("unable to rename `%s' (newly created) to `%s'"),
+ or syserr(g_("unable to rename '%s' (newly created) to '%s'"),
$newdiffgz, $diffname);
chmod(0666 &~ umask(), $diffname)
- or syserr(g_("unable to change permission of `%s'"), $diffname);
+ or syserr(g_("unable to change permission of '%s'"), $diffname);
$self->add_file($diffname);
}
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 822041afc..af0b3c3f2 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -173,7 +173,8 @@ sub do_extract {
my $file = $addonfile{$subdir};
info(g_('unpacking %s'), $file);
if (-e "$newdirectory/$subdir") {
- warning(g_("required removal of `%s' installed by original tarball"), $subdir);
+ warning(g_("required removal of '%s' installed by original tarball"),
+ $subdir);
erasedir("$newdirectory/$subdir");
}
$tar = Dpkg::Source::Archive->new(filename => "$dscdir$file");
@@ -440,7 +441,7 @@ sub do_build {
my ($self, $dir) = @_;
my @argv = @{$self->{options}{ARGV}};
if (scalar(@argv)) {
- usageerr(g_("-b takes only one parameter with format `%s'"),
+ usageerr(g_("-b takes only one parameter with format '%s'"),
$self->{fields}{'Format'});
}
$self->prepare_build($dir);
@@ -477,13 +478,13 @@ sub do_build {
my $reldir = File::Spec->abs2rel($File::Find::dir, $dir);
my $cwd = getcwd();
# Apply the pattern both from the top dir and from the inspected dir
- chdir($dir) or syserr(g_("unable to chdir to `%s'"), $dir);
+ chdir $dir or syserr(g_("unable to chdir to '%s'"), $dir);
$exclude{$_} = 1 foreach glob($tar_ignore_glob);
- chdir($cwd) or syserr(g_("unable to chdir to `%s'"), $cwd);
+ chdir $cwd or syserr(g_("unable to chdir to '%s'"), $cwd);
chdir($File::Find::dir)
- or syserr(g_("unable to chdir to `%s'"), $File::Find::dir);
+ or syserr(g_("unable to chdir to '%s'"), $File::Find::dir);
$exclude{$_} = 1 foreach glob($tar_ignore_glob);
- chdir($cwd) or syserr(g_("unable to chdir to `%s'"), $cwd);
+ chdir $cwd or syserr(g_("unable to chdir to '%s'"), $cwd);
my @result;
foreach my $fn (@_) {
unless (exists $exclude{$fn} or exists $exclude{"$reldir/$fn"}) {
@@ -611,7 +612,7 @@ sub register_patch {
copy($patch_file, $patch)
or syserr(g_('failed to copy %s to %s'), $patch_file, $patch);
chmod(0666 & ~ umask(), $patch)
- or syserr(g_("unable to change permission of `%s'"), $patch);
+ or syserr(g_("unable to change permission of '%s'"), $patch);
my $applied = File::Spec->catfile($dir, 'debian', 'patches', '.dpkg-source-applied');
open(my $applied_fh, '>>', $applied)
or syserr(g_('cannot write %s'), $applied);
diff --git a/scripts/Dpkg/Source/Package/V3/Bzr.pm b/scripts/Dpkg/Source/Package/V3/Bzr.pm
index afcf730b6..6cf8fae26 100644
--- a/scripts/Dpkg/Source/Package/V3/Bzr.pm
+++ b/scripts/Dpkg/Source/Package/V3/Bzr.pm
@@ -96,7 +96,7 @@ sub do_build {
my ($dirname, $updir) = fileparse($dir);
if (scalar(@argv)) {
- usageerr(g_("-b takes only one parameter with format `%s'"),
+ usageerr(g_("-b takes only one parameter with format '%s'"),
$self->{fields}{'Format'});
}
@@ -109,7 +109,7 @@ sub do_build {
sanity_check($dir);
my $old_cwd = getcwd();
- chdir($dir) or syserr(g_("unable to chdir to `%s'"), $dir);
+ chdir $dir or syserr(g_("unable to chdir to '%s'"), $dir);
local $_;
@@ -133,7 +133,7 @@ sub do_build {
join(' ', @files));
}
- chdir($old_cwd) or syserr(g_("unable to chdir to `%s'"), $old_cwd);
+ chdir $old_cwd or syserr(g_("unable to chdir to '%s'"), $old_cwd);
my $tmp = tempdir("$dirname.bzr.XXXXXX", DIR => $updir);
push_exit_handler(sub { erasedir($tmp) });
@@ -199,13 +199,13 @@ sub do_extract {
my $old_cwd = getcwd();
chdir($newdirectory)
- or syserr(g_("unable to chdir to `%s'"), $newdirectory);
+ or syserr(g_("unable to chdir to '%s'"), $newdirectory);
# Reconstitute the working tree.
system('bzr', 'checkout');
subprocerr('bzr checkout') if $?;
- chdir($old_cwd) or syserr(g_("unable to chdir to `%s'"), $old_cwd);
+ chdir $old_cwd or syserr(g_("unable to chdir to '%s'"), $old_cwd);
}
1;
diff --git a/scripts/Dpkg/Source/Package/V3/Custom.pm b/scripts/Dpkg/Source/Package/V3/Custom.pm
index 08d1a79c4..4895897aa 100644
--- a/scripts/Dpkg/Source/Package/V3/Custom.pm
+++ b/scripts/Dpkg/Source/Package/V3/Custom.pm
@@ -36,7 +36,7 @@ sub parse_cmdline_option {
return 0;
}
sub do_extract {
- error(g_("Format `3.0 (custom)' is only used to create source packages"));
+ error(g_("Format '3.0 (custom)' is only used to create source packages"));
}
sub can_build {
diff --git a/scripts/Dpkg/Source/Package/V3/Git.pm b/scripts/Dpkg/Source/Package/V3/Git.pm
index e0882c706..a5a97a5b2 100644
--- a/scripts/Dpkg/Source/Package/V3/Git.pm
+++ b/scripts/Dpkg/Source/Package/V3/Git.pm
@@ -102,7 +102,7 @@ sub do_build {
sanity_check($dir);
my $old_cwd = getcwd();
- chdir($dir) or syserr(g_("unable to chdir to `%s'"), $dir);
+ chdir $dir or syserr(g_("unable to chdir to '%s'"), $dir);
# Check for uncommitted files.
# To support dpkg-source -i, get a list of files
@@ -142,7 +142,7 @@ sub do_build {
my $tmp;
my $shallowfile;
if ($self->{options}{git_depth}) {
- chdir($old_cwd) or syserr(g_("unable to chdir to `%s'"), $old_cwd);
+ chdir $old_cwd or syserr(g_("unable to chdir to '%s'"), $old_cwd);
$tmp = tempdir("$dirname.git.XXXXXX", DIR => $updir);
push_exit_handler(sub { erasedir($tmp) });
my $clone_dir = "$tmp/repo.git";
@@ -154,7 +154,7 @@ sub do_build {
'--quiet', '--bare', 'file://' . abs_path($dir), $clone_dir);
subprocerr('git clone') if $?;
chdir($clone_dir)
- or syserr(g_("unable to chdir to `%s'"), $clone_dir);
+ or syserr(g_("unable to chdir to '%s'"), $clone_dir);
$shallowfile = "$basenamerev.gitshallow";
system('cp', '-f', 'shallow', "$old_cwd/$shallowfile");
subprocerr('cp shallow') if $?;
@@ -172,7 +172,7 @@ sub do_build {
);
subprocerr('git bundle') if $?;
- chdir($old_cwd) or syserr(g_("unable to chdir to `%s'"), $old_cwd);
+ chdir $old_cwd or syserr(g_("unable to chdir to '%s'"), $old_cwd);
if (defined $tmp) {
erasedir($tmp);
diff --git a/scripts/Dpkg/Source/Package/V3/Native.pm b/scripts/Dpkg/Source/Package/V3/Native.pm
index 2b0fb22e2..ea38c2740 100644
--- a/scripts/Dpkg/Source/Package/V3/Native.pm
+++ b/scripts/Dpkg/Source/Package/V3/Native.pm
@@ -80,7 +80,7 @@ sub do_build {
my @argv = @{$self->{options}{ARGV}};
if (scalar(@argv)) {
- usageerr(g_("-b takes only one parameter with format `%s'"),
+ usageerr(g_("-b takes only one parameter with format '%s'"),
$self->{fields}{'Format'});
}
@@ -102,11 +102,11 @@ sub do_build {
$tar->add_directory($dirname);
$tar->finish();
rename($newtar, $tarname)
- or syserr(g_("unable to rename `%s' (newly created) to `%s'"),
+ or syserr(g_("unable to rename '%s' (newly created) to '%s'"),
$newtar, $tarname);
pop_exit_handler();
chmod(0666 &~ umask(), $tarname)
- or syserr(g_("unable to change permission of `%s'"), $tarname);
+ or syserr(g_("unable to change permission of '%s'"), $tarname);
$self->add_file($tarname);
}
diff --git a/scripts/Dpkg/Source/Package/V3/Quilt.pm b/scripts/Dpkg/Source/Package/V3/Quilt.pm
index b2a69e9bb..497076d4e 100644
--- a/scripts/Dpkg/Source/Package/V3/Quilt.pm
+++ b/scripts/Dpkg/Source/Package/V3/Quilt.pm
@@ -230,7 +230,7 @@ sub register_patch {
copy($tmpdiff, $patch)
or syserr(g_('failed to copy %s to %s'), $tmpdiff, $patch);
chmod(0666 & ~ umask(), $patch)
- or syserr(g_("unable to change permission of `%s'"), $patch);
+ or syserr(g_("unable to change permission of '%s'"), $patch);
} elsif (-e $patch) {
unlink($patch) or syserr(g_('cannot remove %s'), $patch);
}
diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm
index 86ba326f4..a5a613823 100644
--- a/scripts/Dpkg/Source/Patch.pm
+++ b/scripts/Dpkg/Source/Patch.pm
@@ -120,7 +120,7 @@ sub add_diff_file {
'original or modified version)'), $new);
} else {
chomp;
- error(g_("unknown line from diff -u on %s: `%s'"), $new, $_);
+ error(g_("unknown line from diff -u on %s: '%s'"), $new, $_);
}
if (*$self->{empty} and defined(*$self->{header})) {
$self->print(*$self->{header}) or syserr(g_('failed to write'));
@@ -419,7 +419,7 @@ sub analyze {
$diff_count++;
# read file header (---/+++ pair)
unless ($line =~ s/^--- //) {
- error(g_("expected ^--- in line %d of diff `%s'"), $., $diff);
+ error(g_("expected ^--- in line %d of diff '%s'"), $., $diff);
}
$path{old} = $line = _fetch_filename($diff, $line);
if ($line ne '/dev/null' and $line =~ s{^[^/]*/+}{$destdir/}) {
@@ -432,10 +432,12 @@ sub analyze {
$line = _getline($self);
unless (defined $line) {
- error(g_("diff `%s' finishes in middle of ---/+++ (line %d)"), $diff, $.);
+ error(g_("diff '%s' finishes in middle of ---/+++ (line %d)"),
+ $diff, $.);
}
unless ($line =~ s/^\+\+\+ //) {
- error(g_("line after --- isn't as expected in diff `%s' (line %d)"), $diff, $.);
+ error(g_("line after --- isn't as expected in diff '%s' (line %d)"),
+ $diff, $.);
}
$path{new} = $line = _fetch_filename($diff, $line);
if ($line ne '/dev/null' and $line =~ s{^[^/]*/+}{$destdir/}) {
@@ -465,10 +467,10 @@ sub analyze {
}
if ($path{old} eq '/dev/null' and $path{new} eq '/dev/null') {
- error(g_("original and modified files are /dev/null in diff `%s' (line %d)"),
+ error(g_("original and modified files are /dev/null in diff '%s' (line %d)"),
$diff, $.);
} elsif ($path{new} eq '/dev/null') {
- error(g_("file removal without proper filename in diff `%s' (line %d)"),
+ error(g_("file removal without proper filename in diff '%s' (line %d)"),
$diff, $. - 1) unless defined $fn{old};
if ($opts{verbose}) {
warning(g_('diff %s removes a non-existing file %s (line %d)'),
@@ -483,11 +485,12 @@ sub analyze {
}
if (-e $fn and not -f _) {
- error(g_("diff `%s' patches something which is not a plain file"), $diff);
+ error(g_("diff '%s' patches something which is not a plain file"),
+ $diff);
}
if ($filepatched{$fn}) {
- warning(g_("diff `%s' patches file %s twice"), $diff, $fn)
+ warning(g_("diff '%s' patches file %s twice"), $diff, $fn)
if $opts{verbose};
} else {
$filepatched{$fn} = 1;
@@ -505,11 +508,11 @@ sub analyze {
while ($olines || $nlines) {
unless (defined($line = _getline($self))) {
if (($olines == $nlines) and ($olines < 3)) {
- warning(g_("unexpected end of diff `%s'"), $diff)
+ warning(g_("unexpected end of diff '%s'"), $diff)
if $opts{verbose};
last;
} else {
- error(g_("unexpected end of diff `%s'"), $diff);
+ error(g_("unexpected end of diff '%s'"), $diff);
}
}
next if $line =~ /^\\ /;
@@ -522,19 +525,19 @@ sub analyze {
} elsif ($line =~ /^\+/) {
--$nlines;
} else {
- error(g_("expected [ +-] at start of line %d of diff `%s'"),
+ error(g_("expected [ +-] at start of line %d of diff '%s'"),
$., $diff);
}
}
$hunk++;
}
unless ($hunk) {
- error(g_("expected ^\@\@ at line %d of diff `%s'"), $., $diff);
+ error(g_("expected ^\@\@ at line %d of diff '%s'"), $., $diff);
}
}
close($self);
unless ($diff_count) {
- warning(g_("diff `%s' doesn't contain any patch"), $diff)
+ warning(g_("diff '%s' doesn't contain any patch"), $diff)
if $opts{verbose};
}
*$self->{analysis}{$destdir}{dirtocreate} = \%dirtocreate;
diff --git a/scripts/Dpkg/Source/Quilt.pm b/scripts/Dpkg/Source/Quilt.pm
index 354d4e771..208b59795 100644
--- a/scripts/Dpkg/Source/Quilt.pm
+++ b/scripts/Dpkg/Source/Quilt.pm
@@ -375,7 +375,7 @@ sub restore_quilt_backup_files {
copy($_, $target)
or syserr(g_('failed to copy %s to %s'), $_, $target);
chmod((stat(_))[2], $target)
- or syserr(g_("unable to change permission of `%s'"), $target);
+ or syserr(g_("unable to change permission of '%s'"), $target);
}
} else {
# empty files are "backups" for new files that patch created
diff --git a/scripts/Dpkg/Substvars.pm b/scripts/Dpkg/Substvars.pm
index 65c0d3c3c..a6b2aed7c 100644
--- a/scripts/Dpkg/Substvars.pm
+++ b/scripts/Dpkg/Substvars.pm
@@ -280,7 +280,7 @@ sub substvars {
if ($count >= $maxsubsts) {
error($opts{msg_prefix} .
- g_("too many substitutions - recursive ? - in \`%s'"), $v);
+ g_("too many substitutions - recursive ? - in '%s'"), $v);
}
$lhs = $1; $vn = $2; $rhs = $3;
if (defined($self->{vars}{$vn})) {
diff --git a/scripts/Dpkg/Version.pm b/scripts/Dpkg/Version.pm
index f6616adc9..795a90e9a 100644
--- a/scripts/Dpkg/Version.pm
+++ b/scripts/Dpkg/Version.pm
@@ -422,7 +422,7 @@ sub version_check($) {
return 0;
}
if ($str =~ m/([^-+:.0-9a-zA-Z~])/o) {
- my $msg = sprintf(g_("version number contains illegal character `%s'"), $1);
+ my $msg = sprintf g_("version number contains illegal character '%s'"), $1;
return (0, $msg) if wantarray;
return 0;
}