Bug 1310142 - rhpkg new-sources incorrectly reports File Not Found if --path is specified
Summary: rhpkg new-sources incorrectly reports File Not Found if --path is specified
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpkg
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-19 15:06 UTC by Radomír Bosák
Modified: 2016-03-14 10:02 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-14 10:02:43 UTC
Type: Bug


Attachments (Terms of Use)

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


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