koji_builder: make it so Guest.pyc/pyo files are only removed when older than Guest.py.
This is needed to preserve idempotency. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
5870531f22
commit
3a12278ad9
1 changed files with 14 additions and 1 deletions
|
@ -105,7 +105,19 @@
|
|||
notify:
|
||||
- restart kojid
|
||||
|
||||
- name: Remove old python optimization caches
|
||||
- name: stat oz Guest.py file
|
||||
stat: path=/usr/lib/python2.7/site-packages/oz/Guest.py
|
||||
register: Guestpy
|
||||
|
||||
- name: stat oz Guest.pyc file
|
||||
stat: path=/usr/lib/python2.7/site-packages/oz/Guest.pyc
|
||||
register: Guestpyc
|
||||
|
||||
- name: stat oz Guest.pyo file
|
||||
stat: path=/usr/lib/python2.7/site-packages/oz/Guest.pyo
|
||||
register: Guestpyo
|
||||
|
||||
- name: Remove old python optimization caches when Guest.py is newer
|
||||
file: path=/usr/lib/python2.7/site-packages/oz/Guest.{{item}} state=absent
|
||||
with_items:
|
||||
- pyc
|
||||
|
@ -114,6 +126,7 @@
|
|||
- koji_builder
|
||||
notify:
|
||||
- restart kojid
|
||||
when: Guestpy.stat.mtime > Guestpyc.stat.mtime or Guestpyo.stat.mtime
|
||||
|
||||
- name: enable virtlogd service
|
||||
service: name=virtlogd state=started enabled=yes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue