summaryrefslogtreecommitdiff
path: root/createrpmdeps
diff options
context:
space:
mode:
Diffstat (limited to 'createrpmdeps')
-rwxr-xr-xcreaterpmdeps37
1 files changed, 36 insertions, 1 deletions
diff --git a/createrpmdeps b/createrpmdeps
index c8c796d..191c850 100755
--- a/createrpmdeps
+++ b/createrpmdeps
@@ -1,5 +1,25 @@
#!/usr/bin/perl -w
+################################################################
+#
+# Copyright (c) 1995-2014 SUSE Linux Products GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 or 3 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program (see the file COPYING); if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+################################################################
+
BEGIN {
unshift @INC, ($::ENV{'BUILD_DIR'} || '/usr/lib/build');
}
@@ -15,6 +35,8 @@ my %tag;
my %oldp;
my %oldr;
+my %oldc;
+my %oldo;
if (defined($rpmdepfile) && open(F, '<', $rpmdepfile)) {
while (<F>) {
chomp;
@@ -22,6 +44,10 @@ if (defined($rpmdepfile) && open(F, '<', $rpmdepfile)) {
$oldp{$1} = $_;
} elsif (/^R:([^ ]): /) {
$oldr{$1} = $_;
+ } elsif (/^C:([^ ]): /) {
+ $oldc{$1} = $_;
+ } elsif (/^O:([^ ]): /) {
+ $oldo{$1} = $_;
}
}
close F;
@@ -74,9 +100,13 @@ foreach my $dir (@ARGV) {
my %newp;
my %newr;
+ my %newc;
+ my %newo;
for (@known) {
$newp{$_} = $oldp{$_} if $oldp{$_};
$newr{$_} = $oldr{$_} if $oldr{$_};
+ $newc{$_} = $oldc{$_} if $oldc{$_};
+ $newo{$_} = $oldo{$_} if $oldo{$_};
}
my @todo = grep {!($newp{$_} && $newr{$_})} @known;
@@ -84,10 +114,12 @@ foreach my $dir (@ARGV) {
for my $known (@todo) {
my $path = $known2path{$known};
if ($path =~ /\.rpm$/) {
- my %res = Build::Rpm::rpmq($path, 1000, 1001, 1002, 1006, 1022, 1047, 1049, 1048, 1050, 1112, 1113);
+ my %res = Build::Rpm::rpmq($path, 1000, 1001, 1002, 1006, 1022, 1047, 1049, 1048, 1050, 1053, 1054, 1055, 1090, 1112, 1113, 1114, 1115);
next unless %res;
Build::Rpm::add_flagsvers(\%res, 1047, 1112, 1113);
Build::Rpm::add_flagsvers(\%res, 1049, 1048, 1050);
+ Build::Rpm::add_flagsvers(\%res, 1054, 1053, 1055);
+ Build::Rpm::add_flagsvers(\%res, 1090, 1114, 1115);
my $id = $known;
$id =~ s/.*-//;
if ($known ne "$res{1000}->[0].$res{1022}->[0]-$id") {
@@ -107,6 +139,8 @@ foreach my $dir (@ARGV) {
$newp{$known} = "P:$known: ".join(' ', @{$res{1047} || []});
$newr{$known} = "R:$known: ".join(' ', @{$res{1049} || []});
+ $newc{$known} = "C:$known: ".join(' ', @{$res{1054} || []}) if @{$res{1054} || []};
+ $newo{$known} = "O:$known: ".join(' ', @{$res{1090} || []}) if @{$res{1090} || []};
#$tag{$known} = $res{1000}->[0]."-".$res{1001}->[0]."-".$res{1002}->[0]." ".$res{1007}->[0]."-".$res{1006}->[0];
$tag{$known} = $res{1000}->[0]."-".$res{1001}->[0]."-".$res{1002}->[0]." ".$res{1006}->[0];
} else {
@@ -141,6 +175,7 @@ foreach my $dir (@ARGV) {
print "F:$_: $known2path{$_}\n";
print "$newp{$_}\n";
print "$newr{$_}\n";
+ print "$newc{$_}\n" if $newc{$_};
print "I:$_: $tag{$_}\n" if exists $tag{$_};
}
}