Bug 1310142 - rhpkg new-sources incorrectly reports File Not Found if --path is specified
rhpkg new-sources incorrectly reports File Not Found if --path is specified
Product: Fedora
Classification: Fedora
Component: rpkg (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Dennis Gilmore
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-02-19 10:06 EST by Radomír Bosák
Modified: 2016-03-14 06:02 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-03-14 06:02:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Radomír Bosák 2016-02-19 10:06:21 EST
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:

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
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 03:29:48 EST
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.