Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320647 - dev-vcs/git-1.7.1 Makefiles assume wrong python path for FreeBSD
Summary: dev-vcs/git-1.7.1 Makefiles assume wrong python path for FreeBSD
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-19 22:01 UTC by Henning Schild
Modified: 2011-01-06 20:47 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henning Schild 2010-05-19 22:01:30 UTC
Two Makefiles in git-1.7.1 assume python in /usr/local/bin/ on FreeBSD but on gentoo-fbsd it is in /usr/bin/.

Reproducible: Always

Steps to Reproduce:
1. emerge -av1 =dev-vcs/git-1.7.1


Actual Results:  
will fail with /usr/local/bin/python not found

Expected Results:  
should install ...

I patched the ebuild to fix the problem. There might be a way to get the correct path instead of hardcoding it. Or maybe it is just /usr/bin/python on every gentoo.

--- /usr/portage/dev-vcs/git/git-1.7.1.ebuild	2010-05-01 10:53:10.000000000 +0200
+++ git-1.7.1.ebuild	2010-05-12 02:05:05.000000000 +0200
@@ -192,6 +192,7 @@
 		OPTAR="$(tc-getAR)" \
 		prefix=/usr \
 		htmldir=/usr/share/doc/${PF}/html \
+		PYTHON_PATH="/usr/bin/python" \
 		"$@"
 }
Comment 1 Naohiro Aota gentoo-dev 2010-07-28 16:20:54 UTC
same problem here with dev-vcs/git-1.7.2-r1 on Gentoo/FreeBSD-8.0

also the above patch works well ("${EPREFIX}/usr/bin/python" would be better?)
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-07-29 20:31:11 UTC
1.7.2-r1 already has:
-e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \

Can you see why that isn't working for you?
Comment 3 Naohiro Aota gentoo-dev 2010-07-29 20:50:30 UTC
(In reply to comment #2)
> 1.7.2-r1 already has:
> -e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
> 
> Can you see why that isn't working for you?
> 

The sed just add "${EPREFIX}". That have nothing to do with this bug.

in git/Makefile, there is
> ifndef PYTHON_PATH
>     PYTHON_PATH = /usr/bin/python
> endif

and 

> ifeq ($(uname_S),FreeBSD)
> ...<snip>...
>     PYTHON_PATH = /usr/local/bin/python
>     HAVE_PATHS_H = YesPlease
> endif

These line override the above setting so that git think there is "/usr/local/bin/python". 

I think it would be better to patch the FreeBSD specific lines.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-12-19 00:54:55 UTC
Ah, ok, BSD is forcing it in.
Please confirm it's still needed for 1.7.3.4.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-12-19 02:51:21 UTC
Fixed in 1.7.3.4-r1
Comment 6 Fabian Groffen gentoo-dev 2011-01-06 20:08:10 UTC
This thing was added, but no dependency on python.  As a result, emerging git during bootstrap fails:

cp Git.pm blib/lib/Git.pm
Manifying blib/man3/Git.3pm
    SUBDIR git_remote_helpers
/Volumes/Scratch/gentoo/ppc64/tmp/usr/bin/bash: /Volumes/Scratch/gentoo/ppc64/usr/bin/python: No such file or directory
make[1]: *** [all] Error 127
make: *** [all] Error 2
emake failed
 * ERROR: dev-vcs/git-1.7.3.4-r1 failed:
 *   emake failed

Note the following:

[ebuild  N    ] dev-vcs/git-1.7.3.4-r1  USE="blksha1 curl perl threads webdav -bash-completion -cgi -cvs -doc -emacs -gtk -iconv (-ppcsha1) -subversion -tk -xinetd"
[ebuild  N    ] app-admin/eselect-python-20100321
[ebuild  N    ] dev-libs/libxml2-2.7.7  USE="readline -debug -doc -examples -ipv6 -python -test"
[ebuild  N    ] sys-devel/gettext-0.18.1.1-r1  USE="git (-acl) -doc -emacs -nls -nocxx -openmp"
[ebuild  N    ] virtual/libintl-0
[ebuild  N    ] dev-lang/python-2.7.1-r00.1  USE="aqua ncurses readline ssl threads (wide-unicode) xml (-berkdb) -build -doc -examples -gdbm -ipv6 -sqlite -tk -wininst"
[ebuild  N    ] sys-apps/portage-2.2.01.17555  USE="-build -doc -epydoc (-ipc) -prefix-chaining (-selinux)" LINGUAS="-pl"
*** Portage will stop merging at this point and reload itself,
    then resume the merge.
[ebuild  N    ] app-admin/python-updater-0.7-r1

hence, git cannot depend on python, or a circular unsolvable dependency occurs.

I'd prefer a python USE-flag in git, which controls exporting of PYTHON_PATH to "" (-python) or the path to python (python), because Makefile knows that it should disable python support if PYTHON_PATH=""
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-01-06 20:40:45 UTC
Please test 1.7.3.5-r1.
Comment 8 Fabian Groffen gentoo-dev 2011-01-06 20:47:42 UTC
Thanks a lot for the quick action!  I used a very similar patch to test this, which was successful, so I'm confident your fix works.