Bug 1439941 - rpmlint fails: str object has no attribute decode
Summary: rpmlint fails: str object has no attribute decode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmlint
Version: rawhide
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1440246 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-06 22:48 UTC by Jerry James
Modified: 2017-04-14 10:20 UTC (History)
11 users (show)

Fixed In Version: rpmlint-1.9-9.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-04-10 16:03:19 UTC
Type: Bug


Attachments (Terms of Use)

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. ***


Note You need to log in before you can comment on or make changes to this bug.