public inbox for gentoo-osx@lists.gentoo.org
 help / color / mirror / Atom feed
From: Michael Haubenwallner <michael.haubenwallner@salomon.at>
To: "gentoo-osx@lists.gentoo.org" <gentoo-osx@lists.gentoo.org>
Subject: [gentoo-osx] some portage-prefix patches
Date: Tue, 25 Jul 2006 15:04:47 +0200	[thread overview]
Message-ID: <1153832687.11311.84.camel@sapc154> (raw)

[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]

Hi,

after some time using portage-prefix-2.1.14 with some patches now, its
time for me to post these (partially) very useful patches...

Hopefully they will make it at least to the list at once...


[00-check-offset-prefix.patch] (minor)
Just a simple configure-commandline check for valid domain-prefix.

[01-defaultpath.patch] (minor)
Also add "${prefix}/lib/portage/bin" to DEFAULT_PATH, to simplify the
bootstrap process.

[02-ebuildenv-ROOT.patch] (minor)
Moved trailing 'os.sep' from EDEST to ROOT.

[03-eprefix-function.patch] (normal)
Well, eprefix() was not yet present in 2.1.14, but may be already
somewhere in svn (if it exists somewhere).
To get this yet trivial implementation work, [10-portageq-root.patch] is
required.

[04-interactive-ebuild.patch] (enhancement)
The most interesting one: Add interactive-feature to portage, usage:
FEATURES=interactive emerge package
FEATURES=interactive ebuild package.ebuild [unpack|compile|install|...]

[05-checked-binaries.patch] (normal)
Use the binaries figured out by configure for sandbox/bash/mv/prelink.

[06-env-conf+ext.patch] (enhancement)
[07-env-dup.patch] (enhancement)
This two patches are real enhancements, required for my
baselayout-prefix package, which i will eventually post separately
(package & patches).

[08-cnf-typo.patch] (minor)
Just a typo in cnf/Makefile.in, which prevents installation of
PREFIX/etc/make.conf.example

[09-wget-bootstrap.patch] (minor)
Use the wget found by configure, not PREFIX/usr/bin/wget per default in
make.globals. This makes bootstrap easier.

[10-portageq-root.patch] (normal)
Do not pass ROOT to 'portageq', or portageq will try to create
${ROOT}${EPREFIX}/var/tmp, which incorrectly results to
${EDEST}/${EPREFIX}${EPREFIX}/var/tmp
Figured out this with an improved sandbox.

[11-rpath-autofix.patch] (normal)
Do the "Auto fixing rpath" thing for to-be-merged files, not for already
merged ones.

[12-readonly-tree.patch] (normal)
Fix situations where the ebuild cannot be copied twice if tree is
readonly. Maybe the second ebuild-cp could be removed.

best regards, haubi
-- 
Michael Haubenwallner                    SALOMON Automation GmbH
Forschung & Entwicklung                  A-8114 Friesach bei Graz
mailto:michael.haubenwallner@salomon.at  http://www.salomon.at
No HTML/MIME please, see http://expita.com/nomime.html

