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