--- trunk/mage/usr/lib/mage/mage4.functions.sh 2012/01/10 15:47:08 1620 +++ trunk/mage/usr/lib/mage/mage4.functions.sh 2012/01/13 21:05:41 1650 @@ -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}" @@ -1645,20 +1645,23 @@ } -# cuts full pathnames or versionized names down to basename -choppkgname() -{ - #we want this only if full name was used - if [ -n "$(echo ${MAGENAME}|fgrep .mage)" ] - then - #cuts ARCH and PBUILD - #ARCH comes from ${MAGERC} - MAGENAME=$(echo ${MAGENAME} |sed -e "s:-${ARCH}-r*.::g") +# unused? +# +# # cuts full pathnames or versionized names down to basename +# choppkgname() +# { +# #we want this only if full name was used +# if [ -n "$(echo ${MAGENAME}|fgrep .mage)" ] +# then +# #cuts ARCH and PBUILD +# #ARCH comes from ${MAGERC} +# MAGENAME=$(echo ${MAGENAME} |sed -e "s:-${ARCH}$(print_distrotag)-r*.::g") +# +# #cuts version number +# MAGENAME=$(basename ${MAGENAME%-*} .mage) +# fi +# } - #cuts version number - MAGENAME=$(basename ${MAGENAME%-*} .mage) - fi -} # get_categorie $PNAME, returns CATEGORIE # $1=pname @@ -2999,6 +3002,7 @@ local state local descriptiom local homepage + local license local i local all_installed local ipver @@ -3035,13 +3039,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 +3055,7 @@ fi done [[ -z ${all_installed} ]] && all_installed="none" - + case ${state} in stable) state=${COLGREEN}"[s] ";; testing) state=${COLYELLOW}"[t] ";; @@ -3095,6 +3100,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,19 +3294,23 @@ 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 ;; linuxsymlink|!linuxsymlink) retval=0 ;; pkgbuild|!pkgbuild) retval=0 ;; + pkgdistrotag|!pkgdistrotag) retval=0 ;; purge|!purge) retval=0 ;; qalint|!qalint) retval=0 ;; regentree|!regentree) retval=0 ;; resume|!resume) retval=0 ;; - stepbystep|!stepbystep) 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 @@ -3326,7 +3339,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 @@ -3379,6 +3392,7 @@ fi done else + [[ ${FVERBOSE} = off ]] || echo -e "${COLRED}Unknown feature '${feature}', ignoring it${COLDEFAULT}" retval=3 fi