Bug 666810 - fedpkg import fails when there is just a master branch
Summary: fedpkg import fails when there is just 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
low
medium
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-03 09:27 UTC by Hans de Goede
Modified: 2013-01-10 06:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-03 20:40:50 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Hans de Goede 2011-01-03 09:27:24 UTC
Hi,

I hit this while trying to import a compat package, which due to
its nature only has a master branch as it is only needed in Fedora-15 and later.

I got a traceback (which I neglected to safe) pointing to the _findmasterbranch method of PackageModule. The problem is that without any branches the fedoras array in this method stays empty, and the indexing of it with -1 at the end of the method causes the traceback.

I've worked around this for now by adding:

        if not fedoras:
            return 15

Which of course is not a proper fix.

Regards,

Hans

Comment 1 Dave Malcolm 2011-01-03 20:05:01 UTC
Here's the traceback (on an F-13 box); in the following, pypy only has a "master" branch; there are no f-N branches:

$ fedpkg new-sources ~/rpmbuild/SOURCES/pypy-1.4.1-src.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.6/site-packages/pyfedpkg/__init__.py", line 938, in __init__
    self.distval = self._findmasterbranch()
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 886, in _findmasterbranch
    return(int(fedoras[-1].strip('f')) + 1)
IndexError: list index out of range

This is with fedpkg-0.5.1.4-5.fc13.noarch

Comment 2 Dave Malcolm 2011-01-03 20:06:40 UTC
Actually, the above is on "fedpkg new-sources", but the same problem can be seen with "import" (though this was with a slightly earlier version of fedpkg):

$ fedpkg import /home/david/rpmbuild/SRPMS/pypy-1.4.1-3.fc13.src.rpm
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 1062, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 483, in import_srpm
    mymodule = pyfedpkg.PackageModule(args.path)
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 857, in __init__
    self.distval = self._findmasterbranch()
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 807, in _findmasterbranch
    return(int(fedoras[-1].strip('f')) + 1)
IndexError: list index out of range

Comment 3 Jesse Keating 2011-01-03 20:40:50 UTC
marking it as a duplicate.  Hans, if you could give me the name of the package, I can create a branch on the remote side.  That's the current work around.  And Dave, I'll do the same for pypy.

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

Comment 4 Hans de Goede 2011-01-04 08:06:50 UTC
(In reply to comment #3)
> marking it as a duplicate.  Hans, if you could give me the name of the package,
> I can create a branch on the remote side.  That's the current work around.  And
> Dave, I'll do the same for pypy.
> 

Hi,

The package in question is cegui06.

Regards,

Hans

Comment 5 Jesse Keating 2011-01-04 18:52:27 UTC
Ok, I branched it for you.


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