copr: backend: prunerepo hotfix
This commit is contained in:
parent
ae2c780dbf
commit
bbc9b700e9
2 changed files with 25 additions and 0 deletions
20
roles/copr/backend/files/patches/prunerepo-dataloss.patch
Normal file
20
roles/copr/backend/files/patches/prunerepo-dataloss.patch
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
--- /usr/bin/prunerepo 2019-04-01 18:02:57.000000000 +0000
|
||||||
|
+++ /usr/bin/prunerepo 2019-11-12 09:20:27.292341122 +0000
|
||||||
|
@@ -40,6 +40,7 @@
|
||||||
|
'--refresh',
|
||||||
|
'--queryformat="%{location}"',
|
||||||
|
'--quiet',
|
||||||
|
+ '--setopt=skip_if_unavailable=False',
|
||||||
|
]
|
||||||
|
|
||||||
|
get_latest_packages_cmd = get_all_packages_cmd + [ '--latest-limit=1' ]
|
||||||
|
@@ -117,6 +118,9 @@
|
||||||
|
log_info('Removing obsoleted packages...')
|
||||||
|
was_deletion = False
|
||||||
|
latest_rpms = get_rpms(get_latest_packages_cmd)
|
||||||
|
+ if not latest_rpms:
|
||||||
|
+ log_info("No RPMs available")
|
||||||
|
+ return was_deletion
|
||||||
|
all_rpms = get_rpms(get_all_packages_cmd)
|
||||||
|
to_remove_rpms = set(all_rpms) - set(latest_rpms)
|
||||||
|
for rpm in to_remove_rpms:
|
|
@ -33,6 +33,11 @@
|
||||||
dest=/usr/bin/copr-backend-process-action
|
dest=/usr/bin/copr-backend-process-action
|
||||||
tags: patches
|
tags: patches
|
||||||
|
|
||||||
|
- name: patch for prunerepo, issue 1090
|
||||||
|
patch: src=patches/prunerepo-dataloss.patch
|
||||||
|
dest=/usr/bin/prunerepo
|
||||||
|
tags: patches
|
||||||
|
|
||||||
- name: install openstackclient for image preparation
|
- name: install openstackclient for image preparation
|
||||||
dnf: state=present name=python3-openstackclient
|
dnf: state=present name=python3-openstackclient
|
||||||
when: devel|bool
|
when: devel|bool
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue