- also add rpmv3 compatibility hack to createrpmdeps
authorMichael Schröder <mls@suse.de>
Fri, 17 Jul 2009 13:20:15 +0000 (13:20 +0000)
committerMichael Schröder <mls@suse.de>
Fri, 17 Jul 2009 13:20:15 +0000 (13:20 +0000)
createrpmdeps

index ba30c42..0240e94 100755 (executable)
@@ -97,6 +97,14 @@ foreach my $dir (@ARGV) {
            $known2path{$known} = $path;
          }
         }
+       # rpm3 compatibility: retrofit missing self provides
+       my $name = $res{1000}->[0];
+       if (!@{$res{1047} || []} || $res{1047}->[-1] !~ /^\Q$name\E =/) {
+         my $evr = "$res{1001}->[0]-$res{1002}->[0]";
+         $evr = "$res{1003}->[0]:$evr" if $res{1003} && $res{1003}->[0];
+         push @{$res{1047}}, "$name = $evr";
+       }
+
         $newp{$known} = "P:$known: ".join(' ', @{$res{1047} || []});
         $newr{$known} = "R:$known: ".join(' ', @{$res{1049} || []});
        #$tag{$known} = $res{1000}->[0]."-".$res{1001}->[0]."-".$res{1002}->[0]." ".$res{1007}->[0]."-".$res{1006}->[0];