Index: python-updater =================================================================== --- python-updater (revision 15) +++ python-updater (working copy) @@ -169,11 +169,12 @@ for content in `find ${PKG_DBDIR} -name CONTENTS`; do # extract the category, package name and package version CATPKGVER=$(echo ${content} | sed "s:${PKG_DBDIR}/\(.*\)/CONTENTS:\1:") + CATPKG="${CATPKGVER%%-[0-9]*}" # exclude packages that are an exception, like portage and python itself. exception=0 for exp in ${PKGS_EXCEPTIONS}; do - if [ -n "$(echo ${CATPKGVER} | grep ${exp})" ]; then + if [ -z "${CATPKG##${exp}}" ]; then exception=1 break; fi @@ -186,7 +187,7 @@ # Check if package is in PKGS_MANUAL if [[ DIRECT_ONLY -ne 1 ]]; then for pkg in ${PKGS_MANUAL}; do - if [ -n "$(echo ${CATPKGVER} | grep ${pkg})" ]; then + if [ -z "${CATPKG##${pkg}}" ]; then exception=2 break; fi @@ -197,7 +198,7 @@ # replace version number by SLOT if IGNORE_VERSIONS != 0 if [[ IGNORE_VERSIONS -ne 0 ]]; then - CATPKGVER="${CATPKGVER%%-[0-9]*}:${SLOT}" + CATPKGVER="${CATPKG}:${SLOT}" else CATPKGVER="=${CATPKGVER}" fi