/[packages]/updates/infra_5/iurt/current/SOURCES/0005-Fix-reuse-of-arch-part-of-the-tree.patch
ViewVC logotype

Contents of /updates/infra_5/iurt/current/SOURCES/0005-Fix-reuse-of-arch-part-of-the-tree.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1060979 - (show annotations) (download)
Sat Oct 15 19:14:09 2016 UTC (7 years, 6 months ago) by pterjan
File size: 6469 byte(s)
Add more fixes from git
1 From be053c1ef4f64b106657902b3b37cd5e3c7ce22e Mon Sep 17 00:00:00 2001
2 From: Pascal Terjan <pterjan@gmail.com>
3 Date: Tue, 11 Oct 2016 09:06:22 +0100
4 Subject: [PATCH 05/14] Fix reuse of {arch} part of the tree
5
6 It is used by ulri for both builds in progress and already done,
7 while emi expects it to be only for done ones.
8
9 This causes to upload only part of mandatory arches and later reject
10 the other.
11 ---
12 NEWS | 2 ++
13 lib/Iurt/Emi.pm | 4 ++--
14 lib/Iurt/Queue.pm | 4 ++--
15 t/emi_finisher.t | 4 ++--
16 t/emi_mandatory.t | 6 +++---
17 t/emi_non_mandatory.t | 10 +++++-----
18 ulri | 4 +++-
19 7 files changed, 19 insertions(+), 15 deletions(-)
20
21 diff --git a/NEWS b/NEWS
22 index 3d92b62..c877321 100644
23 --- a/NEWS
24 +++ b/NEWS
25 @@ -1,5 +1,7 @@
26 - emi: fix a bug where genhdlist2 was skipped when doing a secondary upload
27 containing a noarch at the same time as some other uploads
28 +- fix reuse of {arch} part of the tree which is used by ulri for both builds
29 + in progress and already done, while emi expects it to be only for done ones
30
31 0.6.26
32 - ulri: when failing to send a build to a machine do not try sending all the
33 diff --git a/lib/Iurt/Emi.pm b/lib/Iurt/Emi.pm
34 index b1bc619..a0ed76e 100644
35 --- a/lib/Iurt/Emi.pm
36 +++ b/lib/Iurt/Emi.pm
37 @@ -44,7 +44,7 @@ sub find_prefixes_ready_to_upload {
38 foreach my $m (@wanted_archs, 'src') {
39 $pkg_tree{$prefix}{media}{$media}{excluded_arch}{$m} and next;
40 my $x = "yes";
41 - if (!$pkg_tree{$prefix}{media}{$media}{arch}{$m}) {
42 + if (!$pkg_tree{$prefix}{media}{$media}{done_arch}{$m}) {
43 $missing{$m} = 1;
44 $x = "no";
45 $ok = 0;
46 @@ -177,7 +177,7 @@ sub upload_prefix_in_media {
47 # If we are here, mandatory arches are done, no need to check them
48 my $mandatory_arch = get_mandatory_arch($config, $target);
49 foreach my $arch (difference2(\@arch_list, $mandatory_arch)) {
50 - next if $pkg_tree->{$prefix}{media}{$media}{arch}{$arch};
51 + next if $pkg_tree->{$prefix}{media}{$media}{done_arch}{$arch};
52 $all_done = 0;
53 }
54 }
55 diff --git a/lib/Iurt/Queue.pm b/lib/Iurt/Queue.pm
56 index bf1f4f6..f6907e6 100644
57 --- a/lib/Iurt/Queue.pm
58 +++ b/lib/Iurt/Queue.pm
59 @@ -181,7 +181,7 @@ sub get_upload_tree_state {
60 plog('DEBUG', "found already built rpm $rpm ($prefix) for media $media");
61 $pkg_tree{$prefix}{target} = $f;
62 if ($arch eq 'src') {
63 - $pkg_tree{$prefix}{media}{$media}{arch}{src} = 1;
64 + $pkg_tree{$prefix}{media}{$media}{done_arch}{src} = 1;
65 }
66 push @{$pkg_tree{$prefix}{media}{$media}{rpms}} , $rpm;
67 push @{$pkg_tree{$prefix}{rpms}} , $rpm;
68 @@ -189,7 +189,7 @@ sub get_upload_tree_state {
69 my ($arch, $result) = ($1, $2);
70 plog('DEBUG', "found .$result ($prefix) for $arch");
71 if ($result eq 'done') {
72 - $pkg_tree{$prefix}{media}{$media}{arch}{$arch} = 1;
73 + $pkg_tree{$prefix}{media}{$media}{done_arch}{$arch} = 1;
74 } elsif ($result eq 'excluded') {
75 $arch = $config->{arch_translation}{$arch} if $config->{arch_translation}{$arch};
76 $pkg_tree{$prefix}{media}{$media}{excluded_arch}{$arch} = 1;
77 diff --git a/t/emi_finisher.t b/t/emi_finisher.t
78 index b66a1be..8bfed63 100644
79 --- a/t/emi_finisher.t
80 +++ b/t/emi_finisher.t
81 @@ -12,7 +12,7 @@ my %pkg_tree = (
82 'target' => 'cauldron',
83 'media' => {
84 'core/release' => {
85 - 'arch' => {
86 + 'done_arch' => {
87 'i586' => 1,
88 'x86_64' => 1,
89 'src' => 1
90 @@ -43,7 +43,7 @@ my %pkg_tree = (
91 'media' => {
92 'core/release' => {
93 'uploaded' => 1,
94 - 'arch' => {
95 + 'done_arch' => {
96 'armv5tl' => 1,
97 'i586' => 1,
98 'x86_64' => 1,
99 diff --git a/t/emi_mandatory.t b/t/emi_mandatory.t
100 index e50d328..90ba2a2 100644
101 --- a/t/emi_mandatory.t
102 +++ b/t/emi_mandatory.t
103 @@ -12,7 +12,7 @@ my %pkg_tree = (
104 'target' => 'cauldron',
105 'media' => {
106 'core/release' => {
107 - 'arch' => {
108 + 'done_arch' => {
109 'x86_64' => 1,
110 'src' => 1
111 },
112 @@ -34,7 +34,7 @@ my %pkg_tree = (
113 'target' => 'cauldron',
114 'media' => {
115 'core/release' => {
116 - 'arch' => {
117 + 'done_arch' => {
118 'i586' => 1,
119 'x86_64' => 1,
120 'src' => 1
121 @@ -61,7 +61,7 @@ my %pkg_tree = (
122 'target' => 'cauldron',
123 'media' => {
124 'core/release' => {
125 - 'arch' => {
126 + 'done_arch' => {
127 'x86_64' => 1,
128 'src' => 1
129 },
130 diff --git a/t/emi_non_mandatory.t b/t/emi_non_mandatory.t
131 index 8aa2c94..44031f6 100644
132 --- a/t/emi_non_mandatory.t
133 +++ b/t/emi_non_mandatory.t
134 @@ -28,7 +28,7 @@ my %pkg_tree = (
135 'target' => 'cauldron',
136 'media' => {
137 'core/release' => {
138 - 'arch' => {
139 + 'done_arch' => {
140 'armv5tl' => 1,
141 'x86_64' => 1,
142 'src' => 1
143 @@ -58,7 +58,7 @@ my %pkg_tree = (
144 'target' => 'cauldron',
145 'media' => {
146 'core/release' => {
147 - 'arch' => {
148 + 'done_arch' => {
149 'armv5tl' => 1,
150 'i586' => 1,
151 'x86_64' => 1,
152 @@ -93,7 +93,7 @@ my %pkg_tree = (
153 'target' => 'cauldron',
154 'media' => {
155 'core/release' => {
156 - 'arch' => {
157 + 'done_arch' => {
158 'armv5tl' => 1,
159 'x86_64' => 1,
160 'src' => 1
161 @@ -127,7 +127,7 @@ my %pkg_tree = (
162 'media' => {
163 'core/release' => {
164 'uploaded' => 1,
165 - 'arch' => {
166 + 'done_arch' => {
167 'armv5tl' => 1,
168 'i586' => 1,
169 'x86_64' => 1,
170 @@ -154,7 +154,7 @@ my %pkg_tree = (
171 'target' => 'cauldron',
172 'media' => {
173 'core/release' => {
174 - 'arch' => {
175 + 'done_arch' => {
176 'x86_64' => 1,
177 'src' => 1
178 },
179 diff --git a/ulri b/ulri
180 index bd544b2..1e36f98 100755
181 --- a/ulri
182 +++ b/ulri
183 @@ -375,6 +375,7 @@ foreach my $prefix (keys %pkg_tree) {
184
185 if ($done) {
186 create_file("$done_dir/${prefix}_$arch.done", "$bot $host");
187 + $pkg_tree{$prefix}{media}{$media}{done_arch}{$arch} = 1;
188 $success = 1;
189 }
190
191 @@ -491,9 +492,10 @@ foreach my $prefix (sort keys %pkg_tree) {
192 # need to find a bot for each arch
193 foreach my $arch (@arch_list) {
194 # Skip this arch if the package is already building as noarch or for this arch
195 - # or if it should not be built on this arch or it has already failed
196 + # or if it should not be built on this arch or it has already failed or succeeded
197 next if $pkg_tree{$prefix}{media}{$media}{arch}{noarch};
198 next if $pkg_tree{$prefix}{media}{$media}{arch}{$arch};
199 + next if $pkg_tree{$prefix}{media}{$media}{done_arch}{$arch};
200 next if $pkg_tree{$prefix}{media}{$media}{excluded_arch}{$arch};
201 next if $pkg_tree{$prefix}{media}{$media}{failed_arch}{$arch};
202
203 --
204 2.10.1
205

  ViewVC Help
Powered by ViewVC 1.1.30