Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 622592

Summary: [abrt] crash in fedora-packager-0.5.1.0-1.fc13: cmd.py:249:execute:GitCommandError: 'git config --get branch.f13-620971.merge' returned exit status 1:
Product: [Fedora] Fedora Reporter: Brian Lane <bcl>
Component: fedora-packagerAssignee: David Cantrell <dcantrell>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: antillon.maurizio, dcantrell, dennis, eric, mat.booth, sgehwolf, steved, twaugh, vojtech.vitek
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: abrt_hash:f96fb3b4
Fixed In Version: fedora-packager-0.5.5.0-2.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-08 22:55:38 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
File: backtrace none

Description Brian Lane 2010-08-09 20:47:58 UTC
abrt 1.1.1 detected a crash.

architecture: x86_64
cmdline: /usr/bin/python /usr/bin/fedpkg mockbuild
component: fedora-packager
executable: /usr/bin/fedpkg
kernel: 2.6.33.6-147.fc13.x86_64
package: fedora-packager-0.5.1.0-1.fc13
reason: cmd.py:249:execute:GitCommandError: 'git config --get branch.f13-620971.merge' returned exit status 1: 
release: Fedora release 13 (Goddard)

backtrace
-----
cmd.py:249:execute:GitCommandError: 'git config --get branch.f13-620971.merge' returned exit status 1: 

Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 959, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 524, in mockbuild
    mymodule = pyfedpkg.PackageModule(args.path)
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 723, in __init__
    self.branch = self._findbranch()
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 669, in _findbranch
    merge = self.repo.git.config('--get', 'branch.%s.merge' % localbranch)
  File "/usr/lib/python2.6/site-packages/git/cmd.py", line 127, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/git/cmd.py", line 342, in _call_process
    return self.execute(call, **_kwargs)
  File "/usr/lib/python2.6/site-packages/git/cmd.py", line 249, in execute
    raise GitCommandError(command, status, stderr_value)
GitCommandError: 'git config --get branch.f13-620971.merge' returned exit status 1: 

Local variables in innermost frame:
status: 1
istream: None
as_process: False
stderr_value: ''
self: <git.cmd.Git object at 0x26df5a8>
with_extended_output: False
stdout_value: ''
command: ['git', 'config', '--get', 'branch.f13-620971.merge']
with_keep_cwd: False
with_exceptions: True
proc: <subprocess.Popen object at 0x26dd710>
cwd: '/home/bcl/Red_Hat/projs/fedora-git/grubby'
output_stream: None

How to reproduce
-----
Make a local branch using git checkout -b f13-620917, make changes, try running fedpkg mockbuild

Comment 1 Brian Lane 2010-08-09 20:47:59 UTC
Created attachment 437705 [details]
File: backtrace

Comment 2 Jesse Keating 2010-08-10 19:14:02 UTC
hrm.  Yeah, your branch isn't tracking anything, so it's going to be rather difficult to figure out what Fedora you want to build for...

We should trap the error though.

Not sure what to do for untracked local branches...

Comment 3 Jesse Keating 2010-08-20 00:50:20 UTC
*** Bug 625514 has been marked as a duplicate of this bug. ***

Comment 4 Mat Booth 2010-09-13 20:56:20 UTC
Package: fedpkg-0.5.1.4-1.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. did a fedpkg push
2.
3.

Comment 5 Jesse Keating 2010-09-13 21:07:43 UTC
Mat, were you working on a local branch that wasn't tracking any remote branch?  How was your repo setup, what was the state of it?

Comment 6 Mat Booth 2010-09-24 18:13:38 UTC
It just happened again :-/

I've not explicitly created a local branch, and I'm not sure how I'd tell if one was tracking a remote branch... I'm very new to git.

It's a project I've checked out with eclipse-fedorapackager, but the error occurred while I was using the fedpkg tool.

Here's what I did:


[mbooth@mc xml-commons-resolver (f14/master %)]$ fedpkg srpm
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 1086, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 614, in srpm
    mymodule = pyfedpkg.PackageModule(args.path)
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 917, in __init__
    self.branch = self._findbranch()
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 861, in _findbranch
    merge = self.repo.git.config('--get', 'branch.%s.merge' % localbranch)
  File "/usr/lib/python2.6/site-packages/git/cmd.py", line 127, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/git/cmd.py", line 342, in _call_process
    return self.execute(call, **_kwargs)
  File "/usr/lib/python2.6/site-packages/git/cmd.py", line 249, in execute
    raise GitCommandError(command, status, stderr_value)
git.errors.GitCommandError: 'git config --get branch.f14/master.merge' returned exit status 1: 


[mbooth@mc xml-commons-resolver (f14/master %)]$ fedpkg sources
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  256k  100  256k    0     0  82454      0  0:00:03  0:00:03 --:--:-- 91853


