]> git.donarmstrong.com Git - debbugs.git/commitdiff
if there is a non-source qualified version with a corresponding source
authorDon Armstrong <don@donarmstrong.com>
Thu, 8 Nov 2012 22:38:28 +0000 (14:38 -0800)
committerDon Armstrong <don@donarmstrong.com>
Thu, 8 Nov 2012 22:38:28 +0000 (14:38 -0800)
qualified version, we only want to merge the source qualified
version(s)

This fixes #670456

Debbugs/Control.pm

index 74653b0a66e5d5d56210c60f0dbba16220d570f7..39e6648bbe8478aea8e28b07e454007f0c8f4e3d 100644 (file)
@@ -2319,6 +2319,17 @@ sub __calculate_merge_status{
            @{$merge_status{"${_}_versions"}}{@{$data->{"${_}_versions"}}} = (1) x @{$data->{"${_}_versions"}};
        }
     }
+    # if there is a non-source qualified version with a corresponding
+    # source qualified version, we only want to merge the source
+    # qualified version(s)
+    for (qw(fixed found)) {
+       my @unqualified_versions = grep {m{/}?0:1} keys %{$merge_status{"${_}_versions"}};
+       for my $unqualified_version (@unqualified_versions) {
+           if (grep {m{/\Q$unqualified_version\E}} keys %{$merge_status{"${_}_versions"}}) {
+               delete $merge_status{"${_}_versions"}{$unqualified_version};
+           }
+       }
+    }
     return (\%merge_status,$bugs_to_merge);
 }