forked from infra/ansible
copr-dist-git: hotfix https://github.com/fedora-copr/copr/issues/4318
This commit is contained in:
parent
6a767b3706
commit
9a5bca7aad
2 changed files with 43 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
Hot-fix for https://github.com/fedora-copr/copr/issues/4318
|
||||
|
||||
Can be dropped once upstream deploys: https://pagure.io/rpkg/pull-request/777
|
||||
|
||||
diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
|
||||
index 46ca599..7e923d1 100644
|
||||
--- a/pyrpkg/__init__.py
|
||||
+++ b/pyrpkg/__init__.py
|
||||
@@ -2069,17 +2069,14 @@ class Commands(object):
|
||||
'.fmf/*', '*.fmf', 'changelog']
|
||||
|
||||
# Get a list of files we're currently tracking
|
||||
- ourfiles = self.repo.git.ls_files().split('\n')
|
||||
- if ourfiles == ['']:
|
||||
- # Repository doesn't contain any files
|
||||
- ourfiles = []
|
||||
- else:
|
||||
- # Trim out sources and .gitignore
|
||||
- for file in ('.gitignore', 'sources'):
|
||||
- try:
|
||||
- ourfiles.remove(file)
|
||||
- except ValueError:
|
||||
- pass
|
||||
+ ourfiles = self.repo.git.ls_files('-z').rstrip('\0')
|
||||
+ ourfiles = ourfiles.split('\0') if ourfiles else []
|
||||
+ # Trim out sources and .gitignore
|
||||
+ for file in ('.gitignore', 'sources'):
|
||||
+ try:
|
||||
+ ourfiles.remove(file)
|
||||
+ except ValueError:
|
||||
+ pass
|
||||
|
||||
# Things work better if we're in our repository directory
|
||||
oldpath = os.getcwd()
|
||||
--
|
||||
2.54.0
|
||||
|
||||
|
|
@ -32,6 +32,12 @@
|
|||
- dist-git-selinux
|
||||
- copr-dist-git
|
||||
|
||||
- name: Patch https://github.com/fedora-copr/copr/issues/4318
|
||||
patch:
|
||||
src: patches/0001-import-file-with-slash-in-name.patch
|
||||
dest: /usr/lib/python3.14/site-packages/pyrpkg/__init__.py
|
||||
tags: patches
|
||||
|
||||
- name: Switch selinux to enforcing
|
||||
selinux: policy=targeted state=enforcing
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue