diff options
author | Ali Polatel <hawking@gentoo.org> | 2008-10-27 00:41:47 +0000 |
---|---|---|
committer | Ali Polatel <hawking@gentoo.org> | 2008-10-27 00:41:47 +0000 |
commit | cef12d1438ead0a2ea7573d580de75e4975dc70e (patch) | |
tree | 1a1b84d641b8a4bea13d8434d203c3d273171942 | |
parent | Tag version 0.6 (diff) | |
download | python-updater-cef12d1438ead0a2ea7573d580de75e4975dc70e.tar.gz python-updater-cef12d1438ead0a2ea7573d580de75e4975dc70e.tar.bz2 python-updater-cef12d1438ead0a2ea7573d580de75e4975dc70e.zip |
Add need_rebuild check.
-rw-r--r-- | man.include | 5 | ||||
-rwxr-xr-x | python-updater | 32 |
2 files changed, 33 insertions, 4 deletions
diff --git a/man.include b/man.include index 7349419..a40faea 100644 --- a/man.include +++ b/man.include @@ -21,6 +21,11 @@ manual the package once and it's OK now. Enabled by default. +need_rebuild + This check looks for packages that have been marked to be rebuilt by the + python_need_rebuild function from python.eclass. + Enabled by default. + Checks can be enabled/disabled on command line with -e/--enable and -d/--disable switches. diff --git a/python-updater b/python-updater index dff71fb..99e6cbd 100755 --- a/python-updater +++ b/python-updater @@ -45,6 +45,7 @@ CHECK_ECLASS=0 CHECK_MANUAL=1 CHECK_PYLIBDIR=1 CHECK_SONAME=1 +CHECK_ECLASS_NEED_REBUILD=1 # load the gentoo-style info macros, but hack to get around # it thinking this is an rc script @@ -87,10 +88,11 @@ done) manager. Only for debug and script use. -eCHECK --enable-CHECK Enable CHECK where CHECK can be one of: - * eclass (Disabled by default) - * pylibdir (Enabled by default) - * soname (Enabled by default) - * manual (Enabled by default) + * eclass (Disabled by default) + * pylibdir (Enabled by default) + * soname (Enabled by default) + * manual (Enabled by default) + * need_rebuild (Enabled by default) -dCHECK --disable-CHECK Disable CHECK. See --enable option for a list of checks @@ -246,6 +248,12 @@ while [[ -n "$1" ]]; do -ds*|--disable-s*) CHECK_SONAME=0 ;; + -en*|--enable-n*) + CHECK_ECLASS_NEED_REBUILD=1 + ;; + -dn*|--disable-n*) + CHECK_ECLASS_NEED_REBUILD=0 + ;; *) usage echo "unrecognised option: $1" @@ -299,6 +307,9 @@ fi [[ CHECK_MANUAL -ne 0 ]] \ && veinfo 1 'check "manual" enabled.' \ || veinfo 1 'check "manual" disabled.' +[[ CHECK_ECLASS_NEED_REBUILD -ne 0 ]] \ + && veinfo 1 'check "need_rebuild" enabled.' \ + || veinfo 1 'check "need_rebuild" disabled.' # iterate thru all the installed package's contents for content in `find ${PKG_DBDIR} -name CONTENTS`; do @@ -348,6 +359,19 @@ for content in `find ${PKG_DBDIR} -name CONTENTS`; do continue fi + if [[ CHECK_ECLASS_NEED_REBUILD -ne 0 ]]; then + ENVIRON="${content/CONTENTS/environment.bz2}" + if bzip2 -dc ${ENVIRON} | grep -qe "^\(export \)\?PYTHON_NEED_REBUILD=${OLD_PY_VER}"; then + PKGS_TO_REMERGE="${PKGS_TO_REMERGE} ${CATPKGVER}" + eindent + einfo "Adding to list: ${CATPKGVER}" + eindent + veinfo 1 "check: need_rebuild [ Ebuild set PYTHON_NEED_REBUILD=${OLD_PY_VER} ]" + eoutdent && eoutdent + continue + fi + fi + if [[ CHECK_PYLIBDIR -ne 0 ]]; then # Search for possible old python dirs in CONTENTS # /usr/include/python$old |