summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Source
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Dpkg/Source')
-rw-r--r--scripts/Dpkg/Source/Package.pm21
1 files changed, 16 insertions, 5 deletions
diff --git a/scripts/Dpkg/Source/Package.pm b/scripts/Dpkg/Source/Package.pm
index c9f8d5e14..b3a80ba1d 100644
--- a/scripts/Dpkg/Source/Package.pm
+++ b/scripts/Dpkg/Source/Package.pm
@@ -34,7 +34,7 @@ is the one that supports the extraction of the source package.
use strict;
use warnings;
-our $VERSION = '1.02';
+our $VERSION = '1.03';
our @EXPORT_OK = qw(
get_default_diff_ignore_regex
set_default_diff_ignore_regex
@@ -166,12 +166,15 @@ sub get_default_tar_ignore_pattern {
=over 4
-=item $p = Dpkg::Source::Package->new(filename => $dscfile, options => {})
+=item $p = Dpkg::Source::Package->new(%opts, options => {})
-Creates a new object corresponding to the source package described
-by the file $dscfile.
+Creates a new object corresponding to a source package. When the key
+B<filename> is set to a F<.dsc> file, it will be used to initialize the
+source package with its description. Otherwise if the B<format> key is
+set to a valid value, the object will be initialized for that format
+(since dpkg 1.19.3).
-The options hash supports the following options:
+The B<options> key is a hash ref which supports the following options:
=over 8
@@ -220,6 +223,10 @@ sub new {
if (exists $args{filename}) {
$self->initialize($args{filename});
$self->init_options();
+ } elsif ($args{format}) {
+ $self->{fields}{Format} = $args{format};
+ $self->upgrade_object_type(0);
+ $self->init_options();
}
return $self;
}
@@ -670,6 +677,10 @@ sub write_dsc {
=head1 CHANGES
+=head2 Version 1.03 (dpkg 1.19.3)
+
+New option: format in new().
+
=head2 Version 1.02 (dpkg 1.18.7)
New option: require_strong_checksums in check_checksums().