--- trunk/mage/usr/lib/mage/mage4.functions.sh 2011/12/29 15:12:05 1590 +++ trunk/mage/usr/lib/mage/mage4.functions.sh 2012/01/13 20:51:18 1648 @@ -66,7 +66,7 @@ case ${method} in md5) cmd="md5sum" ;; sha256) cmd="sha256sum" ;; - *) die "mchecksum(): unkown method '${method}'" ;; + *) die "mchecksum(): unknown method '${method}'" ;; esac if [[ -d ${rundir} ]] @@ -1401,10 +1401,10 @@ real_uris="$(convertmirrors ${uri})" # verbose or not - mqueryfeature "!verbose" && wget_opts="--quiet" + mqueryfeature "!verbose" && wget_opts+=" --quiet" # filter wget options if busybox was found - wget_opts="$(busybox_filter_wget_options ${WGET_FETCH_OPTIONS})" + wget_opts+=" $(busybox_filter_wget_options ${WGET_FETCH_OPTIONS})" # create outputdir [[ ! -d ${outputdir} ]] && install -d "${outputdir}" @@ -2999,6 +2999,7 @@ local state local descriptiom local homepage + local license local i local all_installed local ipver @@ -3035,13 +3036,14 @@ state="$(get_value_from_magefile STATE ${magefile})" description="$(get_value_from_magefile DESCRIPTION ${magefile})" homepage="$(get_value_from_magefile HOMEPAGE ${magefile})" - + license="$(get_value_from_magefile LICENSE ${magefile})" + # all installed for i in $(get_uninstall_candidates --pname ${pname} --pcat ${pcat}) do ipver="$(magename2pver ${i})" ipbuild="$(magename2pbuild ${i})" - + if [[ -z ${all_installed} ]] then all_installed="${ipver}-${ipbuild}" @@ -3050,7 +3052,7 @@ fi done [[ -z ${all_installed} ]] && all_installed="none" - + case ${state} in stable) state=${COLGREEN}"[s] ";; testing) state=${COLYELLOW}"[t] ";; @@ -3095,6 +3097,10 @@ echo " Installed versions: ${all_installed}" echo " Description: ${description}" echo " Homepage: ${homepage}" + if [[ ! -z ${license} ]] + then + echo " License: ${license}" + fi echo " Depends: ${deps}" echo " SDepends: ${sdeps}" echo @@ -3285,6 +3291,7 @@ ccache|!ccache) retval=0 ;; check|!check) retval=0 ;; compressdoc|!compressdoc) retval=0 ;; + debug|!debug) retval=0 ;; distcc|!distcc) retval=0 ;; kernelsrcunpack|!kernelsrcunpack) retval=0 ;; libtool|!libtool) retval=0 ;; @@ -3293,10 +3300,13 @@ purge|!purge) retval=0 ;; qalint|!qalint) retval=0 ;; regentree|!regentree) retval=0 ;; - stepbystep|!stepbystep) retval=0 ;; + resume|!resume) retval=0 ;; srcpkgbuild|!srcpkgbuild) retval=0 ;; srcpkgtarball|!srcpkgtarball) retval=0 ;; + static|!static) retval=0 ;; + stepbystep|!stepbystep) retval=0 ;; strip|!strip) retval=0 ;; + verbose|!verbose) retval=0 ;; *) retval=1 ;; esac @@ -3305,13 +3315,10 @@ load_mage_features() { - echo -en "${COLBLUE}---${COLGREEN} Loading mage-features... ${COLDEFAULT}" for i in ${MAGE_FEATURES_GLOBAL[*]} ${MAGE_FEATURES[*]} do FVERBOSE=off msetfeature ${i} done - - echo -e "${COLGREEN}done${COLDEFAULT}" } msetfeature() @@ -3328,7 +3335,7 @@ if ! known_mage_feature "${feature}" then - [[ ${FVERBOSE} = off ]] || echo "unkown feature ${feature}, ignoring it" + [[ ${FVERBOSE} = off ]] || echo -e "${COLRED}Unknown feature '${feature}', ignoring it${COLDEFAULT}" return 3 fi @@ -3336,17 +3343,17 @@ do if [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature} ]] then - [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' already enabled" + [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' already enabled${COLDEFAULT}" MAGE_FEATURES_CURRENT[${i}]="${feature}" found=1 elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = !${feature} ]] then - [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' currently disabled, enabling it!" + [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' currently disabled, enabling it!${COLDEFAULT}" MAGE_FEATURES_CURRENT[${i}]="${feature}" found=1 elif [[ ${MAGE_FEATURES_CURRENT[${i}]} = ${feature//!} ]] then - [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature//!}' currently enabled, disabling it!" + [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature//!}' currently enabled, disabling it!${COLDEFAULT}" MAGE_FEATURES_CURRENT[${i}]="${feature}" found=1 fi @@ -3356,7 +3363,7 @@ # it was not declared. in this case enable it if [[ ${found} = 0 ]] then - [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' was not declared, enabling it!" + [[ ${FVERBOSE} = off ]] || echo -e "${COLBLUE}---${COLGREEN} Feature '${feature}' was not declared, enabling it!${COLDEFAULT}" MAGE_FEATURES_CURRENT=( ${MAGE_FEATURES_CURRENT[*]} "${feature}" ) fi @@ -3381,6 +3388,7 @@ fi done else + [[ ${FVERBOSE} = off ]] || echo -e "${COLRED}Unknown feature '${feature}', ignoring it${COLDEFAULT}" retval=3 fi