Magellan Linux

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

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

revision 29 by niro, Wed Jan 5 05:08:01 2005 UTC revision 30 by niro, Thu Jan 6 02:29:48 2005 UTC
# Line 169  unregister_virtual_pkg(){ Line 169  unregister_virtual_pkg(){
169   if [ -n "${PROVIDE}" ]   if [ -n "${PROVIDE}" ]
170   then   then
171   local my_pgk   local my_pgk
172     local my_cat
173     local directory
174     local x
175    
176   #cut arch   #cut arch
177   my_pkg=${PKGNAME/-${ARCH}/}   my_pkg=${PKGNAME/-${ARCH}/}
178    
179   #cut version & build   #cut version & build
180   my_pkg=${my_pkg%-*-*}   my_pkg=${my_pkg%-*-*}
181     my_cat=$(dirname ${my_pkg})
182    
183     #check if this was the last one or if any other exists
184     for directory in ${INSTALLDB}/${my_cat}/*
185     do
186     # continue if not a directory,
187     # or the same PNAME-PVER-PBUILD
188     if [ ! -d "${directory}" ]
189     then
190     continue
191     fi
192    
193     #check if $directory is the same as $my_pkg
194     x=$(basename ${directory})
195     if [[ ${my_cat}/${x%-*-*} = ${my_pkg} ]]
196     then
197     # break here
198     echo "==== another version of ${my_pkg} exists, not deleting ${VIRTUAL_NAME} ..."
199     return 0
200     fi
201     done
202    
203   #virtuals_del ${PROVIDE} ${CATEGORIE}/${my_pkg}   #virtuals_del ${PROVIDE} ${CATEGORIE}/${my_pkg}
204    
205   #my_pkg has already the categorie -> ex my_pkg=x11-base/xfree   #my_pkg has already the categorie -> ex my_pkg=x11-base/xfree

Legend:
Removed from v.29  
changed lines
  Added in v.30