Magellan Linux

Diff of /trunk/mage/usr/lib/mage/mage4.functions.sh

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

revision 451 by niro, Wed Mar 28 20:26:08 2007 UTC revision 499 by niro, Sat Jun 30 15:31:46 2007 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # Magellan Linux Installer Functions (mage.functions.sh)  # Magellan Linux Installer Functions (mage.functions.sh)
3  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.30 2007-03-28 20:26:08 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.32 2007-06-30 15:31:46 niro Exp $
4    
5  mage_setup()  mage_setup()
6  {  {
# Line 2340  uninstall_packages() Line 2340  uninstall_packages()
2340   echo -ne "${COLBLUE} --- ${COLDEFAULT}"   echo -ne "${COLBLUE} --- ${COLDEFAULT}"
2341   echo -ne "${COLBOLD}${can_pcat}/${can_pname}:${COLDEFAULT}"   echo -ne "${COLBOLD}${can_pcat}/${can_pname}:${COLDEFAULT}"
2342   echo -e "${COLRED} ${can_ver_list} ${COLDEFAULT}"   echo -e "${COLRED} ${can_ver_list} ${COLDEFAULT}"
2343   echo   echo        [04] app-emulation/virtualbox-1.4.0-r3
2344   if [ ${MAGE_UNINSTALL_TIMEOUT} -gt 0 ]   if [ ${MAGE_UNINSTALL_TIMEOUT} -gt 0 ]
2345   then   then
2346   echo -ne "${COLBLUE} --- ${COLDEFAULT}"   echo -ne "${COLBLUE} --- ${COLDEFAULT}"
# Line 2406  mage_uninstall() Line 2406  mage_uninstall()
2406   for i in $*   for i in $*
2407   do   do
2408   case $1 in   case $1 in
2409   --pcat|-c) shift; pcat="$1" ;;   --pcat|-c) shift; pcat="$1" ;;        [04] app-emulation/virtualbox-1.4.0-r3
2410   --pname|-n) shift; pname="$1" ;;   --pname|-n) shift; pname="$1" ;;
2411   --pver|-v) shift; pver="$1" ;;   --pver|-v) shift; pver="$1" ;;
2412   --pbuild|-b) shift; pbuild="$1" ;;   --pbuild|-b) shift; pbuild="$1" ;;        [04] app-emulation/virtualbox-1.4.0-r3
2413   esac   esac
2414   shift   shift
2415   done   done        [04] app-emulation/virtualbox-1.4.0-r3
2416    
2417   # sanity checks; abort if not given   # sanity checks; abort if not given
2418   [ -z "${pcat}" ] && die "mage_uninstall() \$pcat not given."   [ -z "${pcat}" ] && die "mage_uninstall() \$pcat not given."        [04] app-emulation/virtualbox-1.4.0-r3
2419   [ -z "${pname}" ] && die "mage_uninstall() \$pname not given."   [ -z "${pname}" ] && die "mage_uninstall() \$pname not given."
2420   [ -z "${pver}" ] && die "mage_uninstall() \$pver not given."   [ -z "${pver}" ] && die "mage_uninstall() \$pver not given."
2421   [ -z "${pbuild}" ] && die "mage_uninstall() \$pbuild not given."   [ -z "${pbuild}" ] && die "mage_uninstall() \$pbuild not given."        [04] app-emulation/virtualbox-1.4.0-r3
2422    
2423   # check needed global vars   # check needed global vars
2424   [ -z "${MAGEDIR}" ] && die "mage_uninstall() \$MAGEDIR not set."   [ -z "${MAGEDIR}" ] && die "mage_uninstall() \$MAGEDIR not set."
# Line 2431  mage_uninstall() Line 2431  mage_uninstall()
2431   echo -ne "${COLBLUE}${pcat}/${COLDEFAULT}"   echo -ne "${COLBLUE}${pcat}/${COLDEFAULT}"
2432   echo -e "${COLRED}${pname}-${pver}-${pbuild}${COLDEFAULT}"   echo -e "${COLRED}${pname}-${pver}-${pbuild}${COLDEFAULT}"
2433    
2434   magefile="${INSTALLDB}/${pcat}/${pname}-${pver}-${pbuild}/${pname}-${pver}-${pbuild}.mage"   magefile="${MROOT}${INSTALLDB}/${pcat}/${pname}-${pver}-${pbuild}/${pname}-${pver}-${pbuild}.mage"
2435   source ${magefile}   source ${magefile}
2436    
2437   ## preremove scripts   ## preremove scripts
# Line 2530  pkgsearch() Line 2530  pkgsearch()
2530   local ipver   local ipver
2531   local ipbuild   local ipbuild
2532   local latest_available   local latest_available
2533     local depsfull
2534     local sdepsfull
2535     local deps
2536     local sdeps
2537     local dep
2538     local sign
2539    
2540   # only names no versions   # only names no versions
2541   result="$(find ${MAGEDIR} -mindepth 2 -maxdepth 2 -type d -name '*'${string}'*'| sed '/profiles/d' | sed '/includes/d')"   result="$(find ${MAGEDIR} -mindepth 2 -maxdepth 2 -type d -name '*'${string}'*'| sed '/profiles/d' | sed '/includes/d')"
# Line 2585  pkgsearch() Line 2591  pkgsearch()
2591   latest_available="${COLRED}masked for this distribution.${COLDEFAULT}"   latest_available="${COLRED}masked for this distribution.${COLDEFAULT}"
2592   fi   fi
2593    
2594     depsfull="$(get_value_from_magefile DEPEND ${magefile})"
2595     sdepsfull="$(get_value_from_magefile SDEPEND ${magefile})"
2596    
2597     while read sign dep
2598     do
2599     case ${dep} in
2600     "") continue;;
2601     esac
2602    
2603     deps="${deps} $(basename ${dep%-*})"
2604     done << EOF
2605    ${depsfull}
2606    EOF
2607    
2608     while read sign dep
2609     do
2610     case ${dep} in
2611     "") continue;;
2612     esac
2613    
2614     sdeps="${sdeps} $(basename ${dep%-*})"
2615     done << EOF
2616    ${sdepsfull}
2617    EOF
2618    
2619   echo -e "${state}${pcat}/${pname}"${COLDEFAULT}   echo -e "${state}${pcat}/${pname}"${COLDEFAULT}
2620   echo -e "      Latest available:   ${latest_available}"   echo -e "      Latest available:   ${latest_available}"
2621   echo "      Installed versions: ${all_installed}"   echo "      Installed versions: ${all_installed}"
2622   echo "      Description: ${description}"   echo "      Description: ${description}"
2623   echo "      Homepage: ${homepage}"   echo "      Homepage: ${homepage}"
2624     echo "      Depends: ${deps}"
2625     echo "      SDepends: ${sdeps}"
2626   echo   echo
2627    
2628   unset pcat   unset pcat
# Line 2603  pkgsearch() Line 2636  pkgsearch()
2636   unset all_installed   unset all_installed
2637   unset ipver   unset ipver
2638   unset ipbuild   unset ipbuild
2639     unset depsfull
2640     unset sdepsfull
2641     unset deps
2642     unset sdeps
2643     unset dep
2644     unset sign
2645   done   done
2646  }  }
2647    

Legend:
Removed from v.451  
changed lines
  Added in v.499