Bug 797141

Summary: fedora-create-review fails with 'list index out of range' if you give a bare filename without a path
Product: [Fedora] Fedora Reporter: Mary Ellen Foster <mefoster>
Component: fedora-reviewAssignee: Stanislav Ochotnicky <sochotni>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: 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: 2012-02-24 11:34:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Mary Ellen Foster 2012-02-24 11:27:41 UTC
Description of problem:
If you use 'fedora-create-review' when you're in the directory containing either the spec or the srpm, and you give just a bare filename with no path, fedora-create-review will die after uploading the files with 'list index out of range'.

This seems to be because of lines 236-237, which look for a "/" character in the filenames of the spec and srpm files to get the base name.

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

How reproducible:
Every time

Steps to Reproduce:
1. (from the SRMPS directory) fedora-create-review ../SPECS/eclipse-color-theme.spec eclipse-color-theme-0.11.1-1.fc16.src.rpm
  
Actual results:
Starting scratch build
Uploading files into fedorapeople
list index out of range

Expected results:
Creating the review request

Additional info:
The above works if I use "./eclipse-color-theme-0.11.1-1.fc16.src.rpm" -- that is, if there's at least one slash in both paths.

Comment 1 Pierre-YvesChibon 2012-02-24 11:34:27 UTC
Thanks for reporting this.

It has been fixed upstream already in: http://git.fedorahosted.org/git/?p=FedoraReview.git;a=commit;h=76fc9ae4d7265cb60efebe0f1d0b60d7edf85d1e