From c546e4e11fbfc095d6a29c986bd473066e742838 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Wed, 29 Jul 2015 17:52:38 +0000 Subject: Fix for Prefix: shebangs and portage.db key (Portage version: 2.2.20-prefix/cvs/SunOS i386, signed Manifest commit with key 0x5F75F607C5C74E89) --- app-portage/gentoolkit-dev/ChangeLog | 6 +++++- .../gentoolkit-dev/gentoolkit-dev-0.3.0.ebuild | 24 +++++++++++++++++++++- .../gentoolkit-dev/gentoolkit-dev-9999.ebuild | 24 +++++++++++++++++++++- 3 files changed, 51 insertions(+), 3 deletions(-) (limited to 'app-portage') diff --git a/app-portage/gentoolkit-dev/ChangeLog b/app-portage/gentoolkit-dev/ChangeLog index b87f9150183a..a058647822be 100644 --- a/app-portage/gentoolkit-dev/ChangeLog +++ b/app-portage/gentoolkit-dev/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-portage/gentoolkit-dev # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit-dev/ChangeLog,v 1.143 2015/07/22 01:42:18 mrueg Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit-dev/ChangeLog,v 1.144 2015/07/29 17:52:38 grobian Exp $ + + 29 Jul 2015; Fabian Groffen gentoolkit-dev-0.3.0.ebuild, + gentoolkit-dev-9999.ebuild: + Fix for Prefix: shebangs and portage.db key 22 Jul 2015; Manuel RĂ¼ger -files/gentoolkit-dev-0.2.8-tests.patch, -gentoolkit-dev-0.2.6.14.ebuild, diff --git a/app-portage/gentoolkit-dev/gentoolkit-dev-0.3.0.ebuild b/app-portage/gentoolkit-dev/gentoolkit-dev-0.3.0.ebuild index e0e6f579bee2..7e8b90ef148b 100644 --- a/app-portage/gentoolkit-dev/gentoolkit-dev-0.3.0.ebuild +++ b/app-portage/gentoolkit-dev/gentoolkit-dev-0.3.0.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit-dev/gentoolkit-dev-0.3.0.ebuild,v 1.1 2015/05/22 16:39:00 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit-dev/gentoolkit-dev-0.3.0.ebuild,v 1.2 2015/07/29 17:52:38 grobian Exp $ EAPI="5" @@ -37,6 +37,28 @@ DEPEND="${PYTHON_DEPS} RDEPEND="${PYTHON_DEPS} ${CDEPEND}" +src_prepare() { + if [[ -n ${EPREFIX} ]] ; then + # fix shebangs of scripts + local d p + ebegin "Fixing shebangs" + for d in src/* ; do + p=${d#*/} + sed -i \ + -e "1s:\(\(/usr\)\?/bin/\):${EPREFIX}\1:" \ + ${d}/${p}* \ + || die "failed to fix ${d}/${p}" + done + eend $? + + # fix repo location + sed -i \ + -e "s:portage\.db\['/'\]:portage.db['${EPREFIX}/']:g" \ + src/ekeyword/ekeyword.py \ + || die "failed to set EPREFIX in ekeyword" + fi +} + src_test() { # echangelog test is not able to run as root # the EUID check may not work for everybody diff --git a/app-portage/gentoolkit-dev/gentoolkit-dev-9999.ebuild b/app-portage/gentoolkit-dev/gentoolkit-dev-9999.ebuild index 66be7e121bf8..bea3c3df1ff6 100644 --- a/app-portage/gentoolkit-dev/gentoolkit-dev-9999.ebuild +++ b/app-portage/gentoolkit-dev/gentoolkit-dev-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit-dev/gentoolkit-dev-9999.ebuild,v 1.17 2015/05/22 16:39:00 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/gentoolkit-dev/gentoolkit-dev-9999.ebuild,v 1.18 2015/07/29 17:52:38 grobian Exp $ EAPI="5" @@ -37,6 +37,28 @@ DEPEND="${PYTHON_DEPS} RDEPEND="${PYTHON_DEPS} ${CDEPEND}" +src_prepare() { + if [[ -n ${EPREFIX} ]] ; then + # fix shebangs of scripts + local d p + ebegin "Fixing shebangs" + for d in src/* ; do + p=${d#*/} + sed -i \ + -e "1s:\(\(/usr\)\?/bin/\):${EPREFIX}\1:" \ + ${d}/${p}* \ + || die "failed to fix ${d}/${p}" + done + eend $? + + # fix repo location + sed -i \ + -e "s:portage\.db\['/'\]:portage.db['${EPREFIX}/']:g" \ + src/ekeyword/ekeyword.py \ + || die "failed to set EPREFIX in ekeyword" + fi +} + src_test() { # echangelog test is not able to run as root # the EUID check may not work for everybody -- cgit v1.2.3-65-gdbad