diff options
author | Guillem Jover <guillem@debian.org> | 2013-11-06 06:02:09 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2013-11-24 05:48:18 +0100 |
commit | 1919e88f193dfd98be05cd25acfe86e617cb2228 (patch) | |
tree | a5306d56ef9d837bd1241aa7f52778ca59b0ee00 /scripts/dpkg-source.pl | |
parent | 1cccaf0d0c509f9ac77f5448a0573e2d1c9c1ae4 (diff) | |
download | dpkg-1919e88f193dfd98be05cd25acfe86e617cb2228.tar.gz |
Dpkg::Source::Package: Deprecate public package variables
Replace direct usage of $diff_ignore_default_regexp and
@tar_ignore_default_pattern with accessor functions.
Addresses Variables::ProhibitPackageVars.
Warned-by: perlcritic
Diffstat (limited to 'scripts/dpkg-source.pl')
-rwxr-xr-x | scripts/dpkg-source.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index a2045eac8..7e2d0fa39 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -42,7 +42,8 @@ use Dpkg::Substvars; use Dpkg::Version; use Dpkg::Vars; use Dpkg::Changelog::Parse; -use Dpkg::Source::Package; +use Dpkg::Source::Package qw(get_default_diff_ignore_regex + get_default_tar_ignore_pattern); use Dpkg::Vendor qw(run_vendor_hook); use Cwd; @@ -76,7 +77,7 @@ my %override; my $substvars = Dpkg::Substvars->new(); my $tar_ignore_default_pattern_done; -my $diff_ignore_regex = $Dpkg::Source::Package::diff_ignore_default_regexp; +my $diff_ignore_regex = get_default_diff_ignore_regex(); my @options; my @cmdline_options; @@ -178,7 +179,7 @@ while (@options) { push @{$options{tar_ignore}}, $1; } elsif (m/^-(?:I|-tar-ignore)$/) { unless ($tar_ignore_default_pattern_done) { - push @{$options{tar_ignore}}, @Dpkg::Source::Package::tar_ignore_default_pattern; + push @{$options{tar_ignore}}, get_default_tar_ignore_pattern(); # Prevent adding multiple times $tar_ignore_default_pattern_done = 1; } @@ -517,8 +518,8 @@ sub usage { 'More options are available but they depend on the source package format. See dpkg-source(1) for more info.') . "\n", $Dpkg::PROGNAME, - $Dpkg::Source::Package::diff_ignore_default_regexp, - join(' ', map { "-I$_" } @Dpkg::Source::Package::tar_ignore_default_pattern), + get_default_diff_ignore_regex(), + join(' ', map { "-I$_" } get_default_tar_ignore_pattern()), compression_get_default(), join(' ', compression_get_list()), compression_get_default_level(); |