From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q3j8t-0001cy-El for garchives@archives.gentoo.org; Sun, 27 Mar 2011 06:08:03 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B8981C02C; Sun, 27 Mar 2011 06:07:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C8EDA1C02C for ; Sun, 27 Mar 2011 06:07:52 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0FBD41B4018 for ; Sun, 27 Mar 2011 06:07:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 6FEC78006A for ; Sun, 27 Mar 2011 06:07:51 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <4f548341b7083a2fc0726e9866323d30965206ac.vapier@gentoo> Subject: [gentoo-commits] proj/crossdev:master commit in: / X-VCS-Repository: proj/crossdev X-VCS-Files: crossdev X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 4f548341b7083a2fc0726e9866323d30965206ac Date: Sun, 27 Mar 2011 06:07:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 70a7b441ca6e200b8ca4b202e3e490f5 commit: 4f548341b7083a2fc0726e9866323d30965206ac Author: Mike Frysinger gentoo org> AuthorDate: Sun Mar 20 22:52:11 2011 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Mar 20 22:52:11 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/crossdev.git;= a=3Dcommit;h=3D4f548341 crossdev: unforce USE=3Dmultilib for cross-compilers Signed-off-by: Mike Frysinger gentoo.org> --- crossdev | 42 +++++++++++++++++++++--------------------- 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/crossdev b/crossdev index 1f693cc..6ad9d1a 100755 --- a/crossdev +++ b/crossdev @@ -270,7 +270,7 @@ uninstall() { [[ -d ${PORTDIR_OVERLAY}/cross-${CTARGET} ]] \ && rm -r ${PORTDIR_OVERLAY}/cross-${CTARGET} sed -i -e "/^cross-${CTARGET}$/d" "${CONFIGROOT}"/categories - for f in package.{mask,keywords,use} ; do + for f in package.{mask,keywords,use} profile/package.use.force ; do f=3D"${CONFIGROOT}/${f}" if [[ -d ${f} ]] ; then rm -f "${f}"/cross-${CTARGET} @@ -564,16 +564,18 @@ check_trailing_newline() { #267132 echo >> "$1" fi } +_set_portage_file() { + local pkg=3D$1 output=3D$2 + [[ ! -f ${output} ]] && output+=3D"/cross-${CTARGET}" + [[ -e ${output} ]] && sed -i -e "/^cross-${CTARGET}\/${pkg}/d" ${output= } + check_trailing_newline ${output} + echo ${output} +} set_keywords() { local pkg=3D$1 ver=3D$2 output [[ -z ${pkg} ]] && return 0 - if [[ -f package.keywords ]] ; then - output=3D"package.keywords" - sed -i -e "/^cross-${CTARGET}\/${pkg} /d" ${output} - else - output=3D"package.keywords/cross-${CTARGET}" - fi - check_trailing_newline ${output} + output=3D$(_set_portage_file ${pkg} package.keywords) + if [[ ${ver} =3D=3D "["*"]" ]] || [[ -z ${ver} ]] ; then local keywords=3D"" case ${ver} in @@ -595,17 +597,15 @@ set_keywords() { fi } set_use() { - local pkg=3D$1 output - shift - local use=3D$@ + local pkg=3D$1 output use=3D${@:2} [[ -z ${use} ]] && return 0 - if [[ -f package.use ]] ; then - output=3D"package.use" - else - output=3D"package.use/cross-${CTARGET}" - fi - [[ -e ${output} ]] && sed -i -e "/cross-${CTARGET}\/${pkg}/d" ${output} - check_trailing_newline ${output} + output=3D$(_set_portage_file ${pkg} package.use) + echo "cross-${CTARGET}/${pkg} ${use}" >> ${output} +} +set_use_force() { + local pkg=3D$1 output use=3D${@:2} + [[ -z ${use} ]] && return 0 + output=3D$(_set_portage_file ${pkg} profile/package.use.force) echo "cross-${CTARGET}/${pkg} ${use}" >> ${output} } set_links() { @@ -630,7 +630,6 @@ set_links() { set_env() { local pkg=3D$1 env=3D$2 shift ; shift - mkdir -p env/cross-${CTARGET} =20 cat <<-EOF > env/cross-${CTARGET}/${pkg} # handle multilib ourselves @@ -654,6 +653,7 @@ set_portage() { =20 set_keywords ${pkg} ${ver} set_use ${pkg} ${use} + set_use_force ${pkg} -multilib set_links ${cat} ${pkg} set_env ${pkg} "${env}" } @@ -664,7 +664,7 @@ grep -qs "^cross-${CTARGET}$" "${CONFIGROOT}"/categor= ies \ || echo cross-${CTARGET} >> "${CONFIGROOT}"/categories mkdir -p "${PORTDIR_OVERLAY}"/cross-${CTARGET} || exit 1 cd "${CONFIGROOT}" -for f in package.{keywords,mask,use} ; do +for f in package.{keywords,mask,use} env/cross-${CTARGET} profile/packag= e.use.force ; do [[ -f ${f} ]] && continue mkdir -p ${f} || exit 1 rm -f ${f}/cross-${CTARGET} @@ -708,7 +708,7 @@ doemerge() { einfo "Log: ${logfile}" ebegin "Emerging cross-${2:-$1}" =20 - set_use $1 ${USE} + set_use $1 ${USE} $( [[ ${MULTILIB_ABIS} =3D=3D "default" ]] && echo - = )multilib =20 if [[ ${UOPTS/-v} !=3D ${UOPTS} || ${UOPTS/-p} !=3D ${UOPTS} ]] ; then emerge cross-${CTARGET}/$1 ${EOPTS} \