mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
Mandate has data in state.pkg
This commit is contained in:
parent
664d1a1cac
commit
bab92775a5
@ -624,7 +624,7 @@ def clear_cache():
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
def pkg(pkg_path, test=False, **kwargs):
|
def pkg(pkg_path, pkg_sum, hash_type, test=False, **kwargs):
|
||||||
'''
|
'''
|
||||||
Execute a packaged state run, the packaged state run will exist in a
|
Execute a packaged state run, the packaged state run will exist in a
|
||||||
tarball available locally. This packaged state
|
tarball available locally. This packaged state
|
||||||
@ -639,6 +639,8 @@ def pkg(pkg_path, test=False, **kwargs):
|
|||||||
# TODO - Add ability to download from salt master or other source
|
# TODO - Add ability to download from salt master or other source
|
||||||
if not os.path.isfile(pkg_path):
|
if not os.path.isfile(pkg_path):
|
||||||
return {}
|
return {}
|
||||||
|
if not salt.utils.get_hash(pkg_path, hash_type) == pkg_sum:
|
||||||
|
return {}
|
||||||
root = tempfile.mkdtemp()
|
root = tempfile.mkdtemp()
|
||||||
s_pkg = tarfile.open(pkg_path, 'r:gz')
|
s_pkg = tarfile.open(pkg_path, 'r:gz')
|
||||||
# Verify that the tarball does not extract outside of the intended
|
# Verify that the tarball does not extract outside of the intended
|
||||||
|
Loading…
Reference in New Issue
Block a user