Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 331031 - dev-vcs/git-1.7.2-r1 git pull is broken
Summary: dev-vcs/git-1.7.2-r1 git pull is broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-03 12:57 UTC by Pascal Bourguignon
Modified: 2010-08-09 20:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
strace -ff of failling git pull. (strace.tar.bz2,15.26 KB, application/octet-stream)
2010-08-03 19:43 UTC, Pascal Bourguignon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Bourguignon 2010-08-03 12:57:43 UTC
With git-1.7.2-r1:

[pjb@kuiper :0.0 iolib]$ git pull
/usr/libexec/git-core/git-pull: line 11: git-sh-setup: No such file or directory
/usr/libexec/git-core/git-pull: line 12: set_reflog_action: command not found
/usr/libexec/git-core/git-pull: line 13: require_work_tree: command not found
/usr/libexec/git-core/git-pull: line 14: cd_to_toplevel: command not found
sed: can't read /FETCH_HEAD: No such file or directory
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.

Reproducible: Always

Steps to Reproduce:
1. emerge git-1.7.2-r1
2. type: git pull   in a git sandbox.
3.

Actual Results:  

[pjb@kuiper :0.0 iolib]$ git pull
/usr/libexec/git-core/git-pull: line 11: git-sh-setup: No such file or directory
/usr/libexec/git-core/git-pull: line 12: set_reflog_action: command not found
/usr/libexec/git-core/git-pull: line 13: require_work_tree: command not found
/usr/libexec/git-core/git-pull: line 14: cd_to_toplevel: command not found
sed: can't read /FETCH_HEAD: No such file or directory
Your configuration specifies to merge with the ref 'master'
from the remote, but no such ref was fetched.

Expected Results:  
[pjb@kuiper :0.0 iolib]$ git pull
Already up-to-date.

git-1.7.2 worked correctly.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-03 18:36:29 UTC
works fine for me.

need more info to reproduce. Maybe strace it?

# git --version
git version 1.7.2
# git pull
remote: Counting objects: 16, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 10 (delta 6), reused 0 (delta 0)
Unpacking objects: 100% (10/10), done.
From git+ssh://git.overlays.gentoo.org/proj/mysql-extras
   3ae5d30..0c483f9  master     -> origin/master
Updating 3ae5d30..0c483f9
Fast-forward
 00000_index.txt                                |    8 +-
 02040_all_embedded-library-shared-5.1.43.patch |   11 +-
 07110_all_mysql_gcc-4.2_5.1.49.patch           | 3428 ++++++++++++++++++++++++
 3 files changed, 3441 insertions(+), 6 deletions(-)
 create mode 100644 07110_all_mysql_gcc-4.2_5.1.49.patch
