Bug 1439941

Summary: rpmlint fails: str object has no attribute decode
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: rpmlintAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: jsmith.fedora, j, kevin, paul, petersen, rosset.filipe, tcallawa, tmz, twoerner, ville.skytta, vkrizan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rpmlint-1.9-9.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-10 16:03:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jerry James 2017-04-06 22:48:59 UTC
Description of problem:
I built a new version of cbmc, installed it into a Rawhide x86_64 mock chroot, installed rpmlint in the mock chroot as well, and ran rpmlint:

<mock-chroot> sh-4.4# rpmlint cbmc
0 packages and 0 specfiles checked; 0 errors, 0 warnings.
Traceback (most recent call last):
  File "/usr/bin/rpmlint", line 371, in <module>
    main()
  File "/usr/bin/rpmlint", line 160, in main
    runChecks(pkg)
  File "/usr/bin/rpmlint", line 217, in runChecks
    check.check(pkg)
  File "/usr/share/rpmlint/AbstractCheck.py", line 50, in check
    return self.check_binary(pkg)
  File "/usr/share/rpmlint/DistributionCheck.py", line 40, in check_binary
    for fname in pkg.files():
  File "/usr/share/rpmlint/Pkg.py", line 611, in files
    self._gatherFilesInfo()
  File "/usr/share/rpmlint/Pkg.py", line 721, in _gatherFilesInfo
    pkgfile.magic = b2s(_magic.descriptor(fd))
  File "/usr/share/rpmlint/Pkg.py", line 48, in b2s
    return b.decode(errors='replace')
AttributeError: 'str' object has no attribute 'decode'

Version-Release number of selected component (if applicable):
rpmlint-1.9-8.fc27.noarch

How reproducible:
Always

Steps to Reproduce:
1. Build cbmc 5.7 in mock (only tried this for Rawhide x86_64)
2. Install the built cbmc and rpmlint into the mock chroot
3. Run "rpmlint cbmc" in the mock chroot

Actual results:
The error shown above.

Expected results:
Results for the cbmc package.

Additional info:

Comment 2 Fedora Update System 2017-04-07 09:27:55 UTC
rpmlint-1.9-9.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-68af0044a0

Comment 3 Ville Skyttä 2017-04-07 17:01:56 UTC
*** Bug 1440246 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2017-04-07 21:21:50 UTC
rpmlint-1.9-9.fc26 has been pushed to the Fedora 26 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-2017-68af0044a0

Comment 5 Viliam Križan 2017-04-10 10:14:30 UTC
Is it possible to push the fix to F25 too? Thank you!

Comment 6 Fedora Update System 2017-04-10 16:03:19 UTC
rpmlint-1.9-9.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Ville Skyttä 2017-04-13 09:25:05 UTC
*** Bug 1441988 has been marked as a duplicate of this bug. ***

Comment 8 Ville Skyttä 2017-04-14 05:28:23 UTC
*** Bug 1442317 has been marked as a duplicate of this bug. ***