diff options
author | 2006-08-10 11:00:26 +0000 | |
---|---|---|
committer | 2006-08-10 11:00:26 +0000 | |
commit | 2ed473961e81c5392c2956f2be824886ccdd7348 (patch) | |
tree | 09b59b75cf80906341c2c60df415d209c2bce439 | |
parent | Fix cross path (diff) | |
download | lu_zero-2ed473961e81c5392c2956f2be824886ccdd7348.tar.gz lu_zero-2ed473961e81c5392c2956f2be824886ccdd7348.tar.bz2 lu_zero-2ed473961e81c5392c2956f2be824886ccdd7348.zip |
Updates from vapier's one merged
svn path=/; revision=49
-rw-r--r-- | sys-devel/crossdev/crossdev-0.9.15-r3.ebuild (renamed from sys-devel/crossdev/crossdev-0.9.15-r2.ebuild) | 0 | ||||
-rwxr-xr-x | sys-devel/crossdev/files/crossdev | 51 |
2 files changed, 37 insertions, 14 deletions
diff --git a/sys-devel/crossdev/crossdev-0.9.15-r2.ebuild b/sys-devel/crossdev/crossdev-0.9.15-r3.ebuild index 1e6e1c0..1e6e1c0 100644 --- a/sys-devel/crossdev/crossdev-0.9.15-r2.ebuild +++ b/sys-devel/crossdev/crossdev-0.9.15-r3.ebuild diff --git a/sys-devel/crossdev/files/crossdev b/sys-devel/crossdev/files/crossdev index 7f7f5a6..67fa11f 100755 --- a/sys-devel/crossdev/files/crossdev +++ b/sys-devel/crossdev/files/crossdev @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/files/crossdev,v 1.68 2006/06/27 08:08:10 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/crossdev/files/crossdev,v 1.69 2006/08/10 03:52:50 vapier Exp $ cd / @@ -233,10 +233,14 @@ uninstall() { [[ -d ${PORTDIR_OVERLAY}/cross-${CTARGET} ]] \ && rm -r ${PORTDIR_OVERLAY}/cross-${CTARGET} - for f in package.{mask,keywords,use} categories ; do + sed -i -e "/^cross-${CTARGET}$/d" /etc/portage/categories + for f in package.{mask,keywords,use} ; do f="/etc/portage/${f}" - [[ ! -e ${f} ]] && continue - sed -i -e "/cross-${CTARGET}\//d" "${f}" + if [[ -d ${f} ]] ; then + rm -f "${f}"/cross-${CTARGET} + elif [[ -f ${f} ]] ; then + sed -i -e "/cross-${CTARGET}\//d" "${f}" + fi done if [[ ! -d /var/db/pkg/cross-${CTARGET} ]] ; then @@ -452,24 +456,41 @@ emerge --info >> ${PORT_LOGDIR}/cross-${CTARGET}-info.log ### Fix up portage files / paths ### set_keywords() { - local pkg=$1 ver=$2 + local pkg=$1 ver=$2 output [[ -z ${pkg} ]] && return 0 - sed -i -e "/^cross-${CTARGET}\/${pkg} /d" package.keywords + if [[ -f package.keywords ]] ; then + output="package.keywords" + sed -i -e "/^cross-${CTARGET}\/${pkg} /d" ${output} + else + output="package.keywords/cross-${CTARGET}" + rm -f ${output} + fi if [[ ${ver} == "[latest]" ]] || [[ -z ${ver} ]] ; then - echo "cross-${CTARGET}/${pkg} $TARCH ~$TARCH" >> package.keywords + echo "cross-${CTARGET}/${pkg} $TARCH ~$TARCH" >> ${output} else - sed -i -e "/cross-${CTARGET}\/${pkg}/d" package.mask - echo ">cross-${CTARGET}/${pkg}-${ver}" >> package.mask - echo "cross-${CTARGET}/${pkg} * ~* -*" >> package.keywords + echo "cross-${CTARGET}/${pkg} * ~* -*" >> ${output} + if [[ -f package.mask ]] ; then + output="package.mask" + sed -i -e "/cross-${CTARGET}\/${pkg}/d" ${output} + else + output="package.mask/cross-${CTARGET}" + rm -f ${output} + fi + echo ">cross-${CTARGET}/${pkg}-${ver}" >> ${output} fi } set_use() { - local pkg=$1 + local pkg=$1 output shift local use=$@ [[ -z ${use} ]] && return 0 - sed -i -e "/cross-${CTARGET}\/${pkg}/d" package.use - echo "cross-${CTARGET}/${pkg} ${use}" >> package.use + if [[ -f package.use ]] ; then + output="package.use" + sed -i -e "/cross-${CTARGET}\/${pkg}/d" ${output} + else + output="package.use/cross-${CTARGET}" + fi + echo "cross-${CTARGET}/${pkg} ${use}" >> ${output} } set_links() { local cat=$1 pkg=$2 @@ -501,7 +522,9 @@ grep -qs "^cross-${CTARGET}$" /etc/portage/categories \ || echo cross-${CTARGET} >> /etc/portage/categories mkdir -p "${PORTDIR_OVERLAY}"/cross-${CTARGET} cd /etc/portage -touch package.{keywords,mask,use} +for f in package.{keywords,mask,use} ; do + [[ ! -e ${f} ]] && mkdir ${f} +done set_portage ${BCAT} ${BPKG} ${BVER} set_portage ${GCAT} ${GPKG} ${GVER} |