Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 668230 - fedpkg cannot import when there is only a master branch
Summary: fedpkg cannot import when there is only a master branch
Keywords:
Status: CLOSED DUPLICATE of bug 619979
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-packager
Version: 14
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-09 09:58 UTC by Christoph Wickert
Modified: 2013-01-10 06:24 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-09 21:03:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Christoph Wickert 2011-01-09 09:58:16 UTC
Description of problem:
I'm trying to import a package that has only a master branch. First of all autocompletion for the path to the srpm does not work and when I specify the path manually, fedpkg crashes.

Version-Release number of selected component (if applicable):
fedpkg-0.5.1.4-5.fc14.noarch

How reproducible:
always

Steps to Reproduce:
$ fedpkg clone thunar-vfs
Cloning into thunar-vfs...
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
$ cd thunar-vfs/
$ ls
sources
$ git branch
* master

Actual results:
$ fedpkg import /home/chris/Desktop/thunar-vfs-1.1.1-1.fc15.src.rpm 
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 1086, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 491, in import_srpm
    mymodule = pyfedpkg.PackageModule(args.path)
  File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 938, in __init__
    self.distval = self._findmasterbranch()
  File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 886, in _findmasterbranch
    return(int(fedoras[-1].strip('f')) + 1)
IndexError: list index out of range

Expected results:
bash completion should work and the package should be imported just fine.

Additional info:
(10:49:18) ricky: It looks like the fedpkg code requires that there be at least one Fedora branch, which is a bug
(10:50:01) stick [~stick.net] hat den Raum betreten.
(10:50:40) ricky: And for the master branch, it uses --define fedora fcXX where XX is the highest existing Fedora branch
(10:51:05) cwickert: I see
(10:51:26) cwickert: so I'll import it manually and file a bug
(10:51:29) ricky: I wonder what reasonable behavior would be for EPEL-only packages though.

Comment 1 Christoph Wickert 2011-01-09 10:03:07 UTC
new-sources does not work ether:

$ fedpkg new-sources thunar-vfs-1.1.1.tar.bz2 
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 1086, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 569, in new_sources
    mymodule = pyfedpkg.PackageModule(args.path)
  File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 938, in __init__
    self.distval = self._findmasterbranch()
  File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 886, in _findmasterbranch
    return(int(fedoras[-1].strip('f')) + 1)
IndexError: list index out of range

Comment 2 Dennis Gilmore 2011-01-09 21:03:46 UTC

*** This bug has been marked as a duplicate of bug 619979 ***


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