Magellan Linux

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

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

revision 90 by niro, Tue Jun 28 20:39:35 2005 UTC revision 157 by niro, Sat Jul 23 16:34:52 2005 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2  # Magellan Linux Installer (mage.sh)  # Magellan Linux Installer (mage.sh)
3  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage3.sh,v 1.13 2005-06-28 20:39:30 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage3.sh,v 1.14 2005-07-23 16:34:52 niro Exp $
4    
5  ##configuration -> mage.rc  ##configuration -> mage.rc
6  #PKGDIR="/usr/src/packages"  #PKGDIR="/usr/src/packages"
# Line 11  PKGSUFFIX="mpk" Line 11  PKGSUFFIX="mpk"
11  MAGENAME="$2"  MAGENAME="$2"
12  #PKGNAME="`basename $2 .mage`"  #PKGNAME="`basename $2 .mage`"
13  MLIBDIR=/usr/lib/mage  MLIBDIR=/usr/lib/mage
14  MAGEVERSION=0.3.6-r17  MAGEVERSION=0.3.6-r18
15    
16  ## nur für tests -> normalerweise in /etc/rc.d/init.d/functions  ## nur für tests -> normalerweise in /etc/rc.d/init.d/functions
17  COLRED="\033[1;6m\033[31m"  COLRED="\033[1;6m\033[31m"
# Line 152  register_virtual_pkg(){ Line 152  register_virtual_pkg(){
152   unset DB_VIRTUAL_NAME DB_PKG_NAME   unset DB_VIRTUAL_NAME DB_PKG_NAME
153   rm ${BUILDDIR}/virtuals/virtuals.${PKGNAME/-${ARCH}/}   rm ${BUILDDIR}/virtuals/virtuals.${PKGNAME/-${ARCH}/}
154   fi   fi
155    
156   if [ -n "${PROVIDE}" ]   if [ -n "${PROVIDE}" ]
157   then   then
158   local my_pgk   # wander through all provides
159   #cut arch   local my_provides
160   my_pkg=${PKGNAME/-${ARCH}/}   for my_provides in ${PROVIDE}
161   #cut version & build   do
162   my_pkg=${my_pkg%-*-*}   local my_pgk
163     #cut arch
164   virtuals_add ${PROVIDE} ${CATEGORIE}/${my_pkg}   my_pkg=${PKGNAME/-${ARCH}/}
165     #cut version & build
166     my_pkg=${my_pkg%-*-*}
167    
168     virtuals_add ${my_provides} ${CATEGORIE}/${my_pkg}
169     done
170   unset PROVIDE   unset PROVIDE
171     unset my_provides
172   fi   fi
173  }  }
174    
# Line 187  unregister_virtual_pkg(){ Line 192  unregister_virtual_pkg(){
192   do   do
193   # continue if not a directory,   # continue if not a directory,
194   # or the same PNAME-PVER-PBUILD   # or the same PNAME-PVER-PBUILD
195   if [ ! -d "${directory}" ]   if [ ! -d "${directory}" ]
196   then   then
197   continue   continue
198   fi   fi
# Line 203  unregister_virtual_pkg(){ Line 208  unregister_virtual_pkg(){
208   done   done
209    
210   #virtuals_del ${PROVIDE} ${CATEGORIE}/${my_pkg}   #virtuals_del ${PROVIDE} ${CATEGORIE}/${my_pkg}
211    
212   #my_pkg has already the categorie -> ex my_pkg=x11-base/xfree   # wander through all provides
213   virtuals_del ${PROVIDE} ${my_pkg}   local my_provides
214     for my_provides in ${PROVIDE}
215     do
216     #my_pkg has already the categorie -> ex my_pkg=x11-base/xfree
217     virtuals_del ${my_provides} ${my_pkg}
218     done
219    
220   unset PROVIDE   unset PROVIDE
221     unset my_provides
222   fi   fi
223  }  }
224    

Legend:
Removed from v.90  
changed lines
  Added in v.157