Home Home > GIT Browse > packaging
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Suchanek <msuchanek@suse.de>2018-09-27 19:49:19 +0200
committerMichal Suchanek <msuchanek@suse.de>2018-09-28 09:47:35 +0200
commit2d4764042fb11742afeeae095e253ba5398e6366 (patch)
tree0306715f421e133a2527aeadb9160cf458da178d
parentd6435125446d740016904abe30a60611549ae812 (diff)
rpm/mkspec: build dtbs for architectures marked -!needs_updating
-rwxr-xr-xrpm/mkspec24
1 files changed, 18 insertions, 6 deletions
diff --git a/rpm/mkspec b/rpm/mkspec
index 5af478ba9f..7dfb961462 100755
--- a/rpm/mkspec
+++ b/rpm/mkspec
@@ -20,6 +20,14 @@ my %flavor_archs = parse_config_conf();
# subset to include in kernel-syms
my %syms_flavor_archs = parse_config_conf("syms");
+my %all_archs = parse_config_conf("needs_updating");
+my @all_archs;
+ for my $flavor (keys(%all_archs)) {
+ push(@all_archs, arch2rpm(@{$all_archs{$flavor}}));
+ }
+@all_archs = sort(uniq(@all_archs));
+my $all_archs = join(" ", @all_archs);
+
# template name -> template body
my %templates = read_spec_templates();
@@ -162,25 +170,25 @@ if ($variant eq "") {
do_spec('docs', "kernel-docs$variant.spec", %macros);
}
- my $all_archs;
# kernel-syms.spec
{
my $requires = "";
- my %all_archs;
+ my %syms_archs;
+ my $syms_archs;
for my $flavor (sort keys(%syms_flavor_archs)) {
next if $flavor eq "vanilla";
my @archs = arch2rpm(@{$syms_flavor_archs{$flavor}});
- $all_archs{$_} = 1 for @archs;
+ $syms_archs{$_} = 1 for @archs;
$requires .= "%ifarch @archs\n";
$requires .= "Requires: kernel-$flavor-devel = \%version-\%source_rel\n";
$requires .= "%endif\n";
}
chomp $requires;
- $all_archs = join(" ", sort(keys(%all_archs)));
- if (keys(%all_archs)) {
+ $syms_archs = join(" ", sort(keys(%syms_archs)));
+ if (keys(%syms_archs)) {
do_spec('syms', "kernel-syms$variant.spec", %macros,
REQUIRES => $requires,
- ARCHS => $all_archs);
+ ARCHS => $syms_archs);
}
}
@@ -538,3 +546,7 @@ sub xopen {
open($_[0], $_[1], $_[2]) or die "$_[2]: $!\n";
}
+sub uniq {
+ my %seen;
+ return grep { !$seen{$_}++ } @_;
+}