PYTHON_PY3K_PLIST_HACK: Take @dirrmtry entries into account as well.

When using the plist hack to add __pycache__ entries for Python >= 3.2.0,
take @dirrmtry entries into account as well, otherwise if those directories
happen to contain __pycache__ subdirectories the latter will not be removed.

CR:		D191
PR:		190847
This commit is contained in:
Raphael Kubo da Costa 2014-06-18 19:37:49 +00:00
parent 12f1dcec7a
commit 37930125af
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=358308

View file

@ -629,6 +629,7 @@ add-plist-post:
@${AWK} '\
/\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.py[co]$$/, "." mt "&"); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \
/^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \
/^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \
{print} \
END {if (sp in dirs) {print "@dirrm " sp "/" pc}} \
' \