summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Control
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg/Control')
-rw-r--r--scripts/Dpkg/Control/Changelog.pm2
-rw-r--r--scripts/Dpkg/Control/Fields.pm9
-rw-r--r--scripts/Dpkg/Control/FieldsCore.pm7
-rw-r--r--scripts/Dpkg/Control/HashCore.pm23
-rw-r--r--scripts/Dpkg/Control/Info.pm17
-rw-r--r--scripts/Dpkg/Control/Tests.pm2
-rw-r--r--scripts/Dpkg/Control/Tests/Entry.pm2
7 files changed, 35 insertions, 27 deletions
diff --git a/scripts/Dpkg/Control/Changelog.pm b/scripts/Dpkg/Control/Changelog.pm
index 1f65127c4..9184cedbc 100644
--- a/scripts/Dpkg/Control/Changelog.pm
+++ b/scripts/Dpkg/Control/Changelog.pm
@@ -32,7 +32,7 @@ Dpkg::Control::Changelog - represent info fields output by dpkg-parsechangelog
=head1 DESCRIPTION
-This object derives directly from Dpkg::Control with the type
+This class derives directly from Dpkg::Control with the type
CTRL_CHANGELOG.
=head1 METHODS
diff --git a/scripts/Dpkg/Control/Fields.pm b/scripts/Dpkg/Control/Fields.pm
index 4a584e413..33beeec56 100644
--- a/scripts/Dpkg/Control/Fields.pm
+++ b/scripts/Dpkg/Control/Fields.pm
@@ -32,11 +32,14 @@ foreach my $op (run_vendor_hook('register-custom-fields')) {
next if not (defined $op and ref $op); # Skip when not implemented by vendor
my $func = shift @$op;
if ($func eq 'register') {
- &field_register(@$op);
+ my ($field, $allowed_type, @opts) = @{$op};
+ field_register($field, $allowed_type, @opts);
} elsif ($func eq 'insert_before') {
- &field_insert_before(@$op);
+ my ($type, $ref, @fields) = @{$op};
+ field_insert_before($type, $ref, @fields);
} elsif ($func eq 'insert_after') {
- &field_insert_after(@$op);
+ my ($type, $ref, @fields) = @{$op};
+ field_insert_after($type, $ref, @fields);
} else {
croak "vendor hook register-custom-fields sent bad data: @$op";
}
diff --git a/scripts/Dpkg/Control/FieldsCore.pm b/scripts/Dpkg/Control/FieldsCore.pm
index b100366e1..f460433fc 100644
--- a/scripts/Dpkg/Control/FieldsCore.pm
+++ b/scripts/Dpkg/Control/FieldsCore.pm
@@ -176,6 +176,11 @@ our %FIELDS = (
allowed => CTRL_INFO_PKG,
separator => FIELD_SEP_SPACE,
},
+ 'build-tainted-by' => {
+ name => 'Build-Tainted-By',
+ allowed => CTRL_FILE_BUILDINFO,
+ separator => FIELD_SEP_SPACE,
+ },
'built-for-profiles' => {
name => 'Built-For-Profiles',
allowed => ALL_PKG | CTRL_FILE_CHANGES,
@@ -634,7 +639,7 @@ our %FIELD_ORDER = (
qw(format source binary architecture version binary-only-changes),
@src_checksums_fields,
qw(build-origin build-architecture build-kernel-version build-date
- build-path installed-build-depends environment),
+ build-path build-tainted-by installed-build-depends environment),
],
CTRL_FILE_CHANGES() => [
qw(format date source binary binary-only built-for-profiles architecture
diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm
index e83522729..04a8a574b 100644
--- a/scripts/Dpkg/Control/HashCore.pm
+++ b/scripts/Dpkg/Control/HashCore.pm
@@ -43,7 +43,7 @@ Dpkg::Control::HashCore - parse and manipulate a block of RFC822-like fields
=head1 DESCRIPTION
-The Dpkg::Control::Hash object is a hash-like representation of a set of
+The Dpkg::Control::Hash class is a hash-like representation of a set of
RFC822-like fields. The fields names are case insensitive and are always
capitalized the same when output (see field_capitalize function in
Dpkg::Control::Fields).
@@ -160,11 +160,6 @@ sub get_option {
return $$self->{$k};
}
-=item $c->load($file)
-
-Parse the content of $file. Exits in case of errors. Returns true if some
-fields have been parsed.
-
=item $c->parse_error($file, $fmt, ...)
Prints an error message and dies on syntax parse errors.
@@ -284,6 +279,11 @@ sub parse {
return defined($cf);
}
+=item $c->load($file)
+
+Parse the content of $file. Exits in case of errors. Returns true if some
+fields have been parsed.
+
=item $c->find_custom_field($name)
Scan the fields and look for a user specific field whose name matches the
@@ -313,11 +313,6 @@ sub get_custom_field {
return;
}
-=item $c->save($filename)
-
-Write the string representation of the control information to a
-file.
-
=item $str = $c->output()
=item "$c"
@@ -386,6 +381,10 @@ sub output {
return $str;
}
+=item $c->save($filename)
+
+Write the string representation of the control information to a file.
+
=item $c->set_output_order(@fields)
Define the order in which fields will be displayed in the output() method.
@@ -441,7 +440,7 @@ sub apply_substvars {
package Dpkg::Control::HashCore::Tie;
-# This object is used to tie a hash. It implements hash-like functions by
+# This class is used to tie a hash. It implements hash-like functions by
# normalizing the name of fields received in keys (using
# Dpkg::Control::Fields::field_capitalize). It also stores the order in
# which fields have been added in order to be able to dump them in the
diff --git a/scripts/Dpkg/Control/Info.pm b/scripts/Dpkg/Control/Info.pm
index a5eae8732..5759ab5ad 100644
--- a/scripts/Dpkg/Control/Info.pm
+++ b/scripts/Dpkg/Control/Info.pm
@@ -38,7 +38,7 @@ Dpkg::Control::Info - parse files like debian/control
=head1 DESCRIPTION
-It provides an object to access data of files that follow the same
+It provides a class to access data of files that follow the same
syntax as F<debian/control>.
=head1 METHODS
@@ -90,11 +90,6 @@ sub reset {
$self->{packages} = [];
}
-=item $c->load($file)
-
-Load the content of $file. Exits in case of errors. If file is "-", it
-loads from the standard input.
-
=item $c->parse($fh, $description)
Parse a control file from the given filehandle. Exits in case of errors.
@@ -129,6 +124,11 @@ sub parse {
}
}
+=item $c->load($file)
+
+Load the content of $file. Exits in case of errors. If file is "-", it
+loads from the standard input.
+
=item $c->[0]
=item $c->get_source()
@@ -182,9 +182,10 @@ sub get_packages {
return @{$self->{packages}};
}
-=item $c->output($filehandle)
+=item $str = $c->output([$fh])
-Dump the content into a filehandle.
+Return the content info into a string. If $fh is specified print it into
+the filehandle.
=cut
diff --git a/scripts/Dpkg/Control/Tests.pm b/scripts/Dpkg/Control/Tests.pm
index 439eee8c8..3c8d1c006 100644
--- a/scripts/Dpkg/Control/Tests.pm
+++ b/scripts/Dpkg/Control/Tests.pm
@@ -34,7 +34,7 @@ Dpkg::Control::Tests - parse files like debian/tests/control
=head1 DESCRIPTION
-It provides an object to access data of files that follow the same
+It provides a class to access data of files that follow the same
syntax as F<debian/tests/control>.
=head1 METHODS
diff --git a/scripts/Dpkg/Control/Tests/Entry.pm b/scripts/Dpkg/Control/Tests/Entry.pm
index 92eea49f4..001a6f429 100644
--- a/scripts/Dpkg/Control/Tests/Entry.pm
+++ b/scripts/Dpkg/Control/Tests/Entry.pm
@@ -34,7 +34,7 @@ Dpkg::Control::Tests::Entry - represents a test suite entry
=head1 DESCRIPTION
-This object represents a test suite entry.
+This class represents a test suite entry.
=head1 METHODS