Просмотр исходного кода

Rename Dpkg::Control in Dpkg::Control::Info

Update all scripts and modules to use the new module names.
Raphaël Hertzog лет назад: 17
Родитель
Сommit
ed1828956a

+ 4 - 4
scripts/Dpkg/Control.pm

@@ -14,7 +14,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-package Dpkg::Control;
+package Dpkg::Control::Info;
 
 use strict;
 use warnings;
@@ -25,7 +25,7 @@ use Dpkg::Gettext;
 
 =head1 NAME
 
-Dpkg::Control - parse files like debian/control
+Dpkg::Control::Info - parse files like debian/control
 
 =head1 DESCRIPTION
 
@@ -36,9 +36,9 @@ syntax than debian/control.
 
 =over 4
 
-=item $c = Dpkg::Control->new($file)
+=item $c = Dpkg::Control::Info->new($file)
 
-Create a new Dpkg::Control object for $file. If $file is omitted, it parses
+Create a new Dpkg::Control::Info object for $file. If $file is omitted, it parses
 debian/control. If file is "-", it parses the standard input.
 
 =cut

+ 1 - 1
scripts/Makefile.am

@@ -96,7 +96,7 @@ nobase_dist_perllib_DATA = \
 	Dpkg/Changelog/Debian.pm \
 	Dpkg/Checksums.pm \
 	Dpkg/Compression.pm \
-	Dpkg/Control.pm \
+	Dpkg/Control/Info.pm \
 	Dpkg/Deps.pm \
 	Dpkg/ErrorHandling.pm \
 	Dpkg/Exit.pm \

+ 2 - 2
scripts/dpkg-checkbuilddeps.pl

@@ -10,7 +10,7 @@ use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
 use Dpkg::Arch qw(get_host_arch);
 use Dpkg::Deps;
-use Dpkg::Control;
+use Dpkg::Control::Info;
 
 textdomain("dpkg-dev");
 