[mbooth@mc xml-commons-resolver (f14/master %)]$ fedpkg srpm
Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 1086, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 614, in srpm
    mymodule = pyfedpkg.PackageModule(args.path)
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 917, in __init__
    self.branch = self._findbranch()
  File "/usr/lib/python2.6/site-packages/pyfedpkg/__init__.py", line 861, in _findbranch
    merge = self.repo.git.config('--get', 'branch.%s.merge' % localbranch)
  File "/usr/lib/python2.6/site-packages/git/cmd.py", line 127, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/git/cmd.py", line 342, in _call_process
    return self.execute(call, **_kwargs)
  File "/usr/lib/python2.6/site-packages/git/cmd.py", line 249, in execute
    raise GitCommandError(command, status, stderr_value)
git.errors.GitCommandError: 'git config --get branch.f14/master.merge' returned exit status 1: 


[mbooth@mc xml-commons-resolver (f14/master %)]$ git status
# On branch f14/master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	.project
nothing added to commit but untracked files present (use "git add" to track)

Comment 7 Mat Booth 2010-09-24 18:22:58 UTC
Just in case it's useful information, maybe I should also mention that there are committed changes that have not yet been pushed.

Comment 8 Jesse Keating 2010-09-28 19:43:59 UTC
Mat, I need you to walk me through your process, from clone to the srpm attempt.

Comment 9 Mat Booth 2010-10-07 19:43:24 UTC
Ok, it happened again and this time I pinned it down. It breaks every time for after you use eclipse-fedorapackager to switch branches. 



I am on F13, with these packages installed:

fedora-packager-0.5.1.4-1.fc13.noarch
git-1.7.2.3-1.fc13.x86_64
eclipse-platform-3.5.2-2.fc13.x86_64

And I cherry-picked these from F14:

eclipse-egit-0.9.0-0.1.20100825git.fc14.noarch
eclipse-jgit-0.9.0-0.1.20100825git.fc14.noarch
eclipse-fedorapackager-0.1.3-1.fc14.noarch



I made this movie to illustrate the problem: http://mbooth.fedorapeople.org/622592.ogv

Comment 10 Mat Booth 2010-10-07 19:46:10 UTC
CC'ing the eclipse-fedorapackager maintainer because it occurs to me that the problem could be there instead of fedpkg...

Comment 11 Severin Gehwolf 2010-10-07 20:14:07 UTC
Mat, thanks for CC'ing me :)

I think the problem is that eclipse-fedorapackager does not use the same branch names as fedpkg (yet). At the moment we just copy the remote name (which is something like f14/master).

We are planning to fix this as soon as fedpkg has consistent branch naming itself. The problem with inconsistent branch names is described in this ticket:

https://fedorahosted.org/fedora-packager/ticket/78

You may want to CC yourself to this.

Once we have a consistent branch naming scheme in fedpkg we can implement the same naming for local branches in eclipse-fedorapackager (this should be a quite easy fix). I feels like fedpkg is going to name local branches like f14 and el4, i.e. omitting "/master" of the remote name.

There's also plans for setting remote tracking of local branches in eclipse-fedorapackager, similar to what fedpkg does.

Mat, perhaps you are interested in CC'ing yourself to these:
https://fedorahosted.org/eclipse-fedorapackager/ticket/37
https://fedorahosted.org/eclipse-fedorapackager/ticket/38

Comment 12 Mat Booth 2010-10-08 06:24:14 UTC
Aha, thanks for the information Severin.

Comment 13 eric 2010-11-21 04:04:21 UTC
Package: fedpkg-0.5.1.4-5.fc14
Architecture: i686
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. fedpkg build
2. Crash



Comment
-----
I was attempting to build F14 version of gpredict.  When I issued the command 'fedpkg build' I got the following error message before crashing:

Traceback (most recent call last):
  File "/usr/bin/fedpkg", line 1086, in <module>
    args.command(args)
  File "/usr/bin/fedpkg", line 293, in build
    mymodule = pyfedpkg.PackageModule(args.path)
  File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 917, in __init__
    self.branch = self._findbranch()
  File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 861, in _findbranch
    merge = self.repo.git.config('--get', 'branch.%s.merge' % localbranch)
  File "/usr/lib/python2.7/site-packages/git/cmd.py", line 127, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/git/cmd.py", line 342, in _call_process
    return self.execute(call, **_kwargs)
  File "/usr/lib/python2.7/site-packages/git/cmd.py", line 249, in execute
    raise GitCommandError(command, status, stderr_value)
git.errors.GitCommandError: 'git config --get branch.origin/f14/master.merge' returned exit status 1:

