From bc0a09f38724a675c6cfcac5ecf2b6bf6bdad3c9 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Fri, 3 Apr 2009 10:16:35 +0000 Subject: [PATCH] set BASH_BINARY and MOVE_BINARY based on what configure found svn path=/main/branches/prefix/; revision=13283 --- configure.in | 20 ++++++++++++++++---- pym/portage/const.py | 4 ++-- pym/portage/const_autotool.py | 6 +++++- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/configure.in b/configure.in index ca463bc64..7ae26bc30 100644 --- a/configure.in +++ b/configure.in @@ -33,10 +33,10 @@ AC_PROG_EGREP GENTOO_PATH_XCU_ID() GENTOO_PATH_PYTHON([2.4]) -AC_PATH_PROG(RM, [rm], no) -AC_PATH_PROG(MV, [mv], no) -AC_PATH_PROG(BASENAME, [basename], no) -AC_PATH_PROG(DIRNAME, [dirname], no) +AC_PATH_PROG(PORTAGE_RM, [rm], no) +AC_PATH_PROG(PORTAGE_MV, [mv], no) +AC_PATH_PROG(PORTAGE_BASENAME, [basename], no) +AC_PATH_PROG(PORTAGE_DIRNAME, [dirname], no) dnl avoid bash internal variable messing up things here GENTOO_PATH_GNUPROG(PORTAGE_BASH, [bash]) GENTOO_PATH_GNUPROG(PORTAGE_SED, [sed]) @@ -236,6 +236,18 @@ AC_SUBST(DOMAIN_PREFIX) AC_SUBST(PORTAGE_EPREFIX) AC_SUBST(DEFAULT_PATH) AC_SUBST(PORTAGE_BASE,['${exec_prefix}/lib/portage']) + +AC_SUBST(PORTAGE_RM) +AC_SUBST(PORTAGE_MV) +AC_SUBST(PORTAGE_BASENAME, [basename], no) +AC_SUBST(PORTAGE_DIRNAME, [dirname], no) +AC_SUBST(PORTAGE_BASH, [bash]) +AC_SUBST(PORTAGE_SED, [sed]) +AC_SUBST(PORTAGE_WGET, [wget]) +AC_SUBST(PORTAGE_FIND, [find]) +AC_SUBST(PORTAGE_XARGS, [xargs]) +AC_SUBST(PORTAGE_GREP, [grep]) + AM_CONDITIONAL(INSTALL_PYTHON_SOURCES, test x$enable_py_sources = xtrue) AC_MSG_CHECKING([for a list of variables known by configure]) diff --git a/pym/portage/const.py b/pym/portage/const.py index 40faf7f35..98e0034e2 100644 --- a/pym/portage/const.py +++ b/pym/portage/const.py @@ -57,8 +57,8 @@ EBUILD_SH_BINARY = PORTAGE_BIN_PATH+"/ebuild.sh" MISC_SH_BINARY = PORTAGE_BIN_PATH+"/misc-functions.sh" SANDBOX_BINARY = BPREFIX+"/usr/bin/sandbox" FAKEROOT_BINARY = BPREFIX+"/usr/bin/fakeroot" -BASH_BINARY = BPREFIX+"/bin/bash" -MOVE_BINARY = BPREFIX+"/bin/mv" +BASH_BINARY = PORTAGE_BASH +MOVE_BINARY = PORTAGE_MV PRELINK_BINARY = EPREFIX+"/usr/sbin/prelink" WORLD_FILE = PRIVATE_PATH + "/world" diff --git a/pym/portage/const_autotool.py b/pym/portage/const_autotool.py index 04a91bbf8..f2ec2e6e5 100644 --- a/pym/portage/const_autotool.py +++ b/pym/portage/const_autotool.py @@ -5,7 +5,8 @@ # all vars that are to wind up in portage_const must have their name listed in __all__ __all__ = ["EPREFIX", "SYSCONFDIR", "DATADIR", "PORTAGE_BASE", - "portageuser", "portagegroup", "rootuser", "rootuid", "rootgid"] + "portageuser", "portagegroup", "rootuser", "rootuid", "rootgid", + "PORTAGE_BASH", "PORTAGE_MV"] from os import path @@ -19,3 +20,6 @@ portageuser = "@portageuser@" rootuser = "@rootuser@" rootuid = @rootuid@ rootgid = @rootgid@ + +PORTAGE_BASH = "@PORTAGE_BASH" +PORTAGE_MV = "@PORTAGE_MV" -- 2.26.2