Bug 641544

Summary: Can't import package into Rawhide
Product: [Fedora] Fedora Reporter: Susi Lehtola <susi.lehtola>
Component: fedora-packagerAssignee: Dave Cantrell <dcantrell>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dcantrell, dennis, dtardon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-10-10 17:04:42 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:
Attachments:
Description Flags
workaround none

Description Susi Lehtola 2010-10-09 06:19:36 UTC
I checked out mpiwrappers with
 fedpkg clone -B mpiwrappers
and copied the sources (the spec and two text files) to mpiwrappers/master.

fedpkg commit resulted in

 3 files changed, 161 insertions(+), 0 deletions(-)
 create mode 100644 mpiwrappers.module
 create mode 100644 mpiwrappers.rpmmacro
 create mode 100644 mpiwrappers.spec
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 1086, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 439, in commit
    push(args)
  File "/usr/bin/fedpkg", line 593, in push
    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


after which a retry resulted in

# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)
Could not commit: Command '['git', 'commit', '-m', 'Import package.', '-a']' returned non-zero exit status 1

Then I ran git commit, which succeded. Now when I try fedpkg build it gives me the same _findmasterbranch error as in the first traceback.

Comment 1 David Tardon 2010-10-09 07:43:44 UTC
The PackageModule._findmasterbranch can only work if there is at least one f? branch in the repo, which is not true, if I'm importing new package into Rawhide only.

Comment 2 David Tardon 2010-10-09 07:46:47 UTC
Created attachment 452480 [details]
workaround

I'm attaching a temporary workaround. Apply by running

patch -p0 < hardcode-rawhide-version.patch

as root.

Comment 3 Susi Lehtola 2010-10-09 13:42:27 UTC
Thanks, it fixed the problem.

Comment 4 David Tardon 2010-10-10 17:04:42 UTC

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

Comment 5 Jesse Keating 2010-10-12 23:03:37 UTC
I've created an f14 branch of mpiwrappers (which can be ignored) to avoid future problems.