summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRaphaël Hertzog <hertzog@debian.org>2009-09-14 23:46:10 +0200
committerRaphaël Hertzog <hertzog@debian.org>2009-09-19 18:18:32 +0200
commit0d39e351ea97c5541252640f64d8d09ded6ec045 (patch)
tree47fce9b4d0af10beaa610d3a6d73f6cc0b9554bc /scripts
parentca39b57488e2b245311892bb38510c72d29f4dd0 (diff)
downloaddpkg-0d39e351ea97c5541252640f64d8d09ded6ec045.tar.gz
Replace old capit() by field_capitalize() everywhere
capit() is provided by Dpkg::Fields while field_capitalize() is part of the new Dpkg::Control::Fields API.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Dpkg/Control.pm1
-rw-r--r--scripts/Dpkg/Shlibs/SymbolFile.pm4
-rwxr-xr-xscripts/dpkg-genchanges.pl2
-rwxr-xr-xscripts/dpkg-shlibdeps.pl4
-rwxr-xr-xscripts/dpkg-source.pl5
5 files changed, 8 insertions, 8 deletions
diff --git a/scripts/Dpkg/Control.pm b/scripts/Dpkg/Control.pm
index e27f82bf2..60c458f23 100644
--- a/scripts/Dpkg/Control.pm
+++ b/scripts/Dpkg/Control.pm
@@ -21,7 +21,6 @@ use warnings;
use Dpkg::Gettext;
use Dpkg::ErrorHandling;
-use Dpkg::Fields qw(capit);
use Dpkg::Control::Types;
use Dpkg::Control::Hash;
use Dpkg::Control::Fields;
diff --git a/scripts/Dpkg/Shlibs/SymbolFile.pm b/scripts/Dpkg/Shlibs/SymbolFile.pm
index 265ca385d..22208ae4c 100644
--- a/scripts/Dpkg/Shlibs/SymbolFile.pm
+++ b/scripts/Dpkg/Shlibs/SymbolFile.pm
@@ -22,7 +22,7 @@ use warnings;
use Dpkg::Gettext;
use Dpkg::ErrorHandling;
use Dpkg::Version qw(vercmp);
-use Dpkg::Fields qw(capit);
+use Dpkg::Control::Fields;
use Dpkg::Shlibs::Symbol;
use Dpkg::Arch qw(get_host_arch);
@@ -177,7 +177,7 @@ sub load {
push @{$self->{objects}{$$obj_ref}{deps}}, "$1";
} elsif (/^\*\s*([^:]+):\s*(.*\S)\s*$/) {
# Add meta-fields
- $self->{objects}{$$obj_ref}{fields}{capit($1)} = $2;
+ $self->{objects}{$$obj_ref}{fields}{field_capitalize($1)} = $2;
} elsif (/^(\S+)\s+(.*)$/) {
# New object and dependency template
$$obj_ref = $1;
diff --git a/scripts/dpkg-genchanges.pl b/scripts/dpkg-genchanges.pl
index 997c3905f..35523d45b 100755
--- a/scripts/dpkg-genchanges.pl
+++ b/scripts/dpkg-genchanges.pl
@@ -11,7 +11,7 @@ use Dpkg::Gettext;
use Dpkg::Checksums;
use Dpkg::ErrorHandling;
use Dpkg::Arch qw(get_host_arch debarch_eq debarch_is);
-use Dpkg::Fields qw(:list capit unknown);
+use Dpkg::Fields qw(:list unknown);
use Dpkg::Compression;
use Dpkg::Control::Info;
use Dpkg::Control;
diff --git a/scripts/dpkg-shlibdeps.pl b/scripts/dpkg-shlibdeps.pl
index e40462461..d18ae97d1 100755
--- a/scripts/dpkg-shlibdeps.pl
+++ b/scripts/dpkg-shlibdeps.pl
@@ -18,9 +18,9 @@ use Dpkg::Shlibs qw(find_library @librarypaths);
use Dpkg::Shlibs::Objdump;
use Dpkg::Shlibs::SymbolFile;
use Dpkg::Arch qw(get_host_arch);
-use Dpkg::Fields qw(capit);
use Dpkg::Deps;
use Dpkg::Control::Info;
+use Dpkg::Control::Fields;
use constant {
@@ -78,7 +78,7 @@ foreach (@ARGV) {
-d $admindir ||
error(_g("administrative directory '%s' does not exist"), $admindir);
} elsif (m/^-d(.*)$/) {
- $dependencyfield = capit($1);
+ $dependencyfield = field_capitalize($1);
defined($depstrength{$dependencyfield}) ||
warning(_g("unrecognised dependency field \`%s'"), $dependencyfield);
} elsif (m/^-e(.*)$/) {
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl
index 2184d20da..0feeb79dd 100755
--- a/scripts/dpkg-source.pl
+++ b/scripts/dpkg-source.pl
@@ -9,9 +9,10 @@ use Dpkg::Gettext;
use Dpkg::ErrorHandling;
use Dpkg::Arch qw(debarch_eq);
use Dpkg::Deps qw(@src_dep_fields %dep_field_type);
-use Dpkg::Fields qw(:list capit unknown);
+use Dpkg::Fields qw(:list unknown);
use Dpkg::Compression;
use Dpkg::Control::Info;
+use Dpkg::Control::Fields;
use Dpkg::Substvars;
use Dpkg::Version qw(check_version);
use Dpkg::Vars;
@@ -170,7 +171,7 @@ if ($options{'opmode'} eq 'build') {
($fields->{$_} = $v) =~ s/[\r\n]//g; # Merge in a single-line
} elsif (m/^Build-(Depends|Conflicts)(-Indep)?$/i) {
my $dep;
- my $type = $dep_field_type{capit($_)};
+ my $type = $dep_field_type{field_capitalize($_)};
$dep = Dpkg::Deps::parse($v, union => $type eq 'union');
error(_g("error occurred while parsing %s"), $_) unless defined $dep;
my $facts = Dpkg::Deps::KnownFacts->new();