Bug 666810
| Summary: | fedpkg import fails when there is just a master branch | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Hans de Goede <hdegoede> |
| Component: | fedora-packager | Assignee: | Dennis Gilmore <dennis> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 14 | CC: | dcantrell, dennis, dmalcolm |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-01-03 20:40:50 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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 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
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 *** (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 Ok, I branched it for you. |
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