Bug 622592 - [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:
[abrt] crash in fedora-packager-0.5.1.0-1.fc13: cmd.py:249:execute:GitCommand...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: fedora-packager (Show other bugs)
13
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
abrt_hash:f96fb3b4
:
: 625514 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-09 16:47 EDT by Brian Lane
Modified: 2013-01-10 01:08 EST (History)
9 users (show)

See Also:
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 17:55:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.45 KB, text/plain)
2010-08-09 16:47 EDT, Brian Lane
no flags Details

  None (edit)
Description Brian Lane 2010-08-09 16:47:58 EDT
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 16:47:59 EDT
Created attachment 437705 [details]
File: backtrace
Comment 2 Jesse Keating 2010-08-10 15:14:02 EDT
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-19 20:50:20 EDT
*** Bug 625514 has been marked as a duplicate of this bug. ***
Comment 4 Mat Booth 2010-09-13 16:56:20 EDT
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 17:07:43 EDT
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 14:13:38 EDT
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 14:22:58 EDT
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 15:43:59 EDT
Mat, I need you to walk me through your process, from clone to the srpm attempt.
Comment 9 Mat Booth 2010-10-07 15:43:24 EDT
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 15:46:10 EDT
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 16:14:07 EDT
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 02:24:14 EDT
Aha, thanks for the information Severin.
Comment 13 eric@christensenplace.us 2010-11-20 23:04:21 EST
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 14:55:57 EST
(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@christensenplace.us 2010-11-22 17:43:20 EST
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 10:28:28 EST
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 10:44:12 EST
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 18:11:12 EST
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 15:35:58 EST
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 16:01:35 EST
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 16:27:54 EST
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 17:48:37 EST
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 12:06:32 EST
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 13:36:33 EST
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 13:57:33 EST
Minnikhanov please try the fedpkg update that is in updates-testing.  It should resolve your issue.
Comment 26 Minnikhanov 2011-02-03 14:18:59 EST
(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 17:54:59 EST
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 12:25:27 EST
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 15:17:33 EST
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 17:40:53 EST
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 17:53:50 EST
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 18:57:22 EST
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.

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