Bug 1351490

Summary: [abrt] rpmlint: Pkg.py:699:_gatherFilesInfo:TypeError: cannot use a string pattern on a bytes-like object
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: rpmlintAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: antti.jarvinen, jfilak, kevin, ppisar, rosset.filipe, tcallawa, tmz, twoerner, ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/084b86374f96a6819579c83c8dd1a355f60164ff
Whiteboard: abrt_hash:f3a4167885406c35445ffdc3ed2af699896febdb;
Fixed In Version: rpmlint-1.9-1.fc24 rpmlint-1.9-1.fc23 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-12 15:01:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Vít Ondruch 2016-06-30 07:59:44 UTC
Version-Release number of selected component:
rpmlint-1.8-7.fc25

Additional info:
reporter:       libreport-2.7.1
cmdline:        /usr/bin/python3 -ttOu /usr/bin/rpmlint ./rubygem-mail.spec /var/lib/mock/fedora-rawhide-x86_64/result/rubygem-mail-doc-2.6.4-1.fc25.noarch.rpm /var/lib/mock/fedora-rawhide-x86_64/result/rubygem-mail-2.6.4-1.fc25.noarch.rpm /var/lib/mock/fedora-rawhide-x86_64/result/rubygem-mail-2.6.4-1.fc25.src.rpm
executable:     /usr/bin/rpmlint
kernel:         4.6.0-1.fc25.x86_64
pkg_vendor:     Fedora Project
reproducible:   Not sure how to reproduce the problem
runlevel:       N 5
type:           Python3
uid:            16025

Truncated backtrace:
#1 _gatherFilesInfo in /usr/share/rpmlint/Pkg.py:699
#2 files in /usr/share/rpmlint/Pkg.py:601
#3 check_binary in /usr/share/rpmlint/DistributionCheck.py:40
#4 check in /usr/share/rpmlint/AbstractCheck.py:52
#5 runChecks in /usr/bin/rpmlint:220
#6 main in /usr/bin/rpmlint:161
#7 <module> in /usr/bin/rpmlint:385

Comment 1 Vít Ondruch 2016-06-30 07:59:51 UTC
Created attachment 1174382 [details]
File: backtrace

Comment 2 Vít Ondruch 2016-06-30 07:59:52 UTC
Created attachment 1174383 [details]
File: environ

Comment 3 Ville Skyttä 2016-06-30 08:47:41 UTC
https://github.com/rpm-software-management/rpmlint/issues/75, fixed in rpmlint 1.9.

Comment 4 Filipe Rosset 2016-07-04 01:48:33 UTC
Similar problem has been detected:

fedpkg lint  (on rawhide)


TypeError: cannot use a string pattern on a bytes-like object (none): 
E: error while reading ~/xxx.fc25.src.rpm: cannot use a string pattern on a bytes-like object

reporter:       libreport-2.7.1
cmdline:        /usr/bin/python3 -ttOu /usr/bin/rpmlint /home/filiperosset/rpmbuild/extras/highlight/highlight.spec /home/filiperosset/rpmbuild/extras/highlight/highlight-3.30-1.fc25.src.rpm /home/filiperosset/rpmbuild/extras/highlight/x86_64/highlight-debuginfo-3.30-1.fc25.x86_64.rpm /home/filiperosset/rpmbuild/extras/highlight/x86_64/highlight-gui-3.30-1.fc25.x86_64.rpm /home/filiperosset/rpmbuild/extras/highlight/x86_64/highlight-3.30-1.fc25.x86_64.rpm /home/filiperosset/rpmbuild/extras/highlight/x86_64/highlight-debuginfo-3.30-1.fc25.x86_64.rpm /home/filiperosset/rpmbuild/extras/highlight/x86_64/highlight-gui-3.30-1.fc25.x86_64.rpm /home/filiperosset/rpmbuild/extras/highlight/x86_64/highlight-3.30-1.fc25.x86_64.rpm /home/filiperosset/rpmbuild/extras/highlight/x86_64/highlight-debuginfo-3.30-1.fc25.x86_64.rpm /home/filiperosset/rpmbuild/extras/highlight/x86_64/highlight-gui-3.30-1.fc25.x86_64.rpm /home/filiperosset/rpmbuild/extras/highlight/x86_64/highlight-3.30-1.fc25.x86_64.rpm
event_log:      2016-07-03-22:46:24> ('report_uReport' concluído com sucesso)
executable:     /usr/bin/rpmlint
kernel:         4.6.0-1.fc25.x86_64
package:        rpmlint-1.8-7.fc25
pkg_vendor:     Fedora Project
reason:         Pkg.py:699:_gatherFilesInfo:TypeError: cannot use a string pattern on a bytes-like object
reproducible:   Not sure how to reproduce the problem
runlevel:       N 5
type:           Python3
uid:            1000

Comment 5 Ville Skyttä 2016-07-04 05:09:31 UTC
*** Bug 1352333 has been marked as a duplicate of this bug. ***

Comment 6 Vít Ondruch 2016-07-04 08:45:25 UTC
The workaround I am using ATM is calling rpmlint via Python2, e.g.:

```
$ python /usr/bin/rpmlint
```

Comment 7 Fedora Update System 2016-07-08 15:39:19 UTC
rpmlint-1.9-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bf4cc20a33

Comment 8 Fedora Update System 2016-07-08 15:39:35 UTC
rpmlint-1.9-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5de02c084a

Comment 9 Fedora Update System 2016-07-10 03:52:36 UTC
rpmlint-1.9-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-bf4cc20a33

Comment 10 Fedora Update System 2016-07-10 15:57:51 UTC
rpmlint-1.9-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5de02c084a

Comment 11 Fedora Update System 2016-07-12 15:01:12 UTC
rpmlint-1.9-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Jakub Filak 2016-07-13 07:19:58 UTC
Similar problem has been detected:

I ran the following command:
$ rpmlint retrace-server.spec /home/repos/fedora/retrace-server/retrace-server-1.16-2.fc25.src.rpm /home/repos/fedora/retrace-server/noarch/retrace-server-1.16-2.fc25.noarch.rpm

If I run "rpmlint /home/repos/fedora/retrace-server/retrace-server-1.16-2.fc25.src.rpm", I get the following output:
  (none): E: error while reading /home/repos/fedora/retrace-server/retrace-server-1.16-2.fc25.src.rpm: cannot use a string pattern on a bytes-like object
  0 packages and 0 specfiles checked; 0 errors, 0 warnings.

If I run "rpmlint /home/repos/fedora/retrace-server/noarch/retrace-server-1.16-2.fc25.noarch.rpm", I get the following output:
  0 packages and 0 specfiles checked; 0 errors, 0 warnings.

and the exception is raised.

reporter:       libreport-2.7.1.1.g7c21
cmdline:        /usr/bin/python3 -ttOu /usr/bin/rpmlint /home/repos/fedora/retrace-server/retrace-server-1.16-2.el6.src.rpm /home/repos/fedora/retrace-server/noarch/retrace-server-1.16-2.el6.noarch.rpm
executable:     /usr/bin/rpmlint
kernel:         4.7.0-0.rc5.git1.2.fc25.x86_64
package:        rpmlint-1.8-7.fc25
pkg_vendor:     Fedora Project
reason:         Pkg.py:699:_gatherFilesInfo:TypeError: cannot use a string pattern on a bytes-like object
reproducible:   Not sure how to reproduce the problem
runlevel:       N 5
type:           Python3
uid:            18601

Comment 13 Fedora Update System 2016-07-19 22:23:07 UTC
rpmlint-1.9-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.