summaryrefslogtreecommitdiff
path: root/scripts/Dpkg/Build/Types.pm
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2016-04-06 17:33:26 +0200
committerGuillem Jover <guillem@debian.org>2016-05-02 04:03:19 +0200
commitdd064b2138478d9a53beefa7a873425d1738e4cb (patch)
tree24a466a4a588b614f3f8bec7de4f9c887f16cc1f /scripts/Dpkg/Build/Types.pm
parent9c9fc468fe445bf7a531c89135bc06d66ced58dc (diff)
downloaddpkg-dd064b2138478d9a53beefa7a873425d1738e4cb.tar.gz
Dpkg::Build::Types: Add new build_has_any function
Fix regression introduced in commit d122537d6df899dc1d0599e0a24ee3b27f0d9e18. These instances need to trigger whenever there is any bit set.
Diffstat (limited to 'scripts/Dpkg/Build/Types.pm')
-rw-r--r--scripts/Dpkg/Build/Types.pm19
1 files changed, 17 insertions, 2 deletions
diff --git a/scripts/Dpkg/Build/Types.pm b/scripts/Dpkg/Build/Types.pm
index cbefefd49..85b44245c 100644
--- a/scripts/Dpkg/Build/Types.pm
+++ b/scripts/Dpkg/Build/Types.pm
@@ -27,6 +27,7 @@ our @EXPORT = qw(
BUILD_ARCH_INDEP
BUILD_BINARY
BUILD_FULL
+ build_has_any
build_has
build_has_not
build_is
@@ -103,10 +104,24 @@ my $current_option = undef;
=over 4
+=item build_has_any($bits)
+
+Return a boolean indicating whether the current build type has any of the
+specified $bits.
+
+=cut
+
+sub build_has_any
+{
+ my ($bits) = @_;
+
+ return $current_type & $bits;
+}
+
=item build_has($bits)
-Return a boolean indicating whether the current build type has the specified
-$bits.
+Return a boolean indicating whether the current build type has all the
+specified $bits.
=cut