Magellan Linux

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

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

revision 1549 by niro, Tue Dec 27 10:43:40 2011 UTC revision 1648 by niro, Fri Jan 13 20:51:18 2012 UTC
# Line 66  mchecksum() Line 66  mchecksum()
66   case ${method} in   case ${method} in
67   md5) cmd="md5sum" ;;   md5) cmd="md5sum" ;;
68   sha256) cmd="sha256sum" ;;   sha256) cmd="sha256sum" ;;
69   *) die "mchecksum(): unkown method '${method}'" ;;   *) die "mchecksum(): unknown method '${method}'" ;;
70   esac   esac
71    
72   if [[ -d ${rundir} ]]   if [[ -d ${rundir} ]]
# Line 206  install_directories() Line 206  install_directories()
206   while read pathto posix user group   while read pathto posix user group
207   do   do
208   [ -z "${pathto}" ] && continue   [ -z "${pathto}" ] && continue
209   [[ ${VERBOSE} = on ]] && echo -e "\t>>> DIR:  ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t>>> DIR:  ${MROOT}${pathto}"
210    
211   # monitors /etc/env.d -> env-rebuild   # monitors /etc/env.d -> env-rebuild
212   [[ ${pathto} = /etc/env.d ]] && export MAGE_ENV_REBUILD=true   [[ ${pathto} = /etc/env.d ]] && export MAGE_ENV_REBUILD=true
# Line 282  install_files() Line 282  install_files()
282   case ${retval} in   case ${retval} in
283   # file is not protected - (over)write it   # file is not protected - (over)write it
284   0|3)   0|3)
285   [[ ${VERBOSE} = on ]] && echo -e "\t>>> FILE: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t>>> FILE: ${MROOT}${pathto}"
286   install -m "${posix}" -o "${user}" -g "${group}" \   install -m "${posix}" -o "${user}" -g "${group}" \
287   ${BUILDDIR}/${pkgname}/binfiles/"${pathto}" \   ${BUILDDIR}/${pkgname}/binfiles/"${pathto}" \
288   "${MROOT}${pathto}"   "${MROOT}${pathto}"
# Line 300  install_files() Line 300  install_files()
300    
301   # file is protected, write backup file   # file is protected, write backup file
302   2)   2)
303   if [[ ${VERBOSE} = on ]]   if mqueryfeature "verbose"
304   then   then
305   echo -en "${COLRED}"   echo -en "${COLRED}"
306   echo -n "! prot "   echo -n "! prot "
# Line 331  install_files() Line 331  install_files()
331    
332   # file is protected but ignored, delete the update/do nothing   # file is protected but ignored, delete the update/do nothing
333   4)   4)
334   if [[ ${VERBOSE} = on ]]   if mqueryfeature "verbose"
335   then   then
336   echo -en "${COLRED}"   echo -en "${COLRED}"
337   echo -n "! ignr "   echo -n "! ignr "
# Line 390  install_symlinks() Line 390  install_symlinks()
390   while read pathto posix link mtime   while read pathto posix link mtime
391   do   do
392   [ -z "${pathto}" ] && continue   [ -z "${pathto}" ] && continue
393   [[ ${VERBOSE} = on ]] && echo -e "\t>>> LINK: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t>>> LINK: ${MROOT}${pathto}"
394    
395   ln -snf "${link}" "${MROOT}${pathto}"   ln -snf "${link}" "${MROOT}${pathto}"
396    
# Line 440  install_blockdevices() Line 440  install_blockdevices()
440   while read pathto posix major minor user group   while read pathto posix major minor user group
441   do   do
442   [ -z "${pathto}" ] && continue   [ -z "${pathto}" ] && continue
443   [[ ${VERBOSE} = on ]] && echo -e "\t>>> PIPE: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t>>> PIPE: ${MROOT}${pathto}"
444    
445   mknod -m "${posix}" "${MROOT}${pathto}"   mknod -m "${posix}" "${MROOT}${pathto}"
446   # make it optional atm !!   # make it optional atm !!
# Line 484  install_characterdevices() Line 484  install_characterdevices()
484   while read pathto posix major minor user group   while read pathto posix major minor user group
485   do   do
486   [ -z "${pathto}" ] && continue   [ -z "${pathto}" ] && continue
487   [[ ${VERBOSE} = on ]] && echo -e "\t>>> CHAR: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t>>> CHAR: ${MROOT}${pathto}"
488    
489   mknod -m ${posix} "${MROOT}${pathto}" b "${major}" "${minor}"   mknod -m ${posix} "${MROOT}${pathto}" b "${major}" "${minor}"
490    
# Line 528  install_fifos() Line 528  install_fifos()
528   while read pathto posix user group   while read pathto posix user group
529   do   do
530   [ -z "${pathto}" ] && continue   [ -z "${pathto}" ] && continue
531   [[ ${VERBOSE} = on ]] && echo -e "\t>>> FIFO: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t>>> FIFO: ${MROOT}${pathto}"
532    
533   mkfifo -m "${posix}" "${MROOT}${pathto}"   mkfifo -m "${posix}" "${MROOT}${pathto}"
534   chown "${user}:${group}" "${MROOT}${pathto}"   chown "${user}:${group}" "${MROOT}${pathto}"
# Line 862  remove_symlinks() Line 862  remove_symlinks()
862   [ -z "${pathto}" ] && continue   [ -z "${pathto}" ] && continue
863   if [ ! -L "${MROOT}${pathto}" ]   if [ ! -L "${MROOT}${pathto}" ]
864   then   then
865   [[ ${VERBOSE} = on ]] && \   mqueryfeature "verbose" && \
866   echo -e "${COLRED}! exist${COLDEFAULT} === LINK: ${MROOT}${pathto}"   echo -e "${COLRED}! exist${COLDEFAULT} === LINK: ${MROOT}${pathto}"
867   continue   continue
868   fi   fi
# Line 874  remove_symlinks() Line 874  remove_symlinks()
874   # 1=keep me   #   # 1=keep me   #
875   case ${retval} in   case ${retval} in
876   0)   0)
877   [[ ${VERBOSE} = on ]] && echo -e "\t<<< LINK: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t<<< LINK: ${MROOT}${pathto}"
878   rm "${MROOT}${pathto}"   rm "${MROOT}${pathto}"
879   ;;   ;;
880    
881   1)   1)
882   [[ ${VERBOSE} = on ]] && \   mqueryfeature "verbose" && \
883   echo -e "${COLRED}! mtime${COLDEFAULT} === LINK: ${MROOT}${pathto}"   echo -e "${COLRED}! mtime${COLDEFAULT} === LINK: ${MROOT}${pathto}"
884   ;;   ;;
885   esac   esac
# Line 946  remove_files() Line 946  remove_files()
946    
947   if [ ! -e "${MROOT}${pathto}" ]   if [ ! -e "${MROOT}${pathto}" ]
948   then   then
949   [[ ${VERBOSE} = on ]] && \   mqueryfeature "verbose" && \
950   echo -e "${COLRED}! exist${COLDEFAULT} === FILE: ${MROOT}${pathto}"   echo -e "${COLRED}! exist${COLDEFAULT} === FILE: ${MROOT}${pathto}"
951   continue   continue
952   fi   fi
# Line 972  remove_files() Line 972  remove_files()
972   case ${retval} in   case ${retval} in
973   # file is not protected - delete it   # file is not protected - delete it
974   0|3)   0|3)
975   [[ ${VERBOSE} = on ]] && echo -e "\t<<< FILE: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t<<< FILE: ${MROOT}${pathto}"
976   rm "${MROOT}${pathto}"   rm "${MROOT}${pathto}"
977   ;;   ;;
978    
979   # file is protected, do not delete   # file is protected, do not delete
980   2)   2)
981   if [[ ${VERBOSE} = on ]]   if mqueryfeature "verbose"
982   then   then
983   echo -en "${COLRED}"   echo -en "${COLRED}"
984   echo -n "! prot "   echo -n "! prot "
# Line 989  remove_files() Line 989  remove_files()
989    
990   # file is protected but ignored, delete the update/do nothing   # file is protected but ignored, delete the update/do nothing
991   4)   4)
992   if [[ ${VERBOSE} = on ]]   if mqueryfeature "verbose"
993   then   then
994   echo -en "${COLRED}"   echo -en "${COLRED}"
995   echo -n "! ignr "   echo -n "! ignr "
# Line 1001  remove_files() Line 1001  remove_files()
1001   esac   esac
1002   ;;   ;;
1003   1)   1)
1004   [[ ${VERBOSE} = on ]] && \   mqueryfeature "verbose" && \
1005   echo -e "${COLRED}! mtime${COLDEFAULT} === FILE: ${MROOT}${pathto}"   echo -e "${COLRED}! mtime${COLDEFAULT} === FILE: ${MROOT}${pathto}"
1006   ;;   ;;
1007   esac   esac
# Line 1063  remove_blockdevices() Line 1063  remove_blockdevices()
1063   do   do
1064   [ -z "${pathto}" ] && continue   [ -z "${pathto}" ] && continue
1065    
1066   [[ ${VERBOSE} = on ]] && echo -e "\t<<< PIPE: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t<<< PIPE: ${MROOT}${pathto}"
1067   rm "${MROOT}${pathto}"   rm "${MROOT}${pathto}"
1068   done < ${MROOT}${INSTALLDB}/${pfull}/.pipes   done < ${MROOT}${INSTALLDB}/${pfull}/.pipes
1069    
# Line 1123  remove_characterdevices() Line 1123  remove_characterdevices()
1123   do   do
1124   [ -z "${pathto}" ] && continue   [ -z "${pathto}" ] && continue
1125    
1126   [[ ${VERBOSE} = on ]] && echo -e "\t<<< CHAR: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t<<< CHAR: ${MROOT}${pathto}"
1127   rm "${MROOT}${pathto}"   rm "${MROOT}${pathto}"
1128   done < ${MROOT}${INSTALLDB}/${pfull}/.char   done < ${MROOT}${INSTALLDB}/${pfull}/.char
1129    
# Line 1185  remove_fifos() Line 1185  remove_fifos()
1185   do   do
1186   [ -z "${pathto}" ] && continue   [ -z "${pathto}" ] && continue
1187    
1188   [[ ${VERBOSE} = on ]] && echo -e "\t<<< FIFO: ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t<<< FIFO: ${MROOT}${pathto}"
1189   rm "${MROOT}${pathto}"   rm "${MROOT}${pathto}"
1190   done < ${MROOT}${INSTALLDB}/${pfull}/.fifo   done < ${MROOT}${INSTALLDB}/${pfull}/.fifo
1191    
# Line 1246  remove_directories() Line 1246  remove_directories()
1246    
1247   if [ ! -d "${MROOT}${pathto}" ]   if [ ! -d "${MROOT}${pathto}" ]
1248   then   then
1249   [[ ${VERBOSE} = on ]] && \   mqueryfeature "verbose" && \
1250   echo -e "${COLRED}! exist${COLDEFAULT} === DIR:  ${MROOT}${pathto}"   echo -e "${COLRED}! exist${COLDEFAULT} === DIR:  ${MROOT}${pathto}"
1251   continue   continue
1252   fi   fi
# Line 1254  remove_directories() Line 1254  remove_directories()
1254   # exclude .keep directories   # exclude .keep directories
1255   if [ -f "${MROOT}${pathto}/.keep" ]   if [ -f "${MROOT}${pathto}/.keep" ]
1256   then   then
1257   [[ ${VERBOSE} = on ]] && \   mqueryfeature "verbose" && \
1258   echo -e "${COLRED}! .keep${COLDEFAULT} === DIR:  ${MROOT}${pathto}"   echo -e "${COLRED}! .keep${COLDEFAULT} === DIR:  ${MROOT}${pathto}"
1259   continue   continue
1260   fi   fi
# Line 1267  remove_directories() Line 1267  remove_directories()
1267    
1268   if rmdir "${MROOT}${pathto}" &> /dev/null   if rmdir "${MROOT}${pathto}" &> /dev/null
1269   then   then
1270   [[ ${VERBOSE} = on ]] && echo -e "\t<<< DIR:  ${MROOT}${pathto}"   mqueryfeature "verbose" && echo -e "\t<<< DIR:  ${MROOT}${pathto}"
1271   else   else
1272   [[ ${VERBOSE} = on ]] && \   mqueryfeature "verbose" && \
1273   echo -e "${COLRED}! empty${COLDEFAULT} === DIR:  ${MROOT}${pathto}"   echo -e "${COLRED}! empty${COLDEFAULT} === DIR:  ${MROOT}${pathto}"
1274   fi   fi
1275   done   done
# Line 1401  mdownload() Line 1401  mdownload()
1401   real_uris="$(convertmirrors ${uri})"   real_uris="$(convertmirrors ${uri})"
1402    
1403   # verbose or not   # verbose or not
1404   [[ ${VERBOSE} = off ]] && wget_opts="--quiet"   mqueryfeature "!verbose" && wget_opts+=" --quiet"
1405    
1406   # filter wget options if busybox was found   # filter wget options if busybox was found
1407   wget_opts="$(busybox_filter_wget_options ${WGET_FETCH_OPTIONS})"   wget_opts+=" $(busybox_filter_wget_options ${WGET_FETCH_OPTIONS})"
1408    
1409   # create outputdir   # create outputdir
1410   [[ ! -d ${outputdir} ]] && install -d "${outputdir}"   [[ ! -d ${outputdir} ]] && install -d "${outputdir}"
# Line 1488  fetch_packages() Line 1488  fetch_packages()
1488   echo -ne " ${COLBLUE}***${COLDEFAULT}"   echo -ne " ${COLBLUE}***${COLDEFAULT}"
1489   echo -e " fetching (${count_current}/${count_total}): ${pkg} ... "   echo -e " fetching (${count_current}/${count_total}): ${pkg} ... "
1490   mdownload --uri "package://${pkg}" --dir "${PKGDIR}" || die "Could not download ${pkg}"   mdownload --uri "package://${pkg}" --dir "${PKGDIR}" || die "Could not download ${pkg}"
   