@@ -49,7 +49,7 @@ if ($want_help) {
 
 my $controlfile = shift || "debian/control";
 
-my $control = Dpkg::Control->new($controlfile);
+my $control = Dpkg::Control::Info->new($controlfile);
 my $fields = $control->get_source();
 
 my $facts = parse_status("$admindir/status");

+ 2 - 2
scripts/dpkg-genchanges.pl

@@ -13,7 +13,7 @@ use Dpkg::ErrorHandling;
 use Dpkg::Arch qw(get_host_arch debarch_eq debarch_is);
 use Dpkg::Fields qw(:list capit unknown);
 use Dpkg::Compression;
-use Dpkg::Control;
+use Dpkg::Control::Info;
 use Dpkg::Cdata;
 use Dpkg::Substvars;
 use Dpkg::Vars;
@@ -202,7 +202,7 @@ eval { # Do not fail if parser failed due to unsupported options
 };
 $bad_parser = 1 if ($@);
 # Other initializations
-my $control = Dpkg::Control->new($controlfile);
+my $control = Dpkg::Control::Info->new($controlfile);
 my $fields = Dpkg::Fields::Object->new();
 $substvars->set_version_substvars($changelog->{"Version"});
 $substvars->set_arch_substvars();

+ 2 - 2
scripts/dpkg-gencontrol.pl

@@ -11,7 +11,7 @@ use Dpkg::ErrorHandling;
 use Dpkg::Arch qw(get_host_arch debarch_eq debarch_is);
 use Dpkg::Deps qw(@pkg_dep_fields %dep_field_type);
 use Dpkg::Fields qw(:list capit unknown);
-use Dpkg::Control;
+use Dpkg::Control::Info;
 use Dpkg::Substvars;
 use Dpkg::Vars;
 use Dpkg::Changelog qw(parse_changelog);
@@ -129,7 +129,7 @@ $substvars->set_version_substvars($changelog->{"Version"});
 $substvars->set_arch_substvars();
 $substvars->parse($varlistfile) if -e $varlistfile;
 $substvars->set("binary:Version", $forceversion) if defined $forceversion;
-my $control = Dpkg::Control->new($controlfile);
+my $control = Dpkg::Control::Info->new($controlfile);
 my $fields = Dpkg::Fields::Object->new();
 
 my $pkg;

+ 2 - 2
scripts/dpkg-gensymbols.pl

@@ -10,7 +10,7 @@ use Dpkg::Shlibs::Objdump;
 use Dpkg::Shlibs::SymbolFile;
 use Dpkg::Gettext;
 use Dpkg::ErrorHandling;
-use Dpkg::Control;
+use Dpkg::Control::Info;
 use Dpkg::Changelog qw(parse_changelog);
 use Dpkg::Path qw(check_files_are_the_same);
 
@@ -122,7 +122,7 @@ if (not defined($sourceversion)) {
     $sourceversion = $changelog->{"Version"};
 }
 if (not defined($oppackage)) {
-    my $control = Dpkg::Control->new();
+    my $control = Dpkg::Control::Info->new();
     my @packages = map { $_->{'Package'} } $control->get_packages();
     @packages == 1 ||
 	error(_g("must specify package since control info has many (%s)"),

+ 2 - 2
scripts/dpkg-shlibdeps.pl

@@ -20,7 +20,7 @@ use Dpkg::Shlibs::SymbolFile;
 use Dpkg::Arch qw(get_host_arch);
 use Dpkg::Fields qw(capit);
 use Dpkg::Deps;
-use Dpkg::Control;
+use Dpkg::Control::Info;
 
 
 use constant {
@@ -116,7 +116,7 @@ foreach (@ARGV) {
 
 scalar keys %exec || usageerr(_g("need at least one executable"));
 
-my $control = Dpkg::Control->new();
+my $control = Dpkg::Control::Info->new();
 my $fields = $control->get_source();
 my $build_depends = defined($fields->{"Build-Depends"}) ?
 		    $fields->{"Build-Depends"} : "";

+ 2 - 2
scripts/dpkg-source.pl

@@ -11,7 +11,7 @@ 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::Compression;
-use Dpkg::Control;
+use Dpkg::Control::Info;
 use Dpkg::Substvars;
 use Dpkg::Version qw(check_version);
 use Dpkg::Vars;
@@ -146,7 +146,7 @@ if ($options{'opmode'} eq 'build') {
     my %ch_options = (file => $changelogfile);
     $ch_options{"changelogformat"} = $changelogformat if $changelogformat;
     my $changelog = parse_changelog(%ch_options);
-    my $control = Dpkg::Control->new($controlfile);
+    my $control = Dpkg::Control::Info->new($controlfile);
 
     my $srcpkg = Dpkg::Source::Package->new(options => \%options);
     my $fields = $srcpkg->{'fields'};

+ 1 - 1
scripts/po/POTFILES.in

@@ -19,7 +19,7 @@ scripts/Dpkg/Cdata.pm
 scripts/Dpkg/Changelog.pm
 scripts/Dpkg/Changelog/Debian.pm
 scripts/Dpkg/Checksums.pm
-scripts/Dpkg/Control.pm
+scripts/Dpkg/Control/Info.pm
 scripts/Dpkg/Deps.pm
 scripts/Dpkg/ErrorHandling.pm
 scripts/Dpkg/Fields.pm

+ 2 - 2
scripts/t/700_Dpkg_Control.t

@@ -6,12 +6,12 @@ use strict;
 use warnings;
 use IO::String;
 
-use_ok('Dpkg::Control');
+use_ok('Dpkg::Control::Info');
 
 my $srcdir = $ENV{srcdir} || '.';
 $srcdir .= '/t/700_Dpkg_Control';
 
-my $c = Dpkg::Control->new("$srcdir/control-1");
+my $c = Dpkg::Control::Info->new("$srcdir/control-1");
 
 my $io = IO::String->new();
 $c->dump($io);