#
Comment 2 Pascal Bourguignon 2010-08-03 19:43:23 UTC
Created attachment 241311 [details]
strace -ff of failling git pull.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-04 00:27:12 UTC
1. What is the last version of git that worked?
2. Are you going something weird with your PATH?
Comment 4 Pascal Bourguignon 2010-08-04 10:43:43 UTC
(In reply to comment #3)
> 1. What is the last version of git that worked?

1.7.2

> 2. Are you going something weird with your PATH?
 
Nothing special:

[pjb@kuiper :0.0 iolib]$ which git
/usr/bin/git
[pjb@kuiper :0.0 iolib]$ echo $PATH
/usr/local/sbin:/usr/X11R6/bin:/usr/sbin:/sbin:/home/pjb/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
[pjb@kuiper :0.0 iolib]$ fpm list-packages installed git
 * Searching for git ...
[IP-] [  ] dev-vcs/git-1.7.2:0
[IP-] [  ] dev-vcs/git-sh-1.0-r1:0
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-04 16:53:44 UTC
and going back to git-1.7.2 makes the bug go away 100%?
If so, this means that the prefix changes broke git...
Comment 6 Pascal Bourguignon 2010-08-04 19:15:34 UTC
(In reply to comment #5)
> and going back to git-1.7.2 makes the bug go away 100%?
> If so, this means that the prefix changes broke git...

Indeed.  When I mask git-1.7.2-r1 and emerge git (reverting to 1.7.2), everything reverts to normal.


Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-04 19:36:10 UTC
prefix:
something in your -r1 update to git broke it for this user.
If he reverts to 1.7.2 without the update, it works fine.
please fix asap.
Comment 8 Fabian Groffen gentoo-dev 2010-08-04 19:43:02 UTC
please give me the output of

% head -n1 /usr/libexec/git-core/git-pull
Comment 9 Fabian Groffen gentoo-dev 2010-08-04 19:53:19 UTC
my previous comment referred to 1.7.2 (the version that works for you), since your straces tell me what's in the file with 1.7.2-r1
Comment 10 Fabian Groffen gentoo-dev 2010-08-04 19:56:13 UTC
And just to be sure, /usr/libexec/git-core/git-sh-setup exists, doesn't it?  Does it also have a proper shebang, and permissions, etc?
Comment 11 Pascal Bourguignon 2010-08-05 12:41:11 UTC
(In reply to comment #10)
> And just to be sure, /usr/libexec/git-core/git-sh-setup exists, doesn't it? 
> Does it also have a proper shebang, and permissions, etc?

[pjb@kuiper :0.0 ~]$ ls -li /bin/sh /bin/bash
2949900 -rwxr-xr-x 1 root root 893208 Jun 27 08:50 /bin/bash*
2318340 lrwxrwxrwx 1 root root      4 Jun 27 08:50 /bin/sh -> bash*

[pjb@kuiper :0.0 ~]$ sudo emerge git > /tmp/e.log 2>&1 ; echo $?
Password: 
0
[pjb@kuiper :0.0 ~]$ fpm list-packages installed git
 * Searching for git ...
[IP-] [  ] dev-vcs/git-1.7.2-r1:0
[IP-] [  ] dev-vcs/git-sh-1.0-r1:0
[pjb@kuiper :0.0 ~]$ head -n1 /usr/libexec/git-core/git-pull
#!/bin/bash
[pjb@kuiper :0.0 ~]$ head -n1 /usr/libexec/git-core/git-sh-setup 
#!/bin/bash


[pjb@kuiper :0.0 ~]$ sudo emerge git > /tmp/e.log 2>&1 ; echo $?
0
[pjb@kuiper :0.0 ~]$ fpm list-packages installed git
 * Searching for git ...
[IP-] [  ] dev-vcs/git-1.7.2:0
[IP-] [  ] dev-vcs/git-sh-1.0-r1:0
[pjb@kuiper :0.0 ~]$ head -n1 /usr/libexec/git-core/git-sh-setup 
#!/bin/sh
[pjb@kuiper :0.0 ~]$ head -n1 /usr/libexec/git-core/git-pull
#!/bin/sh
[pjb@kuiper :0.0 ~]$ 

Comment 12 Fabian Groffen gentoo-dev 2010-08-05 12:45:54 UTC
right, does it magically fix things if you change the git-pull to have /bin/sh as interpreter instead of bash?
Comment 13 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-08-06 19:13:51 UTC
IF it does fix the problem, there is no issue with changing the SHELL_PATH to "${EPREFIX}/bin/sh" - awaiting feedback so that we have a definitive cause of failure.
Comment 14 Pascal Bourguignon 2010-08-09 19:26:18 UTC
(In reply to comment #12)
> right, does it magically fix things if you change the git-pull to have /bin/sh
> as interpreter instead of bash?

Indeed, just  s/bash/sh/  in /usr/libexec/git-core/git-pull  is enough to solve the problem.  (Of course, the other scripts may prefer to use sh too, I didn't try them).
Comment 15 Fabian Groffen gentoo-dev 2010-08-09 19:36:49 UTC
Ok, then I agree with darkside's suggestion in comment #13.

robbat2 do you want it committed in-place, or as a new revision?
Comment 16 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-08-09 19:56:11 UTC
New rev please.
Comment 17 Fabian Groffen gentoo-dev 2010-08-09 20:03:44 UTC
committed