7
0
forked from pool/rpmdevtools
Files
rpmdevtools/rmdevelrpms_fix_filename_search.patch
Martin Pluskal 237978c956 Accepting request 797224 from home:benoit_monin:branches:devel:tools
- Switch to python 3:
  * Require python3-rpm instead of python2-rpm
  * Add python3-shebang.patch to run python scripts with python3
  * Add rmdevelrpms_fix_filename_search.patch to add compatibility
    with both newer and older rpm binding
  * Backport upstream commits 2ddae80, 693c954 and ea772da

OBS-URL: https://build.opensuse.org/request/show/797224
OBS-URL: https://build.opensuse.org/package/show/devel:tools/rpmdevtools?expand=0&rev=26
2020-04-24 17:41:48 +00:00

18 lines
773 B
Diff

Index: rpmdevtools-8.10/rpmdev-rmdevelrpms.py
===================================================================
--- rpmdevtools-8.10.orig/rpmdev-rmdevelrpms.py
+++ rpmdevtools-8.10/rpmdev-rmdevelrpms.py
@@ -111,7 +111,11 @@ def isDevelPkg(hdr):
if not (stat.S_ISLNK(fmodes[i]) or stat.S_ISREG(fmodes[i])):
# Not a file or a symlink: ignore.
pass
- fn = fnames[i]
+ # newer rpm binding returns filenames as string, so convert to bytes
+ try:
+ fn = fnames[i].encode()
+ except AttributeError:
+ fn = fnames[i]
if so_re.search(fn):
# *.so or a *.so.*: cannot be sure, treat pkg as non-devel.
so_found = 1