/[gentoo-x86]/eclass/kernel-2.eclass
Gentoo

Diff of /eclass/kernel-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.209 Revision 1.210
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.209 2008/04/05 12:29:26 mpagano Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.210 2008/04/12 22:45:56 vapier Exp $
4 4
5# Description: kernel.eclass rewrite for a clean base regarding the 2.6 5# Description: kernel.eclass rewrite for a clean base regarding the 2.6
6# series of kernel with back-compatibility for 2.4 6# series of kernel with back-compatibility for 2.4
7# 7#
8# Original author: John Mylchreest <johnm@gentoo.org> 8# Original author: John Mylchreest <johnm@gentoo.org>
731 # -z "${UNIPATCH_LIST}" ] && UNIPATCH_LIST="${@}" 731 # -z "${UNIPATCH_LIST}" ] && UNIPATCH_LIST="${@}"
732 UNIPATCH_LIST="${@}" 732 UNIPATCH_LIST="${@}"
733 733
734 #unpack any passed tarballs 734 #unpack any passed tarballs
735 for i in ${UNIPATCH_LIST}; do 735 for i in ${UNIPATCH_LIST}; do
736 if [ -n "$(echo ${i} | grep -e "\.tar" -e "\.tbz" -e "\.tgz")" ]; then 736 if echo ${i} | grep -qs -e "\.tar" -e "\.tbz" -e "\.tgz" ; then
737 extention=${i/*./}
738 extention=${extention/:*/}
739 case ${extention} in
740 tbz2) PIPE_CMD="tar -xvjf";;
741 bz2) PIPE_CMD="tar -xvjf";;
742 tgz) PIPE_CMD="tar -xvzf";;
743 gz) PIPE_CMD="tar -xvzf";;
744 *) eerror "Unrecognized tarball compression"
745 die "Unrecognized tarball compression";;
746 esac
747
748 if [ -n "${UNIPATCH_STRICTORDER}" ]; then 737 if [ -n "${UNIPATCH_STRICTORDER}" ]; then
749 unset z 738 unset z
750 STRICT_COUNT=$((10#${STRICT_COUNT} + 1)) 739 STRICT_COUNT=$((10#${STRICT_COUNT} + 1))
751 for((y=0; y<$((6 - ${#STRICT_COUNT})); y++)); 740 for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
752 do z="${z}0"; 741 do z="${z}0";
753 done 742 done
754 PATCH_ORDER="${z}${STRICT_COUNT}" 743 PATCH_ORDER="${z}${STRICT_COUNT}"
755 744
756 mkdir -p ${KPATCH_DIR}/${PATCH_ORDER}/ 745 mkdir -p "${KPATCH_DIR}/${PATCH_ORDER}"
757 ${PIPE_CMD} ${i/:*/} -C ${KPATCH_DIR}/${PATCH_ORDER}/ 1>/dev/null 746 pushd "${KPATCH_DIR}/${PATCH_ORDER}" >/dev/null
747 unpack ${i##*/}
748 popd >/dev/null
758 else 749 else
759 ${PIPE_CMD} ${i/:*/} -C ${KPATCH_DIR} 1>/dev/null 750 pushd "${KPATCH_DIR}" >/dev/null
751 unpack ${i##*/}
752 popd >/dev/null
760 fi 753 fi
761 754
762 if [ $? == 0 ]; then
763 einfo "${i/*\//} unpacked"
764 [ -n "$(echo ${i} | grep ':')" ] && echo ">>> Strict patch levels not currently supported for tarballed patchsets" 755 [[ ${i} == *:* ]] && echo ">>> Strict patch levels not currently supported for tarballed patchsets"
765 else
766 eerror "Failed to unpack ${i/:*/}"
767 die "unable to unpack patch tarball"
768 fi
769 else 756 else
770 extention=${i/*./} 757 extention=${i/*./}
771 extention=${extention/:*/} 758 extention=${extention/:*/}
772 PIPE_CMD="" 759 PIPE_CMD=""
773 case ${extention} in 760 case ${extention} in

Legend:
Removed from v.1.209  
changed lines
  Added in v.1.210

  ViewVC Help
Powered by ViewVC 1.1.20