Bug 845651

Summary: AttributeError: 'Source' object has no attribute 'filename'
Product: [Fedora] Fedora Reporter: Miroslav Suchý <msuchy>
Component: fedora-reviewAssignee: Stanislav Ochotnicky <sochotni>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: pingou, sochotni
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-04 22:24:58 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:

Description Miroslav Suchý 2012-08-03 18:10:43 UTC
Description of problem:
fedora-review will produce traceback if spec and src.rpm does not match

Version-Release number of selected component (if applicable):
fedora-review-0.2.0-1.fc17.noarch

How reproducible:
always with mine src.rpm

Steps to Reproduce:
1. download src.rpm of some old package e.g. in version foo-1.0
2. download spec of recent version of the same package, eg. version foo-2.0
1. fedora-review -n foo
  
Actual results:
Exception down the road...
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 133, in run
    self.__do_report()
  File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 79, in __do_report
    self.__run_checks(self.bug.spec_file, self.bug.srpm_file)
  File "/usr/lib/python2.7/site-packages/FedoraReview/review_helper.py", line 105, in __run_checks
    writedown=not Settings.no_report)
  File "/usr/lib/python2.7/site-packages/FedoraReview/checks_class.py", line 180, in run_checks
    if test.is_applicable():
  File "/usr/lib/python2.7/site-packages/FedoraReview/checks/ccpp.py", line 13, in is_applicable
    self.sources_have_files('*.c') or \
  File "/usr/lib/python2.7/site-packages/FedoraReview/check_base.py", line 105, in sources_have_files
    sources_files = self.sources.get_files_sources()
  File "/usr/lib/python2.7/site-packages/FedoraReview/sources.py", line 86, in get_files_sources
    self.extract_all()
  File "/usr/lib/python2.7/site-packages/FedoraReview/sources.py", line 65, in extract_all
    source.extract()
  File "/usr/lib/python2.7/site-packages/FedoraReview/source.py", line 104, in extract
    if not self.rpmdev_extract(self.filename, self.extract_dir):
AttributeError: 'Source' object has no attribute 'filename'
Exception down the road...


Expected results:
no traceback

Additional info:
This is cause if
SRC.RPM is katello-agent-1.0.6-1.fc17.src.rpm
but spec contains:
Version: 1.1.0
Release: 1%{?dist}

Comment 1 Fedora Update System 2013-01-29 17:21:14 UTC
fedora-review-0.4.0-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-1.fc17

Comment 2 Fedora Update System 2013-01-29 17:21:57 UTC
fedora-review-0.4.0-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-1.fc18

Comment 3 Fedora Update System 2013-01-29 17:22:59 UTC
fedora-review-0.4.0-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-1.el6

Comment 4 Fedora Update System 2013-01-29 20:02:23 UTC
Package fedora-review-0.4.0-1.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing fedora-review-0.4.0-1.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-0216/fedora-review-0.4.0-1.el6
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2013-02-04 21:03:15 UTC
fedora-review-0.4.0-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-2.el6

Comment 6 Fedora Update System 2013-02-04 21:03:49 UTC
fedora-review-0.4.0-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-2.fc17

Comment 7 Fedora Update System 2013-02-04 21:04:22 UTC
fedora-review-0.4.0-2.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-2.fc18

Comment 8 Fedora Update System 2013-02-08 15:40:54 UTC
fedora-review-0.4.0-3.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-3.fc18

Comment 9 Fedora Update System 2013-02-08 16:05:38 UTC
fedora-review-0.4.0-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-3.fc17

Comment 10 Fedora Update System 2013-02-21 13:24:04 UTC
fedora-review-0.4.0-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-4.fc18

Comment 11 Fedora Update System 2013-02-21 13:24:58 UTC
fedora-review-0.4.0-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-4.fc17

Comment 12 Fedora Update System 2013-02-21 13:26:30 UTC
fedora-review-0.4.0-4.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/fedora-review-0.4.0-4.el6

Comment 13 Fedora Update System 2013-03-04 22:25:00 UTC
fedora-review-0.4.0-4.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2013-03-04 22:26:53 UTC
fedora-review-0.4.0-4.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2013-03-11 19:36:14 UTC
fedora-review-0.4.0-4.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.