diff options
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r-- | scripts/Dpkg/Arch.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/BuildProfiles.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Changelog/Parse.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Deps.pm | 1 | ||||
-rw-r--r-- | scripts/Dpkg/Shlibs.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Shlibs/Symbol.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Package/V3/Quilt.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Source/Quilt.pm | 2 | ||||
-rw-r--r-- | scripts/Dpkg/Util.pm | 59 |
9 files changed, 7 insertions, 67 deletions
diff --git a/scripts/Dpkg/Arch.pm b/scripts/Dpkg/Arch.pm index 1720847b8..c6321a580 100644 --- a/scripts/Dpkg/Arch.pm +++ b/scripts/Dpkg/Arch.pm @@ -95,12 +95,12 @@ our %EXPORT_TAGS = ( use Exporter qw(import); +use List::Util qw(any); use POSIX qw(:errno_h); use Dpkg (); use Dpkg::Gettext; use Dpkg::ErrorHandling; -use Dpkg::Util qw(:list); use Dpkg::Build::Env; my (@cpu, @os); diff --git a/scripts/Dpkg/BuildProfiles.pm b/scripts/Dpkg/BuildProfiles.pm index 6314f1e59..3f8580b4c 100644 --- a/scripts/Dpkg/BuildProfiles.pm +++ b/scripts/Dpkg/BuildProfiles.pm @@ -27,8 +27,8 @@ our @EXPORT_OK = qw( ); use Exporter qw(import); +use List::Util qw(any); -use Dpkg::Util qw(:list); use Dpkg::Build::Env; my $cache_profiles; diff --git a/scripts/Dpkg/Changelog/Parse.pm b/scripts/Dpkg/Changelog/Parse.pm index 68777b4b0..e26a090db 100644 --- a/scripts/Dpkg/Changelog/Parse.pm +++ b/scripts/Dpkg/Changelog/Parse.pm @@ -41,9 +41,9 @@ our @EXPORT = qw( ); use Exporter qw(import); +use List::Util qw(none); use Dpkg (); -use Dpkg::Util qw(none); use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Control::Changelog; diff --git a/scripts/Dpkg/Deps.pm b/scripts/Dpkg/Deps.pm index f4c3be558..0d5652bc8 100644 --- a/scripts/Dpkg/Deps.pm +++ b/scripts/Dpkg/Deps.pm @@ -573,7 +573,6 @@ use Dpkg::BuildProfiles qw(parse_build_profiles evaluate_restriction_formula); use Dpkg::Version; use Dpkg::ErrorHandling; use Dpkg::Gettext; -use Dpkg::Util qw(:list); use parent qw(Dpkg::Interface::Storable); diff --git a/scripts/Dpkg/Shlibs.pm b/scripts/Dpkg/Shlibs.pm index 9816dbf14..c8b43ab9d 100644 --- a/scripts/Dpkg/Shlibs.pm +++ b/scripts/Dpkg/Shlibs.pm @@ -30,12 +30,12 @@ our @EXPORT_OK = qw( ); use Exporter qw(import); +use List::Util qw(none); use File::Spec; use Dpkg::Gettext; use Dpkg::ErrorHandling; use Dpkg::Shlibs::Objdump; -use Dpkg::Util qw(:list); use Dpkg::Path qw(resolve_symlink canonpath); use Dpkg::Arch qw(get_build_arch get_host_arch :mappers); diff --git a/scripts/Dpkg/Shlibs/Symbol.pm b/scripts/Dpkg/Shlibs/Symbol.pm index 019e77e99..6093e24a0 100644 --- a/scripts/Dpkg/Shlibs/Symbol.pm +++ b/scripts/Dpkg/Shlibs/Symbol.pm @@ -22,10 +22,10 @@ use warnings; our $VERSION = '0.01'; use Storable (); +use List::Util qw(any); use Dpkg::Gettext; use Dpkg::ErrorHandling; -use Dpkg::Util qw(:list); use Dpkg::Arch qw(debarch_is_concerned debarch_to_cpuattrs); use Dpkg::Version; use Dpkg::Shlibs::Cppfilt; diff --git a/scripts/Dpkg/Source/Package/V3/Quilt.pm b/scripts/Dpkg/Source/Package/V3/Quilt.pm index fdb763531..9718ffa2d 100644 --- a/scripts/Dpkg/Source/Package/V3/Quilt.pm +++ b/scripts/Dpkg/Source/Package/V3/Quilt.pm @@ -20,12 +20,12 @@ use warnings; our $VERSION = '0.01'; +use List::Util qw(any); use File::Spec; use File::Copy; use Dpkg::Gettext; use Dpkg::ErrorHandling; -use Dpkg::Util qw(:list); use Dpkg::Version; use Dpkg::Source::Patch; use Dpkg::Source::Functions qw(erasedir fs_time); diff --git a/scripts/Dpkg/Source/Quilt.pm b/scripts/Dpkg/Source/Quilt.pm index a07abb20b..55b3fbaf8 100644 --- a/scripts/Dpkg/Source/Quilt.pm +++ b/scripts/Dpkg/Source/Quilt.pm @@ -20,6 +20,7 @@ use warnings; our $VERSION = '0.02'; +use List::Util qw(any none); use File::Spec; use File::Copy; use File::Find; @@ -28,7 +29,6 @@ use File::Basename; use Dpkg::Gettext; use Dpkg::ErrorHandling; -use Dpkg::Util qw(:list); use Dpkg::Source::Patch; use Dpkg::Source::Functions qw(erasedir fs_time); use Dpkg::Vendor qw(get_current_vendor); diff --git a/scripts/Dpkg/Util.pm b/scripts/Dpkg/Util.pm deleted file mode 100644 index 4b371a115..000000000 --- a/scripts/Dpkg/Util.pm +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright © 2013, 2015 Guillem Jover <guillem@debian.org> -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. - -package Dpkg::Util; - -use strict; -use warnings; - -our $VERSION = '0.01'; -our @EXPORT_OK = qw( - any - none -); -our %EXPORT_TAGS = ( - list => [ qw(any none) ], -); - -use Exporter qw(import); - -# XXX: Ideally we would use List::MoreUtils, but that's not a core module, -# so to avoid the additional dependency we'll make do with the following -# trivial reimplementations. -# -# These got added to List::Util 1.33, which got merged into perl 5.20.0, -# once that is in Debian oldstable we can switch to that core module. - -sub any(&@) { - my $code = shift; - - foreach (@_) { - return 1 if $code->(); - } - - return 0; -} - -sub none(&@) { - my $code = shift; - - foreach (@_) { - return 0 if $code->(); - } - - return 1; -} - -1; |