Skip to content

Commit

Permalink
Standardize pkgrepo usage
Browse files Browse the repository at this point in the history
This changes our workaround to be more verbose with no-op states but
more robust in the case of pkrepo failures: the directory will not be
cleaned until after all of the pkgrepo states complete succesfully.

This also cleans up the MS TTF core fonts, and should help with servo#186.
  • Loading branch information
aneeshusa committed Mar 12, 2016
1 parent 8132895 commit 0794ea5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
6 changes: 5 additions & 1 deletion longview/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ longview:
- name: 'deb http://apt-longview.linode.com/ trusty main'
- file: /etc/apt/sources.list.d/longview.list
- key_url: https://apt-longview.linode.com/linode.gpg

/etc/apt/sources.list.d/longview.list:
file.exists:
- require:
- pkgrepo: longview
- require_in:
- file: /etc/apt/sources.list.d

21 changes: 13 additions & 8 deletions servo-dependencies.sls
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,26 @@ homebrew-link-openssl:
- require:
- pkg: servo-dependencies
{% else %}
FIX enable multiverse:
pkgrepo.absent:
- name: deb http://archive.ubuntu.com/ubuntu trusty multiverse
enable multiverse:
multiverse:
pkgrepo.managed:
- name: deb http://archive.ubuntu.com/ubuntu trusty multiverse
- name: 'deb http://archive.ubuntu.com/ubuntu trusty multiverse'
- file: /etc/apt/sources.list.d/multiverse.list
- require_in:
- pkg: ttf-mscorefonts-installer
/etc/apt/sources.list.d/multiverse.list:
file.exists:
- require:
- pkgrepo: multiverse
- require_in:
- file: /etc/apt/sources.list.d
ttf-mscorefonts-installer:
debconf.set:
- name: ttf-mscorefonts-installer
- data: { 'msttcorefonts/accepted-mscorefonts-eula': { 'type': 'boolean', 'value': True } }
pkg.installed:
- pkgs:
- ttf-mscorefonts-installer
- requires:
- require:
- debconf: ttf-mscorefonts-installer
{% endif %}
10 changes: 6 additions & 4 deletions ubuntu/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
- mode: 755
- source: salt://{{ tpldir }}/files/policy-rc.d

# Workaround for https://github.com/saltstack/salt/issues/26605
# Clean the directory first, and require it in all pkgrepo states
# which add repositories to the sources.list.d folder (instead of
# the main /etc/apt/sources.list file)
# Workaround for https://github.com/saltstack/salt/issues/26605:
# For each pkgrepo state which adds any repositories to the sources.list.d
# folder (instead of the main /etc/apt/sources.list file), create an extra,
# no-op file.exists state which requires the pkgrepo state and require_ins
# this state
/etc/apt/sources.list.d:
file.directory:
- user: root
- group: root
- file_mode: 644
- dir_mode: 755
- recurse:
- user
Expand Down

0 comments on commit 0794ea5

Please sign in to comment.