Comment 14 Jesse Keating 2010-11-22 19:55:57 UTC
(In reply to comment #13)
> Package: fedpkg-0.5.1.4-5.fc14
> Architecture: i686
> OS Release: Fedora release 14 (Laughlin)
> 
> 
> How to reproduce
> -----
> 1. fedpkg build
> 2. Crash
> 
> 
> 
> Comment
> -----
> I was attempting to build F14 version of gpredict.  When I issued the command
> 'fedpkg build' I got the following error message before crashing:
> 
> Traceback (most recent call last):
>   File "/usr/bin/fedpkg", line 1086, in <module>
>     args.command(args)
>   File "/usr/bin/fedpkg", line 293, in build
>     mymodule = pyfedpkg.PackageModule(args.path)
>   File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 917, in
> __init__
>     self.branch = self._findbranch()
>   File "/usr/lib/python2.7/site-packages/pyfedpkg/__init__.py", line 861, in
> _findbranch
>     merge = self.repo.git.config('--get', 'branch.%s.merge' % localbranch)
>   File "/usr/lib/python2.7/site-packages/git/cmd.py", line 127, in <lambda>
>     return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
>   File "/usr/lib/python2.7/site-packages/git/cmd.py", line 342, in
> _call_process
>     return self.execute(call, **_kwargs)
>   File "/usr/lib/python2.7/site-packages/git/cmd.py", line 249, in execute
>     raise GitCommandError(command, status, stderr_value)
> git.errors.GitCommandError: 'git config --get branch.origin/f14/master.merge'
> returned exit status 1:

Eric, how did you setup your local branch?  It sounds as if your local branch "origin/f14/master" is not tracking any upstream branch, which will confuse fedpkg.

Comment 15 eric 2010-11-22 22:43:20 UTC
I had originally done a fedpkg clone but once I started getting this error I removed everything and did a fedpkg -B clone which seems to have made everything happy again.

Comment 16 Tim Waugh 2010-12-15 15:28:28 UTC
Package: fedpkg-0.5.1.4-5.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
This happens whenever I am not at the HEAD of a branch and I run 'fedpkg prep' in order to look at the source of an older built package.
1.git checkout -b test cups-1.4.4-11.fc14
2.fedpkg prep

Comment 17 Vojtech Vitek 2011-01-12 15:44:12 UTC
Package: fedpkg-0.5.1.4-5.fc13
Architecture: x86_64
OS Release: Fedora release 13 (Goddard)


How to reproduce
-----
1. fedpkg clone <pkg>; cd <pkg>/master
2. git checkout -b master_work HEAD
3. <some local changes>
4. fedpkg local


Comment
-----
I think it's unacceptable for fedpkg tool to block _basic_ git functionality as creating multiple branches to work on.

pyfedpkg/__init__.py:854:
def _findbranch(self):
localbranch = self.repo.active_branch.name
merge = self.repo.git.config('--get', 'branch.%s.merge' % localbranch)

I understand that fedpkg has to figure out the name of current branch /for whatever reason/ - but definitely not for cost of breaking such basic thing!

There should be some workaround at least - eg. using original branch name as a prefix. There would be just simple parser of localbranch variable, so I could use `fedpkg local` on all of my f14, f14_current_work and f14_super_feature branches.

Comment 18 Jesse Keating 2011-01-30 23:11:12 UTC
I just pushed up changes that catch this error and tell people to use the new --dist argument.

Comment 19 Fedora Update System 2011-01-31 20:35:58 UTC
fedora-packager-0.5.3.0-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/fedora-packager-0.5.3.0-1.fc14

Comment 20 Fedora Update System 2011-01-31 21:01:35 UTC
fedora-packager-0.5.3.0-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/fedora-packager-0.5.3.0-1.fc13

Comment 21 Fedora Update System 2011-01-31 21:27:54 UTC
fedora-packager-0.5.3.0-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/fedora-packager-0.5.3.0-1.el6

Comment 22 Fedora Update System 2011-01-31 22:48:37 UTC
fedora-packager-0.5.3.0-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/fedora-packager-0.5.3.0-1.el5

Comment 23 Fedora Update System 2011-02-01 17:06:32 UTC
fedora-packager-0.5.3.0-1.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update fedora-packager'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/fedora-packager-0.5.3.0-1.el5

Comment 24 Minnikhanov 2011-02-03 18:36:33 UTC
Package: fedpkg-0.5.2.0-2.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. fedpkg clone rubygem-mail
2. cd rubygem-mail
3. Add files for package.
4. fedpkg clog -> Crash.


Comment
-----
SCM Request make with empty  Branches: 

New Package SCM Request
=======================
Package Name: rubygem-railties
Short Description: Rails internals: application bootup, plugins, generators,
and rake tasks.
Owners: minn
Branches: 
InitialCC:

Comment 25 Jesse Keating 2011-02-03 18:57:33 UTC
Minnikhanov please try the fedpkg update that is in updates-testing.  It should resolve your issue.

Comment 26 Minnikhanov 2011-02-03 19:18:59 UTC
(In reply to comment #25)
> Minnikhanov please try the fedpkg update that is in updates-testing.  It should
> resolve your issue.

+ done. Thanks. 
I did wait it, only on updates-repo. :-)

Comment 27 Fedora Update System 2011-02-08 22:54:59 UTC
fedora-packager-0.5.3.0-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 28 Fedora Update System 2011-02-09 17:25:27 UTC
fedora-packager-0.5.3.0-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 29 Fedora Update System 2011-02-09 20:17:33 UTC
fedora-packager-0.5.3.0-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2011-02-10 22:40:53 UTC
fedora-packager-0.5.5.0-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/fedora-packager-0.5.5.0-1.el6

Comment 31 Fedora Update System 2011-02-21 22:53:50 UTC
fedora-packager-0.5.5.0-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/fedora-packager-0.5.5.0-2.el6

Comment 32 Fedora Update System 2011-02-28 23:57:22 UTC
fedora-packager-0.5.5.0-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.