Bug 643250 - [abrt] fedpkg-0.5.1.4-1.fc14: __init__.py:886:_findmasterbranch:IndexError: list index out of range
Summary: [abrt] fedpkg-0.5.1.4-1.fc14: __init__.py:886:_findmasterbranch:IndexError: l...
Keywords:
Status: CLOSED DUPLICATE of bug 619979
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-packager
Version: 14
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:261c46ee
Depends On:
Blocks: 648987
TreeView+ depends on / blocked
 
Reported: 2010-10-15 04:50 UTC by Alex Lancaster
Modified: 2013-01-10 06:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-26 07:43:09 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (798 bytes, text/plain)
2010-10-15 04:50 UTC, Alex Lancaster
no flags Details

Description Alex Lancaster 2010-10-15 04:50:23 UTC
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'

Comment 1 Alex Lancaster 2010-10-15 04:50:25 UTC
Created attachment 453633 [details]
File: backtrace

Comment 2 Jesse Keating 2010-10-15 19:19:21 UTC
hah, yeah I suppose we need better checking to make sure we're actually in a Fedora git repo.

Comment 3 Jiri Popelka 2010-11-19 11:30:13 UTC
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

Comment 4 Jiri Popelka 2010-11-19 11:33:33 UTC
(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'

Comment 5 Jesse Keating 2010-11-19 17:08:22 UTC
Jiri, I've made a remote branch for your package, python-cups for f14.  This should allow fedpkg to do its thing now.

Comment 6 Jiri Popelka 2010-11-19 18:17:53 UTC
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.

Comment 7 Jesse Keating 2010-11-23 19:25:22 UTC
Jiri, I've also branched python-smbc for you.

Comment 8 Jens Petersen 2010-11-26 07:43:09 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.