1491   if [ ! -f ${PKGDIR}/${pkg} ]   if [ ! -f ${PKGDIR}/${pkg} ]
1492   then   then
1493   die "Package '${pkg}' after download not found in '${PKGDIR}'"   die "Package '${pkg}' after download not found in '${PKGDIR}'"
# Line 1551  syncmage_tarball() Line 1550  syncmage_tarball()
1550    
1551   echo -ne "${COLBLUE} --- ${COLDEFAULT}"   echo -ne "${COLBLUE} --- ${COLDEFAULT}"
1552   echo "fetching latest md5 from ${mymirr} ..."   echo "fetching latest md5 from ${mymirr} ..."
1553   [[ ${VERBOSE} = off ]] && opt="--quiet"   mqueryfeature "!verbose" && opt="--quiet"
1554   wget \   wget \
1555   ${wget_opts} \   ${wget_opts} \
1556   --directory-prefix=${temp} \   --directory-prefix=${temp} \
# Line 1738  get_highest_magefile() Line 1737  get_highest_magefile()
1737   then   then
1738   HIGHEST_MAGEFILE=${magefile}   HIGHEST_MAGEFILE=${magefile}
1739   #for debug only   #for debug only
1740   [[ ${MAGEDEBUG} = on ]] && echo "HIGHEST_MAGEFILE=${HIGHEST_MAGEFILE}"   mqueryfeature "debug" && echo "HIGHEST_MAGEFILE=${HIGHEST_MAGEFILE}"
1741   fi   fi
1742   done   done
1743    
# Line 2146  minclude() Line 2145  minclude()
2145   then   then
2146   for i in $*   for i in $*
2147   do   do
2148   [[ ${MAGEDEBUG} = on ]] && \   mqueryfeature "debug" && \
2149   echo "--- Including ${MAGEDIR}/include/${i}.minc"   echo "--- Including ${MAGEDIR}/include/${i}.minc"
2150   source ${MAGEDIR}/include/${i}.minc   source ${MAGEDIR}/include/${i}.minc
2151   done   done
2152   [[ ${MAGEDEBUG} = on ]] && echo   mqueryfeature "debug" && echo
2153   fi   fi
2154  }  }
2155    
# Line 3000  pkgsearch() Line 2999  pkgsearch()
2999   local state   local state
3000   local descriptiom   local descriptiom
3001   local homepage   local homepage
3002     local license
3003   local i   local i
3004   local all_installed   local all_installed
3005   local ipver   local ipver
# Line 3036  pkgsearch() Line 3036  pkgsearch()
3036   state="$(get_value_from_magefile STATE ${magefile})"   state="$(get_value_from_magefile STATE ${magefile})"
3037   description="$(get_value_from_magefile DESCRIPTION ${magefile})"   description="$(get_value_from_magefile DESCRIPTION ${magefile})"
3038   homepage="$(get_value_from_magefile HOMEPAGE ${magefile})"   homepage="$(get_value_from_magefile HOMEPAGE ${magefile})"
3039     license="$(get_value_from_magefile LICENSE ${magefile})"
3040    
3041   # all installed   # all installed
3042   for i in $(get_uninstall_candidates --pname ${pname} --pcat ${pcat})   for i in $(get_uninstall_candidates --pname ${pname} --pcat ${pcat})
3043   do   do
3044   ipver="$(magename2pver ${i})"   ipver="$(magename2pver ${i})"
3045   ipbuild="$(magename2pbuild ${i})"   ipbuild="$(magename2pbuild ${i})"
3046    
3047   if [[ -z ${all_installed} ]]   if [[ -z ${all_installed} ]]
3048   then   then
3049   all_installed="${ipver}-${ipbuild}"   all_installed="${ipver}-${ipbuild}"
# Line 3051  pkgsearch() Line 3052  pkgsearch()
3052   fi   fi
3053   done   done
3054   [[ -z ${all_installed} ]] && all_installed="none"   [[ -z ${all_installed} ]] && all_installed="none"
3055    
3056   case ${state} in   case ${state} in
3057   stable) state=${COLGREEN}"[s] ";;   stable) state=${COLGREEN}"[s] ";;
3058   testing) state=${COLYELLOW}"[t] ";;   testing) state=${COLYELLOW}"[t] ";;
# Line 3096  EOF Line 3097  EOF
3097   echo "      Installed versions: ${all_installed}"   echo "      Installed versions: ${all_installed}"
3098   echo "      Description: ${description}"   echo "      Description: ${description}"
3099   echo "      Homepage: ${homepage}"   echo "      Homepage: ${homepage}"
3100     if [[ ! -z ${license} ]]
3101     then
3102     echo "      License:  ${license}"
3103     fi
3104   echo "      Depends: ${deps}"   echo "      Depends: ${deps}"
3105   echo "      SDepends: ${sdeps}"   echo "      SDepends: ${sdeps}"
3106   echo   echo
# Line 3136  export_inherits() Line 3141  export_inherits()
3141   eval "${functions}() { ${include}_${functions} ; }"   eval "${functions}() { ${include}_${functions} ; }"
3142    
3143   # debug   # debug
3144   [[ ${MAGEDEBUG} = on ]] && typeset -f "${functions}"   mqueryfeature "debug" && typeset -f "${functions}"
3145    
3146   shift   shift
3147   done   done
# Line 3274  have_root_privileges() Line 3279  have_root_privileges()
3279    
3280   return ${retval}   return ${retval}
3281  }  }
3282    
3283    known_mage_feature()
3284    {
3285     local feature="$1"
3286     local retval
3287    
3288     case "${feature}" in
3289     autosvc|!autosvc) retval=0 ;;
3290     buildlog|!buildlog) retval=0 ;;
3291     ccache|!ccache) retval=0 ;;
3292     check|!check) retval=0 ;;
3293     compressdoc|!compressdoc) retval=0 ;;
3294     debug|!debug) retval=0 ;;
3295     distcc|!distcc) retval=0 ;;
3296     kernelsrcunpack|!kernelsrcunpack) retval=0 ;;
3297     libtool|!libtool) retval=0 ;;
3298     linuxsymlink|!linuxsymlink) retval=0 ;;
3299     pkgbuild|!pkgbuild) retval=0 ;;
3300     purge|!purge) retval=0 ;;
3301     qalint|!qalint) retval=0 ;;
3302     regentree|!regentree) retval=0 ;;
3303     resume|!resume) retval=0 ;;
3304     srcpkgbuild|!srcpkgbuild) retval=0 ;;
3305     srcpkgtarball|!srcpkgtarball) retval=0 ;;
3306     static|!static) retval=0 ;;
3307     stepbystep|!stepbystep) retval=0 ;;
3308     strip|!strip) retval=0 ;;
3309     verbose|!verbose) retval=0 ;;
3310     *) retval=1 ;;
3311     esac
3312    
3313     return "${retval}"
3314    }
3315    
3316    load_mage_features()
3317    {
3318     for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]}
3319     do
3320     FVERBOSE=off msetfeature ${i}
3321     done
3322    }
3323    
3324    msetfeature()
3325    {
3326     local feature
3327     local count
3328     local i
3329     local found
3330    
3331     for feature in $@
3332     do
3333     found=0
3334     count="${#MAGE_FEATURES_CURRENT[*]}"
3335    
3336     if ! known_mage_feature "${feature}"
3337     then
3338     [[ ${FVERBOSE} = off ]] || echo -e "${COLRED}Unknown feature '${feature}', ignoring it${COLDEFAULT}"
3339     return 3
3340     fi
3341    
3342     for ((i=0; i<count; i++))
3343     do
3344     if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]]
3345     then
3346     [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' already enabled${COLDEFAULT}"
3347     MAGE_FEATURES_CURRENT[${i}]="${feature}"
3348     found=1
3349     elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]]
3350     then
3351     [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' currently disabled, enabling it!${COLDEFAULT}"
3352     MAGE_FEATURES_CURRENT[${i}]="${feature}"
3353     found=1
3354     elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]]
3355     then
3356     [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature//!}' currently enabled, disabling it!${COLDEFAULT}"
3357     MAGE_FEATURES_CURRENT[${i}]="${feature}"
3358     found=1
3359     fi
3360     done
3361    
3362     # if the feature was not found after proccessing the whole array
3363     # it was not declared. in this case enable it
3364     if [[ ${found} = 0 ]]
3365     then
3366     [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' was not declared, enabling it!${COLDEFAULT}"
3367     MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" )
3368     fi
3369    
3370     export MAGE_FEATURE_CURRENT
3371     done
3372    }
3373    
3374    mqueryfeature()
3375    {
3376     local feature="$1"
3377     local retval=1
3378     local i
3379    
3380     if known_mage_feature "${feature}"
3381     then
3382     for i in ${MAGE_FEATURES_CURRENT[*]}
3383     do
3384     if [[ ${i} = ${feature} ]]
3385     then
3386     retval=0
3387     break # found break here
3388     fi
3389     done
3390     else
3391     [[ ${FVERBOSE} = off ]] || echo -e "${COLRED}Unknown feature '${feature}', ignoring it${COLDEFAULT}"
3392     retval=3
3393     fi
3394    
3395     return ${retval}
3396    }
3397    
3398    mprintfeatures()
3399    {
3400     echo "Global features:  ${MAGE_FEATURES_GLOBAL[*]}"
3401     echo "Local features:   ${MAGE_FEATURES[*]}"
3402     echo "Current features: ${MAGE_FEATURES_CURRENT[*]}"
3403    }

Legend:
Removed from v.1549  
changed lines
  Added in v.1648