mirror of
https://github.com/saltstack-formulas/packages-formula.git
synced 2025-04-16 09:40:23 +00:00
Merge pull request #35 from noelmcloughlin/fixes
Minor fixes to archives state
This commit is contained in:
commit
3aee2a8ed1
3 changed files with 6 additions and 9 deletions
|
@ -39,7 +39,7 @@ packages-archive-wanted-target-{{ package }}-directory:
|
|||
- require_in:
|
||||
- packages-archive-wanted-download-{{ package }}
|
||||
|
||||
{%- if 'format' in archive.dl.format and archive.dl.format in packages.archives.types %}
|
||||
{%- if 'format' in archive.dl and archive.dl.format in packages.archives.types %}
|
||||
|
||||
packages-archive-wanted-remove-prev-{{ package }}:
|
||||
file.absent:
|
||||
|
@ -52,7 +52,7 @@ packages-archive-wanted-download-{{ package }}:
|
|||
- name: curl -s -L -o {{ packages.tmpdir }}/{{ archivename }} {{ archive.dl.source }}
|
||||
- unless: test -f {{ packages.tmpdir }}/{{ archivename }}/
|
||||
- retry:
|
||||
attempts: 5
|
||||
attempts: 2
|
||||
until: True
|
||||
interval: 60
|
||||
splay: 10
|
||||
|
@ -84,18 +84,15 @@ packages-archive-wanted-install-{{ package }}:
|
|||
- options: {{ archive.options }}
|
||||
- enforce_toplevel: {{ 'False' if 'strip-components' in archive.options else 'True' }}
|
||||
{%- endif %}
|
||||
- unless: test -d {{ archive.dest }}
|
||||
- onlyif: test -d {{ archive.dest }}
|
||||
- require:
|
||||
- packages-archive-wanted-download-{{ package }}
|
||||
- module: packages-archive-wanted-{{ package }}-check-hashsum
|
||||
- require_in:
|
||||
- packages-archive-wanted-cleanup-{{ package }}
|
||||
|
||||
packages-archive-wanted-cleanup-{{ package }}:
|
||||
file.absent:
|
||||
- name: {{ packages.tmpdir }}/{{ archivename }}
|
||||
- onchanges:
|
||||
- packages-archive-wanted-install-{{ package }}
|
||||
- archive: packages-archive-wanted-install-{{ package }}
|
||||
|
||||
{%- else %}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ packages:
|
|||
archives:
|
||||
pkgs:
|
||||
required: ['curl', 'bzip2', 'gzip']
|
||||
types: ('tar','zip', 'rar',)
|
||||
types: ('tar', 'zip', 'rar',)
|
||||
wanted: {} #note: dict
|
||||
unwanted: []
|
||||
required:
|
||||
|
|
|
@ -9,7 +9,7 @@ control 'Archive packages' do
|
|||
|
||||
%w(
|
||||
docker-compose.yml
|
||||
phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||
phantomjs-2.1.1-linux-x86_64/bin
|
||||
).each do |f|
|
||||
describe file("/usr/local/src/#{f}") do
|
||||
it { should exist }
|
||||
|
|
Loading…
Add table
Reference in a new issue