copr: builders: better tweak mock-core-configs

We first run the copr-update-builder script, so it does it's work.
Then we can try to update to our own (newer only!) version of
mock-core-configs, and re-run the copr-update-builder.

We though have to stop removing the old .rpmnew files blindly, this
needs patch against copr/copr.git.
This commit is contained in:
Pavel Raiskup 2020-04-04 08:33:31 +02:00 committed by Pierre-Yves Chibon
parent adbd919110
commit efbb4d2d3a

View file

@ -18,13 +18,6 @@
shell: dnf -y upgrade
when: prepare_base_image is defined
- name: install the latest mock and mock-core-configs from updates-testing
package: state=present name={{ packages }}
vars:
packages:
- https://kojipkgs.fedoraproject.org/packages/mock/2.2/1.fc31/noarch/mock-2.2-1.fc31.noarch.rpm
- https://kojipkgs.fedoraproject.org/packages/mock-core-configs/32.6/1.fc31/noarch/mock-core-configs-32.6-1.fc31.noarch.rpm
- name: enable copr repo in staging
command:
cmd: dnf copr -y enable {{ item }}
@ -74,9 +67,24 @@
when:
- prepare_base_image is not defined
- name: don't remove rpmnew files, but always use them
lineinfile: state=absent regexp='^find /etc/mock.*-delete'
- name: run /bin/copr-update-builder from copr-builder package
shell: /usr/bin/copr-update-builder
- name: install the latest mock and mock-core-configs from updates-testing
package: state=latest name={{ packages }}
register: mock_updated
vars:
packages:
- https://kojipkgs.fedoraproject.org/packages/mock/2.2/1.fc31/noarch/mock-2.2-1.fc31.noarch.rpm
- https://kojipkgs.fedoraproject.org/packages/mock-core-configs/32.6/1.fc31/noarch/mock-core-configs-32.6-1.fc31.noarch.rpm
- name: re-run copr-update builder when mock/mock-core-configs are updated
shell: /usr/bin/copr-update-builder
when: mock_updated.changed
- name: put copr-rpmbuild configuration file in the right place
copy: src=files/main.ini dest=/etc/copr-rpmbuild/main.ini