Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150416 - cleaning orphaned python bytecode more thoroughly in python.eclass
Summary: cleaning orphaned python bytecode more thoroughly in python.eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-07 14:38 UTC by Fabian Groffen
Modified: 2007-05-06 19:34 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (python.patch,517 bytes, patch)
2006-10-07 14:40 UTC, Fabian Groffen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fabian Groffen gentoo-dev 2006-10-07 14:38:32 UTC
From Michael Haubenwallner:

Found this while preparing for another clean bootstrap, looking for
files left after the 'emerge -C':

$ cd var/db/pkg
$ emerge -C */*
$ cd ../../..
$ find . <some intelligent prunes to avoid finding cache & usr/portage>

patch (also attached)
@@ -217,11 +217,11 @@

        for path in ${SEARCH_PATH}; do
                einfo "Cleaning orphaned Python bytecode from ${path} .."
-               for obj in $(find ${path} -name *.pyc); do
-                       src_py="${obj%c}"
+               for obj in $(find ${path} -name *.py[co]); do
+                       src_py="${obj%[co]}"
                        if [ ! -f "${src_py}" ]; then
-                               einfo "Purging ${src_py}[co]"
-                               rm -f ${src_py}[co]
+                               einfo "Purging ${obj}"
+                               rm -f ${obj}
                        fi
                done
                # attempt to remove directories that maybe empty
Comment 1 Fabian Groffen gentoo-dev 2006-10-07 14:40:24 UTC
Created attachment 99081 [details, diff]
patch
Comment 2 Bryan Østergaard (RETIRED) gentoo-dev 2007-05-06 19:34:51 UTC
I fixed this quite a while ago.