[-- Attachment #2: 00-check-offset-prefix.patch --]
[-- Type: text/x-patch, Size: 1875 bytes --]

diff -ruN portage-prefix-2.1.14.orig/configure.in portage-prefix-2.1.14/configure.in
--- portage-prefix-2.1.14.orig/configure.in	2006-07-13 11:08:56.000000000 +0200
+++ portage-prefix-2.1.14/configure.in	2006-07-13 11:09:50.000000000 +0200
@@ -9,10 +9,22 @@
 dnl AC_ARG_VAR(portagegroup, the group that portage will operate under [defaults to 'portage'])
 
 case "${prefix}" in
-	'') 	AC_MSG_ERROR([bad value ${prefix} for --prefix, must not be empty]) ;;
-	*/)		AC_MSG_ERROR([bad value ${prefix} for --prefix, must not end with '/']) ;;
+	'') 	AC_MSG_ERROR([bad value '${prefix}' for --prefix, must not be empty]) ;;
+	*/)		AC_MSG_ERROR([bad value '${prefix}' for --prefix, must not end with '/']) ;;
 	/*|NONE) ;;
-	*) 		AC_MSG_ERROR([bad value ${prefix} for --prefix, must start with /]) ;;
+	*) 		AC_MSG_ERROR([bad value '${prefix}' for --prefix, must start with /]) ;;
+esac
+
+AC_ARG_WITH(offset-prefix, 
+AC_HELP_STRING([--with-offset-prefix], [specify the installation prefix for all packages , defaults to '']),
+[DOMAIN_PREFIX=$withval],
+[DOMAIN_PREFIX=''])
+
+case "${DOMAIN_PREFIX}" in
+	'') ;;
+	*/)		AC_MSG_ERROR([bad value '${DOMAIN_PREFIX}' for --with-offset-prefix, must not end with /]) ;;
+	/*) ;;
+	*)		AC_MSG_ERROR([bad value '${DOMAIN_PREFIX}' for --with-offset-prefix, must start with /]) ;;
 esac
 
 AC_CANONICAL_BUILD
@@ -195,11 +207,6 @@
 	AC_MSG_ERROR([error finding the user id of ${rootuser}])
 fi
 
-AC_ARG_WITH(offset-prefix, 
-AC_HELP_STRING([--with-offset-prefix], [specify the installation prefix for all packages , defaults to /]),
-[DOMAIN_PREFIX=$withval],
-[DOMAIN_PREFIX='/'])
-
 DEFAULT_PATH="${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
 AC_ARG_WITH(default-path, 
 AC_HELP_STRING([--with-default-path], [specify the PATH available to the portage build environment ]),

[-- Attachment #3: 01-defaultpath.patch --]
[-- Type: text/x-patch, Size: 1451 bytes --]

diff -ruN portage-prefix-2.1.14.orig/configure portage-prefix-2.1.14/configure
--- portage-prefix-2.1.14.orig/configure	2006-07-13 11:08:56.000000000 +0200
+++ portage-prefix-2.1.14/configure	2006-07-13 11:09:50.000000000 +0200
@@ -7010,7 +7010,7 @@
   DOMAIN_PREFIX='/'
 fi;
 
-DEFAULT_PATH="${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
+DEFAULT_PATH="${prefix}/lib/portage/bin:${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
 
 # Check whether --with-default-path or --without-default-path was given.
 if test "${with_default_path+set}" = set; then
diff -ruN portage-prefix-2.1.14.orig/configure.in portage-prefix-2.1.14/configure.in
--- portage-prefix-2.1.14.orig/configure.in	2006-07-13 11:09:50.000000000 +0200
+++ portage-prefix-2.1.14/configure.in	2006-07-13 11:09:50.000000000 +0200
@@ -207,7 +207,7 @@
 	AC_MSG_ERROR([error finding the user id of ${rootuser}])
 fi
 
-DEFAULT_PATH="${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
+DEFAULT_PATH="${prefix}/lib/portage/bin:${DOMAIN_PREFIX}/usr/bin:${DOMAIN_PREFIX}/usr/sbin:${DOMAIN_PREFIX}/bin:${DOMAIN_PREFIX}/sbin:${prefix}/bin"
 AC_ARG_WITH(default-path, 
 AC_HELP_STRING([--with-default-path], [specify the PATH available to the portage build environment ]),
 [DEFAULT_PATH="${DEFAULT_PATH}":$withval],

[-- Attachment #4: 02-ebuildenv-ROOT.patch --]
[-- Type: text/x-patch, Size: 1129 bytes --]

diff -ruN portage-prefix-2.1.14.orig/pym/portage.py portage-prefix-2.1.14/pym/portage.py
--- portage-prefix-2.1.14.orig/pym/portage.py	2006-07-13 11:08:57.000000000 +0200
+++ portage-prefix-2.1.14/pym/portage.py	2006-07-13 11:09:51.000000000 +0200
@@ -2364,7 +2364,7 @@
 		# due to how it's coded... Don't overwrite this so we can use it.
 		mysettings["PORTAGE_DEBUG"]=str(debug)
 
-	mysettings["ROOT"]     = normalize_path(myroot+portage_const.EPREFIX)
+	mysettings["ROOT"]     = normalize_path(myroot+portage_const.EPREFIX)+os.sep
 	mysettings["STARTDIR"] = getcwd()
 
 	mysettings["EBUILD"]   = ebuild_path
@@ -2427,7 +2427,7 @@
 		mysettings["PORTAGE_BUILDDIR"] = os.path.join(mysettings["BUILD_PREFIX"], mysettings["PF"])
 
 	mysettings["WORKDIR"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "work")
-	mysettings["EDEST"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep
+	mysettings["EDEST"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image")
 	mysettings["D"] = os.path.normpath(mysettings["EDEST"]+portage_const.EPREFIX)
 	mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp")
 

[-- Attachment #5: 03-eprefix-function.patch --]
[-- Type: text/x-patch, Size: 614 bytes --]

diff -ruN portage-prefix-2.1.14.orig/bin/ebuild.sh portage-prefix-2.1.14/bin/ebuild.sh
--- portage-prefix-2.1.14.orig/bin/ebuild.sh	2006-07-13 11:08:55.000000000 +0200
+++ portage-prefix-2.1.14/bin/ebuild.sh	2006-07-13 11:09:51.000000000 +0200
@@ -153,6 +153,16 @@
 	fi
 }
 
+eprefix() {
+	[ $# -eq 1 ] || die "eprefix: needs exactly one argument"
+	if has_version "$1"; then
+		echo "${EPREFIX}"
+	else
+		eerror "eprefix: $1 not installed"
+	fi
+	return 0
+}
+
 has_version() {
 	if [ "${EBUILD_PHASE}" == "depend" ]; then
 		die "portageq calls (has_version calls portageq) are not allowed in the global scope"

[-- Attachment #6: 04-interactive-ebuild.patch --]
[-- Type: text/x-patch, Size: 6723 bytes --]

diff -ruN portage-prefix-2.1.14.orig/bin/ebuild.sh portage-prefix-2.1.14/bin/ebuild.sh
--- portage-prefix-2.1.14.orig/bin/ebuild.sh	2006-07-13 11:09:51.000000000 +0200
+++ portage-prefix-2.1.14/bin/ebuild.sh	2006-07-13 11:09:51.000000000 +0200
@@ -815,14 +815,14 @@
 }
 
 dyn_setup() {
-	[ "$(type -t pre_pkg_setup)" == "function" ] && pre_pkg_setup
-	pkg_setup
-	[ "$(type -t post_pkg_setup)" == "function" ] && post_pkg_setup
+	[ "$(type -t pre_pkg_setup)" == "function" ] && call-interactive pre_pkg_setup
+	call-interactive pkg_setup
+	[ "$(type -t post_pkg_setup)" == "function" ] && call-interactive post_pkg_setup
 }
 
 dyn_unpack() {
 	trap "abort_unpack" SIGINT SIGQUIT
-	[ "$(type -t pre_src_unpack)" == "function" ] && pre_src_unpack
+	[ "$(type -t pre_src_unpack)" == "function" ] && call-interactive pre_src_unpack
 	local newstuff="no"
 	if [ -e "${WORKDIR}" ]; then
 		local x
@@ -849,7 +849,7 @@
 	if [ -e "${WORKDIR}" ]; then
 		if [ "$newstuff" == "no" ]; then
 			echo ">>> WORKDIR is up-to-date, keeping..."
-			[ "$(type -t post_src_unpack)" == "function" ] && post_src_unpack
+			[ "$(type -t post_src_unpack)" == "function" ] && call-interactive post_src_unpack
 			return 0
 		fi
 	fi
@@ -859,12 +859,12 @@
 	fi
 	cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`"
 	echo ">>> Unpacking source..."
-	src_unpack
+	call-interactive src_unpack
 	touch "${PORTAGE_BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in ${PORTAGE_BUILDDIR}"
 	echo ">>> Source unpacked."
 	cd "${PORTAGE_BUILDDIR}"
 
-	[ "$(type -t post_src_unpack)" == "function" ] && post_src_unpack
+	[ "$(type -t post_src_unpack)" == "function" ] && call-interactive post_src_unpack
 
 	trap SIGINT SIGQUIT
 }
@@ -1029,7 +1029,7 @@
 dyn_compile() {
 	trap "abort_compile" SIGINT SIGQUIT
 
-	[ "$(type -t pre_src_compile)" == "function" ] && pre_src_compile
+	[ "$(type -t pre_src_compile)" == "function" ] && call-interactive pre_src_compile
 
 	[ "${CFLAGS-unset}"      != "unset" ] && export CFLAGS
 	[ "${CXXFLAGS-unset}"    != "unset" ] && export CXXFLAGS
@@ -1071,7 +1071,7 @@
 		echo ">>> It appears that ${PN} is already compiled; skipping."
 		echo ">>> (clean to force compilation)"
 		trap SIGINT SIGQUIT
-		[ "$(type -t post_src_compile)" == "function" ] && post_src_compile
+		[ "$(type -t post_src_compile)" == "function" ] && call-interactive post_src_compile
 		return
 	fi
 	if [ -d "${S}" ]; then
@@ -1085,7 +1085,7 @@
 	#our libtool to create problematic .la files
 	export PWORKDIR="$WORKDIR"
 	echo ">>> Compiling source in ${srcdir} ..."
-	src_compile
+	call-interactive src_compile
 	echo ">>> Source compiled."
 	#|| abort_compile "fail"
 	cd "${PORTAGE_BUILDDIR}"
@@ -1113,16 +1113,16 @@
 		touch DEBUGBUILD
 	fi
 
-	[ "$(type -t post_src_compile)" == "function" ] && post_src_compile
+	[ "$(type -t post_src_compile)" == "function" ] && call-interactive post_src_compile
 
 	trap SIGINT SIGQUIT
 }
 
 dyn_test() {
-	[ "$(type -t pre_src_test)" == "function" ] && pre_src_test
+	[ "$(type -t pre_src_test)" == "function" ] && call-interactive pre_src_test
 	if [ "${PORTAGE_BUILDDIR}/.tested" -nt "${WORKDIR}" ]; then
 		echo ">>> It appears that ${PN} has already been tested; skipping."
-		[ "$(type -t post_src_test)" == "function" ] && post_src_test
+		[ "$(type -t post_src_test)" == "function" ] && call-interactive post_src_test
 		return
 	fi
 	trap "abort_test" SIGINT SIGQUIT
@@ -1135,19 +1135,19 @@
 	elif ! hasq test $FEATURES; then
 		echo ">>> Test phase [not enabled]: ${CATEGORY}/${PF}"
 	else
-		src_test
+		call-interactive src_test
 	fi
 
 	cd "${PORTAGE_BUILDDIR}"
 	touch .tested || die "Failed to 'touch .tested' in ${PORTAGE_BUILDDIR}"
-	[ "$(type -t post_src_test)" == "function" ] && post_src_test
+	[ "$(type -t post_src_test)" == "function" ] && call-interactive post_src_test
 	trap SIGINT SIGQUIT
 }
 
 dyn_install() {
 	[ -z "$PORTAGE_BUILDDIR" ] && die "${FUNCNAME}: PORTAGE_BUILDDIR is unset"
 	trap "abort_install" SIGINT SIGQUIT
-	[ "$(type -t pre_src_install)" == "function" ] && pre_src_install
+	[ "$(type -t pre_src_install)" == "function" ] && call-interactive pre_src_install
 	rm -rf "${PORTAGE_BUILDDIR}/image"
 	mkdir "${PORTAGE_BUILDDIR}/image"
 	if [ -d "${S}" ]; then
@@ -1161,12 +1161,12 @@
 	#some packages uses an alternative to $S to build in, cause
 	#our libtool to create problematic .la files
 	export PWORKDIR="$WORKDIR"
-	src_install
+	call-interactive src_install
 	touch "${PORTAGE_BUILDDIR}/.installed"
 	echo ">>> Completed installing ${PF} into ${D}"
 	echo
 	cd ${PORTAGE_BUILDDIR}
-	[ "$(type -t post_src_install)" == "function" ] && post_src_install
+	[ "$(type -t post_src_install)" == "function" ] && call-interactive post_src_install
 	trap SIGINT SIGQUIT
 }
 
@@ -1176,12 +1176,29 @@
 		return 1
 	fi
 
-	[ "$(type -t pre_pkg_preinst)" == "function" ] && pre_pkg_preinst
+	[ "$(type -t pre_pkg_preinst)" == "function" ] && call-interactive pre_pkg_preinst
 
 	declare -r D=${IMAGE}
-	pkg_preinst
+	call-interactive pkg_preinst
 
-	[ "$(type -t post_pkg_preinst)" == "function" ] && post_pkg_preinst
+	[ "$(type -t post_pkg_preinst)" == "function" ] && call-interactive post_pkg_preinst
+}
+
+call-interactive() {
+	if ! hasq interactive ${FEATURES}; then
+		$1
+		return $?
+	fi
+
+	(	echo 'unset ENV'
+		set
+		export -p
+		shopt -p
+		echo "export PS1='INTERACTIVE ${PN} $1 \$ '" 
+		echo 'unset ENV'
+	) >> ${T}/interactive-environment
+	export PS1="INTERACTIVE ${PN} $1 \$ "
+	${BASH} --rcfile ${T}/interactive-environment -s || die
 }
 
 dyn_help() {
@@ -1662,21 +1679,21 @@
 for myarg in $*; do
 	case $myarg in
 	nofetch)
-		pkg_nofetch
+		call-interactive pkg_nofetch
 		exit 1
 		;;
 	prerm|postrm|postinst|config)
 		export SANDBOX_ON="0"
 		if [ "$PORTAGE_DEBUG" != "1" ]; then
-			[ "$(type -t pre_pkg_${myarg})" == "function" ] && pre_pkg_${myarg}
-			pkg_${myarg}
-			[ "$(type -t post_pkg_${myarg})" == "function" ] && post_pkg_${myarg}
+			[ "$(type -t pre_pkg_${myarg})" == "function" ] && call-interactive pre_pkg_${myarg}
+			call-interactive pkg_${myarg}
+			[ "$(type -t post_pkg_${myarg})" == "function" ] && call-interactive post_pkg_${myarg}
 			#Allow non-zero return codes since they can be caused by &&
 		else
 			set -x
-			[ "$(type -t pre_pkg_${myarg})" == "function" ] && pre_pkg_${myarg}
-			pkg_${myarg}
-			[ "$(type -t post_pkg_${myarg})" == "function" ] && post_pkg_${myarg}
+			[ "$(type -t pre_pkg_${myarg})" == "function" ] && call-interactive pre_pkg_${myarg}
+			call-interactive pkg_${myarg}
+			[ "$(type -t post_pkg_${myarg})" == "function" ] && call-interactive post_pkg_${myarg}
 			#Allow non-zero return codes since they can be caused by &&
 			set +x
 		fi

[-- Attachment #7: 05-checked-binaries.patch --]
[-- Type: text/x-patch, Size: 811 bytes --]

diff -ruN portage-prefix-2.1.14.orig/pym/portage_const.py portage-prefix-2.1.14/pym/portage_const.py
--- portage-prefix-2.1.14.orig/pym/portage_const.py	2006-07-13 11:08:57.000000000 +0200
+++ portage-prefix-2.1.14/pym/portage_const.py	2006-07-13 11:09:52.000000000 +0200
@@ -31,10 +31,10 @@
 
 EBUILD_SH_BINARY        = PORTAGE_BIN_PATH+"/ebuild.sh"
 MISC_SH_BINARY          = PORTAGE_BIN_PATH + "/misc-functions.sh"
-SANDBOX_BINARY          = "sandbox"
-BASH_BINARY             = "bash"
-MOVE_BINARY             = "mv"
-PRELINK_BINARY          = "prelink"
+SANDBOX_BINARY          = "@SANDBOX@"
+BASH_BINARY             = "@BASH@"
+MOVE_BINARY             = "@MV@"
+PRELINK_BINARY          = "@PRELINK@"
 
 WORLD_FILE              = PRIVATE_PATH + "/world"
 MAKE_CONF_FILE          = EPREFIX+"/etc/make.conf"

[-- Attachment #8: 08-cnf-typo.patch --]
[-- Type: text/x-patch, Size: 945 bytes --]

--- portage-prefix-2.1.14/cnf/Makefile.in.orig	2006-07-14 13:03:27.000000000 +0200
+++ portage-prefix-2.1.14/cnf/Makefile.in	2006-07-14 12:55:26.000000000 +0200
@@ -29,7 +29,7 @@
 	; $(INSTALL_cnfsubst) $(srcdir)/make.globals $(DESTDIR)$(sysconfdir)/make.globals \
 	; echo "$(INSTALL_cnfsubst) $(srcdir)/make.conf $(DESTDIR)$(sysconfdir)/make.conf.example" \
 	; $(INSTALL_cnfsubst) $(srcdir)/make.conf $(DESTDIR)$(sysconfdir)/make.conf.example \
-	: echo "$(INSTALL_cnfsubst) $(srcdir)/dispatch-conf.conf $(DESTDIR)$(sysconfdir)/dispatch-conf.conf" \
+	; echo "$(INSTALL_cnfsubst) $(srcdir)/dispatch-conf.conf $(DESTDIR)$(sysconfdir)/dispatch-conf.conf" \
 	; $(INSTALL_cnfsubst) $(srcdir)/dispatch-conf.conf $(DESTDIR)$(sysconfdir)/dispatch-conf.conf \
 	; echo "$(INSTALL_cnfsubst) $(srcdir)/etc-update.conf $(DESTDIR)$(sysconfdir)/etc-update.conf" \
 	; $(INSTALL_cnfsubst) $(srcdir)/etc-update.conf $(DESTDIR)$(sysconfdir)/etc-update.conf

[-- Attachment #9: 09-wget-bootstrap.patch --]
[-- Type: text/x-patch, Size: 679 bytes --]

--- portage-prefix-2.1.14/cnf/make.globals.orig	2006-07-14 13:03:41.000000000 +0200
+++ portage-prefix-2.1.14/cnf/make.globals	2006-07-14 13:04:02.000000000 +0200
@@ -29,8 +29,8 @@
 PORTAGE_TMPDIR=@DOMAIN_PREFIX@/var/tmp
 
 # Fetching command (5 tries, passive ftp for firewall compatibility)
-FETCHCOMMAND="@DOMAIN_PREFIX@/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
-RESUMECOMMAND="@DOMAIN_PREFIX@/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
+FETCHCOMMAND="@WGET@ -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
+RESUMECOMMAND="@WGET@ -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
 
 # Default user options
 FEATURES="sandbox distlocks metadata-transfer"

[-- Attachment #10: 10-portageq-root.patch --]
[-- Type: text/x-patch, Size: 897 bytes --]

--- portage-prefix-2.1.14/bin/ebuild.sh.orig	2006-07-19 22:19:43.000000000 +0200
+++ portage-prefix-2.1.14/bin/ebuild.sh	2006-07-19 22:20:01.000000000 +0200
@@ -169,7 +169,7 @@
 	fi
 	# return shell-true/shell-false if exists.
 	# Takes single depend-type atoms.
-	if @PORTAGE_BASE@/bin/portageq 'has_version' "${ROOT}" "$1"; then
+	if portageq 'has_version' "${ROOT%${EPREFIX}/}/" "$1"; then
 		return 0
 	else
 		return 1
@@ -180,7 +180,7 @@
 	if [ "${EBUILD_PHASE}" == "depend" ]; then
 		die "portageq calls are not allowed in the global scope"
 	fi
-	@PORTAGE_BASE@/bin/portageq "$@"
+	ROOT="${ROOT%${EPREFIX}/}/" @PORTAGE_BASE@/bin/portageq "$@"
 }
 
 
@@ -195,7 +195,7 @@
 	fi
 	# returns the best/most-current match.
 	# Takes single depend-type atoms.
-	@PORTAGE_BASE@/bin/portageq 'best_version' "${ROOT}" "$1"
+	portageq 'best_version' "${ROOT%${EPREFIX}/}/" "$1"
 }
 
 with_bindir() {

[-- Attachment #11: 11-rpath-autofix.patch --]
[-- Type: text/x-patch, Size: 723 bytes --]

--- portage-prefix-2.1.14/bin/misc-functions.sh.orig	2006-07-24 11:39:56.000000000 +0200
+++ portage-prefix-2.1.14/bin/misc-functions.sh	2006-07-24 11:40:09.000000000 +0200
@@ -50,7 +50,7 @@
 		# Don't want paths that point to the tree where the package was built
 		# (older, broken libtools would do this).  Also check for null paths
 		# because the loader will search $PWD when it finds null paths.
-		f=$(scanelf -qyRF '%r %p' "${D}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^:|^ )")
+		f=$(for f in $(scanelf -qyRF '%r %p' "${D}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^:|^ )"); do echo "${D}${f}"; done)
 		if [[ -n ${f} ]] ; then
 			echo -ne '\a\n'
 			echo "QA Notice: the following files contain insecure RUNPATH's"

[-- Attachment #12: 12-readonly-tree.patch --]
[-- Type: text/x-patch, Size: 774 bytes --]

--- portage-prefix-2.1.14/bin/ebuild.sh.orig	2006-07-24 17:21:11.000000000 +0200
+++ portage-prefix-2.1.14/bin/ebuild.sh	2006-07-24 17:22:23.000000000 +0200
@@ -1064,7 +1064,7 @@
 	if [ ! -e "build-info" ]; then
 		mkdir build-info
 	fi
-	cp "${EBUILD}" "build-info/${PF}.ebuild"
+	cp -f "${EBUILD}" "build-info/${PF}.ebuild"
 
 	if [ "${PORTAGE_BUILDDIR}/.compiled" -nt "${WORKDIR}" ]; then
 		echo ">>> It appears that ${PN} is already compiled; skipping."
@@ -1104,7 +1104,7 @@
 	export -p | sed 's:declare -rx:declare -x:' >> environment
 	bzip2 -9 environment
 
-	cp "${EBUILD}" "${PF}.ebuild"
+	cp -f "${EBUILD}" "${PF}.ebuild"
 	if [[ " ${FEATURES} " == *" nostrip "* ]] || \
 	   [[ " ${RESTRICT} " == *" nostrip "* ]] || \
 	   [[ " ${RESTRICT} " == *" strip "* ]]

             reply	other threads:[~2006-07-25 13:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-25 13:04 Michael Haubenwallner [this message]
2006-07-25 13:11 ` [gentoo-osx] some portage-prefix patches Grobian
2006-07-25 22:43   ` m h
2006-08-01 13:06 ` exg
2006-08-01 14:12   ` Grobian
2006-08-01 15:53   ` Michael Haubenwallner
2006-08-03 12:04     ` Michael Haubenwallner
2006-08-03 12:53     ` Michael Haubenwallner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1153832687.11311.84.camel@sapc154 \
    --to=michael.haubenwallner@salomon.at \
    --cc=gentoo-osx@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox