Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
7c256d98
Commit
7c256d98
authored
Jan 18, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only match major release number in debian
parent
e976cb4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
CHANGES.txt
CHANGES.txt
+1
-0
slapos/grid/networkcache.py
slapos/grid/networkcache.py
+17
-3
No files found.
CHANGES.txt
View file @
7c256d98
...
...
@@ -4,6 +4,7 @@ Changes
0.33.x (unreleased)
-------------------
* networkcache: only match major release number in debian [Marco Mariani]
* slapproxy: Filter by instance_guid, allow computer partition renames
and change of software_type and requested_state [Marco Mariani]
* slapproxy: Stop instance even if buildout/reporting is wrong [Cedric de Saint Martin]
...
...
slapos/grid/networkcache.py
View file @
7c256d98
...
...
@@ -12,10 +12,11 @@
#
##############################################################################
import
shutil
import
traceback
import
ast
import
json
import
platform
import
shutil
import
traceback
try
:
try
:
...
...
@@ -47,6 +48,18 @@ def fallback_call(function):
return
wrapper
def
debianize
(
os
):
# return only the major release number in case of debian
distname
,
version
,
id_
=
os
if
distname
==
'debian'
:
version
=
version
.
split
(
'.'
)[
0
]
return
distname
,
version
,
id_
def
os_matches
(
os1
,
os2
):
return
debianize
(
os1
)
==
debianize
(
os2
)
@
fallback_call
def
download_network_cached
(
cache_url
,
dir_url
,
software_url
,
software_root
,
key
,
path
,
logger
,
signature_certificate_list
,
...
...
@@ -85,7 +98,8 @@ def download_network_cached(cache_url, dir_url, software_url, software_root,
tags
=
json
.
loads
(
json_information
)
if
tags
.
get
(
'machine'
)
!=
platform
.
machine
():
continue
if
tags
.
get
(
'os'
)
!=
str
(
platform
.
linux_distribution
()):
if
not
os_matches
(
ast
.
literal_eval
(
tags
.
get
(
'os'
)),
platform
.
linux_distribution
()):
continue
if
tags
.
get
(
'software_url'
)
!=
software_url
:
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment