Merge pull request #35 from noelmcloughlin/fixes

Minor fixes to archives state
This commit is contained in:
Javier Bértoli 2018-12-05 16:05:03 -03:00 committed by GitHub
commit 3aee2a8ed1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 9 deletions

View file

@ -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 %}

View file

@ -36,7 +36,7 @@ packages:
archives:
pkgs:
required: ['curl', 'bzip2', 'gzip']
types: ('tar','zip', 'rar',)
types: ('tar', 'zip', 'rar',)
wanted: {} #note: dict
unwanted: []
required:

View file

@ -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 }