Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
e256f74f
Unverified
Commit
e256f74f
authored
10 months ago
by
Max Gautier
Browse files
Options
Downloads
Patches
Plain Diff
download_hash: propagate new patch versions to all archs
parent
2710e984
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/download_hash.py
+12
-0
12 additions, 0 deletions
scripts/download_hash.py
with
12 additions
and
0 deletions
scripts/download_hash.py
+
12
−
0
View file @
e256f74f
...
@@ -52,6 +52,18 @@ def download_hash(only_downloads: [str]) -> None:
...
@@ -52,6 +52,18 @@ def download_hash(only_downloads: [str]) -> None:
for
download
,
url
in
(
downloads
if
only_downloads
==
[]
for
download
,
url
in
(
downloads
if
only_downloads
==
[]
else
{
k
:
downloads
[
k
]
for
k
in
downloads
.
keys
()
&
only_downloads
}).
items
():
else
{
k
:
downloads
[
k
]
for
k
in
downloads
.
keys
()
&
only_downloads
}).
items
():
checksum_name
=
f
"
{
download
}
_checksums
"
checksum_name
=
f
"
{
download
}
_checksums
"
# Propagate new patch versions to all architectures
for
arch
in
data
[
checksum_name
].
values
():
for
arch2
in
data
[
checksum_name
].
values
():
arch
.
update
({
v
:(
"
NONE
"
if
arch2
[
v
]
==
"
NONE
"
else
0
)
for
v
in
(
set
(
arch2
.
keys
())
-
set
(
arch
.
keys
()))
if
v
.
split
(
'
.
'
)[
2
]
==
'
0
'
})
# this is necessary to make the script indempotent,
# by only adding a vX.X.0 version (=minor release) in each arch
# and letting the rest of the script populate the potential
# patch versions
for
arch
,
versions
in
data
[
checksum_name
].
items
():
for
arch
,
versions
in
data
[
checksum_name
].
items
():
for
minor
,
patches
in
groupby
(
versions
.
copy
().
keys
(),
lambda
v
:
'
.
'
.
join
(
v
.
split
(
'
.
'
)[:
-
1
])):
for
minor
,
patches
in
groupby
(
versions
.
copy
().
keys
(),
lambda
v
:
'
.
'
.
join
(
v
.
split
(
'
.
'
)[:
-
1
])):
for
version
in
(
f
"
{
minor
}
.
{
patch
}
"
for
patch
in
for
version
in
(
f
"
{
minor
}
.
{
patch
}
"
for
patch
in
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment