/[gentoo-x86]/eclass/linux-mod.eclass
Gentoo

Diff of /eclass/linux-mod.eclass

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

Revision 1.71 Revision 1.72
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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/linux-mod.eclass,v 1.71 2007/02/05 14:51:07 dsd Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.72 2007/03/01 06:40:28 vapier Exp $
4 4
5# Description: This eclass is used to interface with linux-info in such a way 5# Description: This eclass is used to interface with linux-info in such a way
6# to provide the functionality required and initial functions 6# to provide the functionality required and initial functions
7# required to install external modules against a kernel source 7# required to install external modules against a kernel source
8# tree. 8# tree.
214 214
215 if [[ ! -f ${MODULEDB_DIR}/moduledb ]]; then 215 if [[ ! -f ${MODULEDB_DIR}/moduledb ]]; then
216 [[ ! -d ${MODULEDB_DIR} ]] && mkdir -p ${MODULEDB_DIR} 216 [[ ! -d ${MODULEDB_DIR} ]] && mkdir -p ${MODULEDB_DIR}
217 touch ${MODULEDB_DIR}/moduledb 217 touch ${MODULEDB_DIR}/moduledb
218 fi 218 fi
219
219 if [[ -z $(grep ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb) ]]; then 220 if ! grep -qs ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb ; then
220 einfo "Adding module to moduledb." 221 einfo "Adding module to moduledb."
221 echo "a:1:${CATEGORY}/${PN}-${PVR}" >> ${MODULEDB_DIR}/moduledb 222 echo "a:1:${CATEGORY}/${PN}-${PVR}" >> ${MODULEDB_DIR}/moduledb
222 fi 223 fi
223} 224}
224 225
226 debug-print-function ${FUNCNAME} $* 227 debug-print-function ${FUNCNAME} $*
227 228
228 local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/ 229 local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/
229 move_old_moduledb 230 move_old_moduledb
230 231
231 if [[ -n $(grep ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb) ]]; then 232 if grep -qs ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb ; then
232 einfo "Removing ${CATEGORY}/${PN}-${PVR} from moduledb." 233 einfo "Removing ${CATEGORY}/${PN}-${PVR} from moduledb."
233 sed -i -e "/.*${CATEGORY}\/${PN}-${PVR}.*/d" ${MODULEDB_DIR}/moduledb 234 sed -i -e "/.*${CATEGORY}\/${PN}-${PVR}.*/d" ${MODULEDB_DIR}/moduledb
234 fi 235 fi
235} 236}
236 237

Legend:
Removed from v.1.71  
changed lines
  Added in v.1.72

  ViewVC Help
Powered by ViewVC 1.1.20