abrt version: 1.1.13 architecture: x86_64 cmdline: /usr/bin/python /usr/bin/fedpkg prep comment: The fedpkg commands should fail gracefully with an error message rather than crash. component: fedora-packager executable: /usr/bin/fedpkg kernel: 2.6.35.6-39.fc14.x86_64 package: fedpkg-0.5.1.4-1.fc14 reason: __init__.py:886:_findmasterbranch:IndexError: list index out of range release: Fedora release 14 (Laughlin) How to reproduce: Try to run "fedpkg prep" in a directory that is not a git Fedora repo checkout. time: 1287118019 uid: 501 backtrace ----- __init__.py:886:_findmasterbranch:IndexError: list index out of range Traceback (most recent call last): File "/usr/bin/fedpkg", line 1086, in <module> args.command(args) File "/usr/bin/fedpkg", line 585, in prep 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 Local variables in innermost frame: self: <pyfedpkg.PackageModule instance at 0xfcdf38> branchre: <_sre.SRE_Pattern object at 0xf7d0e0> ref: <git.RemoteReference "refs/remotes/origin/master"> fedoras: [] branch: 'master'
Created attachment 453633 [details] File: backtrace
hah, yeah I suppose we need better checking to make sure we're actually in a Fedora git repo.
Package: fedpkg-0.5.1.4-5.fc14 Architecture: x86_64 OS Release: Fedora release 14 (Laughlin) How to reproduce ----- Tried to import new SRPM package (http://jpopelka.fedorapeople.org/python-cups-1.9.52-2.src.rpm) 1. fedpkg clone python-cups Cloning into python-cups... 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. 2. cd python-cups 3. fedpkg import ~/rpmbuild/SRPMS/python-cups-1.9.52-2.src.rpm Comment ----- After the crash 'git status' shows # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # new file: python-cups.spec # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # pycups-1.9.52.tar.bz2
(In reply to comment #2) > hah, yeah I suppose we need better checking to make sure we're actually in a > Fedora git repo. I *was* in the repo. When I was not in the repo I got 'Could not import srpm: /home/jpopelka is not a valid repo'
Jiri, I've made a remote branch for your package, python-cups for f14. This should allow fedpkg to do its thing now.
Yes, it's ok now, thanks Jesse. I have one more package to import. Let me know when it's fixed in fedpkg so I can help you test it.
Jiri, I've also branched python-smbc for you.
*** This bug has been marked as a duplicate of bug 619979 ***