Bug 1310142

Summary: rhpkg new-sources incorrectly reports File Not Found if --path is specified
Product: [Fedora] Fedora Reporter: Radomír Bosák <rbosak>
Component: rpkgAssignee: Dennis Gilmore <dennis>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 22CC: araszka, pbabinca, ttomecek
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: 2016-03-14 10:02:43 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 Radomír Bosák 2016-02-19 15:06:21 UTC
Description of problem:
When issuing `rhpkg new-sources tarball.tar.gz --path differentdir/`, rhpkg check if both `differentdir/tarball.tar.gz` and `tarball.tar.gz` exist. If either of these checks fail, rhpkg reports "No such file or directory".

So basically rhpkg expects the tarball to be on two places at the same time.

Version-Release number of selected component (if applicable):
Version     : 1.26
Release     : 1.fc22

How reproducible:
Always

Steps to Reproduce:
1. cd $HOME
2. rhpkg clone somerepo;
3. touch tarball.tar.gz
4. rhpkg --path somerepo/ new-sources tarball.tar.gz

Actual results:
Could not execute new_sources: Path does not exist or is not a file: tarball.tar.gz
-or-
Could not execute new_sources: [Errno 2] No such file or directory: 'tarball.tar.gz'

Expected results:
Successful upload

Additional info:
1st check is in `pyrpkg/cli.py`, new_sources function
2nd check is somewhere in `pyrpkg/__init__.py`, upload function

As a workaround, one may specify full path to the tarball. This produces the successful upload.

Comment 1 Ales Raszka 2016-02-23 08:29:48 UTC
Pull-request: https://pagure.io/rpkg/pull-request/33