Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 130785 Details for
Bug 192383
Extend app-admin/python-updater to detect leftovers from python.eclass
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
python-updater-leftover_compiled_files.patch
python-updater-leftover_compiled_files.patch (text/plain), 2.10 KB, created by
Leonardo Boshell (RETIRED)
on 2007-09-13 05:27:44 UTC
(
hide
)
Description:
python-updater-leftover_compiled_files.patch
Filename:
MIME Type:
Creator:
Leonardo Boshell (RETIRED)
Created:
2007-09-13 05:27:44 UTC
Size:
2.10 KB
patch
obsolete
>--- python-updater.orig 2007-09-12 20:50:23.000000000 -0500 >+++ python-updater 2007-09-13 00:05:05.000000000 -0500 >@@ -35,6 +35,7 @@ > PKGS_TO_REMERGE="" > PKGS_COUNT_REMERGE=0 > PORTAGE_PYTHON="/usr/bin/python" >+PYTHON_MAGIC="" > > SUPPORTED_PMS="portage pkgcore paludis" > PMS_COMMAND=( "emerge" "pmerge" "paludis" ) >@@ -160,6 +161,8 @@ > einfo "Starting Python Updater from ${OLD_PY_VER} to ${NEW_PY_VER} :" > einfo "Searching for packages with files in ${OLD_MODULES_DIRS} .." > >+PYTHON_MAGIC=$(${PORTAGE_PYTHON} -c 'import imp; print imp.get_magic().encode("hex")') >+ > # iterate thru all the installed package's contents > for content in `find ${PKG_DBDIR} -name CONTENTS`; do > # extract the category, package name and package version >@@ -187,14 +190,43 @@ > CATPKGVER="=${CATPKGVER}" > fi > >+ add_current=0 >+ > for OLD_MODULES_DIR in ${OLD_MODULES_DIRS}; do > if fgrep "${OLD_MODULES_DIR}" ${content} > /dev/null; then >- PKGS_TO_REMERGE="${PKGS_TO_REMERGE} ${CATPKGVER}" >- einfo "Adding to list: ${CATPKGVER}" >+ add_current=1 > elif fgrep "${OLD_INCLUDE_DIR}" ${content} > /dev/null; then >- PKGS_TO_REMERGE="${PKGS_TO_REMERGE} ${CATPKGVER}" >+ add_current=1 > fi > done >+ >+ # Check for left-over binary files left by python.eclass >+ if [ "$add_current" -ne 1 ]; then >+ ebuild=$(ls ${content%%CONTENTS}*.ebuild) >+ binary="" >+ >+ if grep -q -E 'python_mod_compile|python_mod_optimize' \ >+ ${ebuild}; then >+ >+ for pyfile in $(fgrep .py ${content} | awk '{print $2}'); do >+ if [ -f "${pyfile}c" ]; then >+ binary="${pyfile}c" >+ break >+ fi >+ done >+ fi >+ >+ if [ -n "$binary" ]; then >+ binary_magic=$(od -An -tx1 -N 4 ${binary} | sed -e 's/\s//g') >+ >+ [ "${binary_magic}" != "${PYTHON_MAGIC}" ] && add_current=1 >+ fi >+ fi >+ >+ if [ "$add_current" -eq 1 ]; then >+ einfo "Adding to list: ${CATPKGVER}" >+ PKGS_TO_REMERGE="${PKGS_TO_REMERGE} ${CATPKGVER}" >+ fi > done > > # only pretending?
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 192383
: 130785