1
0
Fork 0
forked from infra/ansible
This commit is contained in:
Pavel Raiskup 2026-05-29 13:49:59 +02:00
commit 9a5bca7aad
2 changed files with 43 additions and 0 deletions

View file

@ -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

View file

@ -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