summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdh1
-rw-r--r--lib/Debian/Debhelper/Dh_Lib.pm7
2 files changed, 7 insertions, 1 deletions
diff --git a/dh b/dh
index bffa6606..f6f9ad7e 100755
--- a/dh
+++ b/dh
@@ -299,6 +299,7 @@ init(options => {
ignore_unknown_options => 1,
# Bundling does not work well since there are unknown options.
bundling => 0,
+ internal_parse_dh_sequence_info => 1,
);
set_buildflags();
reject_obsolete_params();
diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm
index 070f5968..cc7b5b1c 100644
--- a/lib/Debian/Debhelper/Dh_Lib.pm
+++ b/lib/Debian/Debhelper/Dh_Lib.pm
@@ -201,6 +201,10 @@ our $DEB822_FIELD_REGEX = qr/
sub init {
my %params=@_;
+ if ($params{internal_parse_dh_sequence_info}) {
+ _parse_debian_control(1);
+ }
+
# Check if we can by-pass the expensive Getopt::Long by optimising for the
# common case of "-a" or "-i"
if (scalar(@ARGV) == 1 && ($ARGV[0] eq '-a' || $ARGV[0] eq '-i') &&
@@ -1582,6 +1586,7 @@ sub getpackages {
}
sub _parse_debian_control {
+ my ($parse_dh_sequence_info) = @_;
my $package="";
my $arch="";
my $section="";
@@ -1693,7 +1698,7 @@ sub _parse_debian_control {
error("Could not parse desired debhelper compat level from relation: $dep");
}
# Build-Depends on dh-sequence-<foo> OR dh-sequence-<foo> (<op> <version>)
- if ($dep =~ m/^dh-sequence-(${PKGNAME_REGEX})\s*(?:[(]\s*(?:[<>]?=|<<|>>)\s*(?:${PKGVERSION_REGEX})\s*[)])?(\s*[^\|]+[]>]\s*)?$/) {
+ if ($parse_dh_sequence_info and $dep =~ m/^dh-sequence-(${PKGNAME_REGEX})\s*(?:[(]\s*(?:[<>]?=|<<|>>)\s*(?:${PKGVERSION_REGEX})\s*[)])?(\s*[^\|]+[]>]\s*)?$/) {
my $sequence = $1;
my $has_profile_or_arch_restriction = $2 ? 1 : 0;
my $addon_type = $field2addon_type{$field};