Magellan Linux

Diff of /trunk/mage/usr/lib/mage/depwalker.sh

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

revision 1561 by niro, Wed Dec 28 09:57:31 2011 UTC revision 2141 by niro, Mon Jul 15 08:04:58 2013 UTC
# Line 98  checklist_processeddeps() Line 98  checklist_processeddeps()
98  }  }
99    
100  #####################  #####################
101  ##  rumwandern /path/to/mage/file/.mage  ##  depwalking /path/to/mage/file/.mage
102  rumwandern()  depwalking()
103  {  {
104   unset DEPEND   unset DEPEND
105   unset SDEPEND   unset SDEPEND
# Line 179  rumwandern() Line 179  rumwandern()
179   fi   fi
180    
181   HIGHEST_DEPFILE=$(dep2highest_magefile "${DEPNAME}")   HIGHEST_DEPFILE=$(dep2highest_magefile "${DEPNAME}")
182     if [[ -z ${HIGHEST_DEPFILE} ]]
183     then
184     INVALID_DEPS+=" ${DEPNAME}:${DFILE}"
185     continue
186     fi
187    
188   PCAT="$(magename2pcat ${HIGHEST_DEPFILE})"   PCAT="$(magename2pcat ${HIGHEST_DEPFILE})"
189   PNAME="$(magename2pname ${HIGHEST_DEPFILE})"   PNAME="$(magename2pname ${HIGHEST_DEPFILE})"
190   PVER="$(magename2pver ${HIGHEST_DEPFILE})"   PVER="$(magename2pver ${HIGHEST_DEPFILE})"
191   PBUILD="$(magename2pbuild ${HIGHEST_DEPFILE})"   PBUILD="$(magename2pbuild ${HIGHEST_DEPFILE})"
192    
193   ## check ob schon in ALLDEPS enthalten dann mach weiter   ## dep already in ALLDEPS? then going on
194    
195   # usage of fgrep is extremly slow and consumes a lot of cpu power   # usage of fgrep is extremly slow and consumes a lot of cpu power
196   #if [ -z "$(echo ${ALLDEPS} | fgrep "${HIGHEST_DEPFILE}")" ]   #if [ -z "$(echo ${ALLDEPS} | fgrep "${HIGHEST_DEPFILE}")" ]
197   if checklist_alldeps "${HIGHEST_DEPFILE}"   if checklist_alldeps "${HIGHEST_DEPFILE}"
198   then   then
199   ### check ob DFILE schon installiert ist ###   ### check if the dependency is already installed ###
200   if [ ! -d ${MROOT}${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ]   if [ ! -d ${MROOT}${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ]
201   then   then
202   rumwandern ${HIGHEST_DEPFILE}   depwalking ${HIGHEST_DEPFILE}
203   ALLDEPS="${ALLDEPS} ${HIGHEST_DEPFILE}"   ALLDEPS="${ALLDEPS} ${HIGHEST_DEPFILE}"
204   fi   fi
205   fi   fi
# Line 237  then Line 242  then
242   PVER="$(magename2pver ${MAGEFILE})"   PVER="$(magename2pver ${MAGEFILE})"
243   PBUILD="$(magename2pbuild ${MAGEFILE})"   PBUILD="$(magename2pbuild ${MAGEFILE})"
244    
245   # do not wander files which are installed   # do not walk files which are installed
246   if [ ! -d ${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ]   if [ ! -d ${INSTALLDB}/${PCAT}/${PNAME}-${PVER}-${PBUILD} ]
247   then   then
248   # get dependencies the package   # get dependencies the package
249   rumwandern ${MAGEFILE}   depwalking ${MAGEFILE}
250    
251   # now add the package itself to the dependencies   # now add the package itself to the dependencies
252   # (if not exists already)   # (if not exists already)
# Line 253  then Line 258  then
258   fi   fi
259   done   done
260  else  else
261   # get dependencies the package   # get all dependencies of the package
262   rumwandern ${MAGEFILE}   depwalking ${MAGEFILE}
263    
264   # now add the package itself to the dependencies   # now add the package itself to the dependencies
265   ALLDEPS="${ALLDEPS} ${MAGEFILE}"   ALLDEPS="${ALLDEPS} ${MAGEFILE}"
# Line 299  then Line 304  then
304   echo -e "${list}"   echo -e "${list}"
305   echo   echo
306    
307     if [[ ! -z ${INVALID_DEPS} ]]
308     then
309     echo -e "${COLRED}Invalid dependencies found:${COLDEFAULT}"
310     for i in ${INVALID_DEPS}
311     do
312     _dep="${i%%:*}"
313     _mage="${i##*:}"
314     echo -e "${COLRED} '${_dep}' -> '${_mage}'${COLDEFAULT}"
315     done
316     echo
317     fi
318    
319   if [[ ! -z ${NO_UPGRADE_CANDIDATE} ]]   if [[ ! -z ${NO_UPGRADE_CANDIDATE} ]]
320   then   then
321   echo -e "${COLRED}Currently no candidates found for:${COLDEFAULT}"   echo -e "${COLRED}Currently no candidates found for:${COLDEFAULT}"

Legend:
Removed from v.1561  
changed lines
  Added in v.2141