diff options
author | Ned Ludd <solar@gentoo.org> | 2005-04-06 05:03:52 +0000 |
---|---|---|
committer | Ned Ludd <solar@gentoo.org> | 2005-04-06 05:03:52 +0000 |
commit | 26b04fe6f89f4224fc3d7430f04da68fd2ebbc76 (patch) | |
tree | 0cab36aba92c256e8eac407cfaac3201139c3088 /profiles/uclibc | |
parent | Manual Manifest commit. (diff) | |
download | historical-26b04fe6f89f4224fc3d7430f04da68fd2ebbc76.tar.gz historical-26b04fe6f89f4224fc3d7430f04da68fd2ebbc76.tar.bz2 historical-26b04fe6f89f4224fc3d7430f04da68fd2ebbc76.zip |
- uclibc profile.bashrc updates. adds new hooks for INSTALL_MASK/etc/portage/root_install_mask when installing not into /
Diffstat (limited to 'profiles/uclibc')
-rw-r--r-- | profiles/uclibc/profile.bashrc | 86 |
1 files changed, 16 insertions, 70 deletions
diff --git a/profiles/uclibc/profile.bashrc b/profiles/uclibc/profile.bashrc index 74f5fdb7c6c6..2e72add4c377 100644 --- a/profiles/uclibc/profile.bashrc +++ b/profiles/uclibc/profile.bashrc @@ -1,30 +1,26 @@ # Copyright 2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/profiles/uclibc/profile.bashrc,v 1.3 2005/02/13 21:24:31 solar Exp $ +# $Header: /var/cvsroot/gentoo-x86/profiles/uclibc/profile.bashrc,v 1.4 2005/04/06 05:03:52 solar Exp $ -# file - /etc/portage/package.cflags -# This gives us per pkg cflags and is auto expaned into the cxxflags. -# -# We can take individual category names, or we can take individual -# ebuild names but >= = <= syntax not supported. # # FEATURES="distclean" # This feature removes unneeded SRC_URI distfiles in the postinst ebuild phase. -# This is useful for use with ramfs/tmpfs and small media such as USB sticks. +# This is useful with ramfs/tmpfs and smaller media such as USB sticks. # + eecho() { [ "$NOCOLOR" = "false" ] && echo -ne '\e[1;34m>\e[1;36m>\e[1;35m>\e[0m ' || echo -n ">>> " echo "$*" } -package-distdir-clean() { +package_clean_distdir() { local a x for a in ${FEATURES} ; do if [ "$a" = "distclean" ]; then for x in ${SRC_URI}; do x=$(basename $x) - if [[ -f $DISTDIR/$x ]]; then + if [[ -w $DISTDIR/$x ]]; then size="$(ls -lh ${DISTDIR}/${x} | awk '{print $5}')" eecho "All done with ${x} Removing it to save ${size}" rm ${DISTDIR}/${x} @@ -34,70 +30,20 @@ package-distdir-clean() { done } -#append-cflags() { -# export CFLAGS="${CFLAGS} $*" -# export CXXFLAGS="${CXXFLAGS} $*" -# return 0 -#} -# -#package-cflags() { -# local target flags flag i; -# -# # bail if file does not exist or is not readable. -# [ -r ${ROOT}/etc/portage/package.cflags ] || return 0 -# -# # need bash >= 3 -# if [ "${BASH_VERSINFO[0]}" -le 2 ]; then -# eecho "Need bash3 for this bashrc script to work" -# return 0 -# fi -# -# while read -a target; do -# if [[ ${target[@]%%#*} ]]; then -# -# # valid syntax no >=<! operators -# # category CFLAGS -# # category/package-name CFLAGS -# if [[ ${target%%#*} && ${target%% *} =~ "^(${CATEGORY}|${CATEGORY}/${PN})\>" ]]; then -# skip=0 -# if [[ ${target} != ${CATEGORY} ]] ; then -# if [[ ${target} != ${CATEGORY}/${PN} ]] ; then -# skip=1 -# fi -# fi -# if [ "${skip}" == 0 ] ; then -# flags=(${target[@]:1}) -# if [[ ${flags[@]} =~ 'CFLAGS' ]]; then -# for (( i = 0; i < ${#flags[@]}; i++ )); do -# if [[ ${flags[$i]} =~ 'CFLAGS' ]]; then -# appened-cflags $(eval echo "${flags[$i]}") -# unset flags[$i] -# fi -# done -# fi -# for flag in ${flags[@]}; do -# if [[ ${CFLAGS} =~ ${flag} ]]; then -# continue 1 -# else -# append-cflags "${flag}" -# fi -# done -# export -n C{,XX}FLAGS -# fi -# fi -# fi -# done < ${ROOT}/etc/portage/package.cflags -#} - -if [ "$EBUILD_PHASE" = "/usr/lib/portage/bin/ebuild.sh" -o "$EBUILD_PHASE" = "/usr/lib/portage/bin/ebuild-daemon.sh" -o "$EBUILD_PHASE" = "bash" ]; then +if [[ $EBUILD_PHASE != "" ]]; then PATH="/sbin:/usr/sbin:/usr/lib/portage/bin:/bin:/usr/bin:${ROOTPATH}" - case "$EBUILD_PHASE" in + case "${EBUILD_PHASE}" in + preinst) + [[ $ROOT != "" ]] && [[ $ROOT != "/" ]] \ + && [ -r /etc/portage/root_install_mask ] \ + && INSTALL_MASK="${INSTALL_MASK} $(< /etc/portage/root_install_mask)" + ;; + postinst) + package_clean_distdir + ;; # try to stay quiet in depend. depend) : ;; prerm|postrm|clean) : ;; - setup|unpack|postinst|compile|*) -# package-cflags - [ "$EBUILD_PHASE" = "postinst" ] && package-distdir-clean - ;; + setup|unpack|postinst|compile|*) : ;; esac fi |