Magellan Linux

Diff of /branches/mage-next/src/depwalker.in

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

revision 598 by niro, Mon Nov 5 16:49:33 2007 UTC revision 677 by niro, Tue Feb 26 19:51:40 2008 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
3  #depwalker  #depwalker
4  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/depwalker.sh,v 1.6 2007-11-05 16:49:33 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/depwalker.sh,v 1.9 2008-02-26 19:51:40 niro Exp $
5    
6  # default die function  # default die function
7  die()  die()
# Line 106  checklist_alldeps() Line 106  checklist_alldeps()
106   return 0   return 0
107  }  }
108    
109    checklist_processeddeps()
110    {
111     local i
112     local item="$1"
113    
114     for i in ${PROCESSEDDEPS}
115     do
116     [[ ${i} = ${item} ]] && return 1
117     done
118    
119     return 0
120    }
121    
122  #####################  #####################
123  ##  rumwandern /path/to/mage/file/.mage  ##  rumwandern /path/to/mage/file/.mage
124  rumwandern()  rumwandern()
# Line 162  rumwandern() Line 175  rumwandern()
175    
176   while read SYM DEPNAME   while read SYM DEPNAME
177   do   do
178     # exclude empty depnames
179     [[ -z ${DEPNAME} ]] && continue
180    
181     # exclude all already processed deps -without version
182     if ! checklist_processeddeps "${DEPNAME%-*}"
183     then
184     continue
185     fi
186    
187     # mark depfile as processed to prevent double runs -without version
188     # but do not add any virtuals to PROCESSEDDEPS or their resolved
189     # pkgnames will be ignored and they are missing on the dependecy-list
190     if [[ ${DEPNAME/virtual\//} = ${DEPNAME} ]]
191     then
192     PROCESSEDDEPS="${PROCESSEDDEPS} ${DEPNAME%-*}"
193     fi
194    
195   HIGHEST_DEPFILE=$(dep2highest_magefile "${DEPNAME}")   HIGHEST_DEPFILE=$(dep2highest_magefile "${DEPNAME}")
196    
197   PCAT="$(magename2pcat ${HIGHEST_DEPFILE})"   PCAT="$(magename2pcat ${HIGHEST_DEPFILE})"

Legend:
Removed from v.598  
changed lines
  Added in v.677