Skip to content

Commit 2821255

Browse files
committed
Skip repos where we have nothing to do ("opensuse", etc)
1 parent 6c6c222 commit 2821255

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

put-multiarch/put-multiarch.pl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ (@)
100100
return $output;
101101
}
102102

103-
sub get_manifest_p ($org, $repo, $ref, $tries = 3) {
103+
sub get_manifest_p ($org, $repo, $ref, $tries = 10) {
104104
--$tries;
105105
my $lastTry = $tries < 1;
106106

@@ -143,7 +143,7 @@ ($org, $repo, $ref, $tries = 3)
143143
});
144144
}
145145

146-
sub get_blob_p ($org, $repo, $ref, $tries = 3) {
146+
sub get_blob_p ($org, $repo, $ref, $tries = 10) {
147147
die "unexpected blob reference for '$org/$repo': '$ref'" unless $ref =~ m!^sha256:!;
148148

149149
--$tries;
@@ -361,11 +361,13 @@ ($method, $repos, $url, $contentType = undef, $payload = undef, $tries = 10)
361361
? ( "$repo:$tag" )
362362
: ( List::Util::uniq sort split /\n/, bashbrew('list', $repo) )
363363
);
364+
return Mojo::Promise->resolve unless @tags; # no tags, nothing to do! (opensuse, etc)
364365

365366
return Mojo::Promise->map({ concurrency => 1 }, sub ($repoTag) {
366367
my (undef, $repo, $tag) = split_image_name($repoTag);
367368

368369
my @arches = List::Util::uniq sort split /\n/, bashbrew('cat', '--format', '{{ range .Entries }}{{ range .Architectures }}{{ . }}={{ archNamespace . }}{{ "\n" }}{{ end }}{{ end }}', "$repo:$tag");
370+
return Mojo::Promise->resolve unless @arches; # no arches, nothing to do!
369371

370372
return Mojo::Promise->map({ concurrency => 1 }, sub ($archData) {
371373
my ($arch, $archNamespace) = split /=/, $archData;

0 commit comments

Comments
 (0)