From de7c1b6d6f511845a32f52431713e214dd82e227 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Sun, 12 Jul 2009 03:23:35 +0000 Subject: Replace --ignore-versions option with --reinstall-identical-versions option. --- python-updater | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'python-updater') diff --git a/python-updater b/python-updater index 25692f7..28fec5d 100755 --- a/python-updater +++ b/python-updater @@ -30,7 +30,7 @@ PKGS_EXCEPTIONS="dev-lang/python sys-apps/portage" PKGS_MANUAL="app-office/gnumeric app-office/dia dev-libs/boost x11-libs/vte" PRETEND=0 -IGNORE_VERSIONS=0 +REINSTALL_IDENTICAL_VERSIONS=0 VERBOSE=0 PKGS_TO_REMERGE="" PKGS_COUNT_REMERGE=0 @@ -73,9 +73,8 @@ Options: -v, --verbose Increase verbosity (may be specified multiple times) -o PYVER, --old-version PYVER Set old python version to upgrade from to PYVER - -i, --ignore-versions - Ignore versions when remerging packages - (still respects SLOTs) + --reinstall-identical-versions + Reinstall identical versions of packages -P PM, --package-manager PM Use package manager PM, where PM can be one of: $(for p in ${SUPPORTED_PMS} ; do @@ -198,8 +197,8 @@ while [[ -n "$1" ]]; do shift OLD_PY_VER="$1" ;; - -i|--ignore-versions) - IGNORE_VERSIONS=1 + --reinstall-identical-versions) + REINSTALL_IDENTICAL_VERSIONS=1 ;; -P|--package-manager) shift @@ -350,13 +349,13 @@ for content in `find ${PKG_DBDIR}/ -name CONTENTS`; do done fi - # replace version number by SLOT if IGNORE_VERSIONS != 0 - # Don't ignore versions when SLOT doesn't exist, bug 201848 - if [[ IGNORE_VERSIONS -ne 0 && -f "${content/CONTENTS/SLOT}" ]]; then + # Replace SLOT by version number when REINSTALL_IDENTICAL_VERSIONS == 1 + # Reinstall identical versions when SLOT doesn't exist, bug #201848 + if [[ REINSTALL_IDENTICAL_VERSIONS -eq 1 || ! -f "${content/CONTENTS/SLOT}" ]]; then + CATPKGVER="=${CATPKGVER}" + else SLOT=$(< ${content/CONTENTS/SLOT}) CATPKGVER="${CATPKG}:${SLOT}" - else - CATPKGVER="=${CATPKGVER}" fi if [[ ${exception} = 2 ]]; then -- cgit v1.2.3-65-gdbad