diff options
Diffstat (limited to 'scripts/Dpkg/Build/Types.pm')
-rw-r--r-- | scripts/Dpkg/Build/Types.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/Dpkg/Build/Types.pm b/scripts/Dpkg/Build/Types.pm index 9a921fa0b..45a81d3ba 100644 --- a/scripts/Dpkg/Build/Types.pm +++ b/scripts/Dpkg/Build/Types.pm @@ -100,13 +100,13 @@ use constant BUILD_FULL => BUILD_BINARY | BUILD_SOURCE; my $current_type = BUILD_FULL | BUILD_DEFAULT; my $current_option = undef; -my @build_types = qw(source any all); +my @build_types = qw(full source binary any all); my %build_types = ( full => BUILD_FULL, source => BUILD_SOURCE, + binary => BUILD_BINARY, any => BUILD_ARCH_DEP, all => BUILD_ARCH_INDEP, - binary => BUILD_BINARY, ); =back @@ -224,11 +224,15 @@ Get the current build type as a set of comma-separated string options. sub get_build_options_from_type { - return 'full' if build_has_all(BUILD_FULL); + my $local_type = $current_type; my @parts; foreach my $type (@build_types) { - push @parts, $type if build_has_all($build_types{$type}); + my $part_bits = $build_types{$type}; + if (($local_type & $part_bits) == $part_bits) { + push @parts, $type; + $local_type &= ~$part_bits; + } } return join ',', @parts; |