summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2012-08-16 23:57:32 +0000
committerMike Gilbert <floppym@gentoo.org>2012-08-16 23:57:32 +0000
commitea5a710cfb50556c3a9d3fa9ed73a9c8d9d9d9f6 (patch)
tree2f276dc3df766984ed7b685d1324822b57accd50 /eclass
parentVersion bump and old version clean up (diff)
downloadhistorical-ea5a710cfb50556c3a9d3fa9ed73a9c8d9d9d9f6.tar.gz
historical-ea5a710cfb50556c3a9d3fa9ed73a9c8d9d9d9f6.tar.bz2
historical-ea5a710cfb50556c3a9d3fa9ed73a9c8d9d9d9f6.zip
Hide the python.eclass unmerge noise behind PORTAGE_VERBOSE.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog5
-rw-r--r--eclass/python.eclass14
2 files changed, 15 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index 420cbb636b0a..476aa9f48ccc 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for eclass directory
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.372 2012/08/16 07:46:15 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.373 2012/08/16 23:57:32 floppym Exp $
+
+ 16 Aug 2012; Mike Gilbert <floppym@gentoo.org> python.eclass:
+ Hide the python.eclass unmerge noise behind PORTAGE_VERBOSE.
16 Aug 2012; Patrick Lauer <patrick@gentoo.org> python.eclas:
Fix noisy output on unmerge #423741
diff --git a/eclass/python.eclass b/eclass/python.eclass
index 73cc8dda1a38..776f11dcf6a1 100644
--- a/eclass/python.eclass
+++ b/eclass/python.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.156 2012/08/16 07:46:15 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.157 2012/08/16 23:57:32 floppym Exp $
# @ECLASS: python.eclass
# @MAINTAINER:
@@ -2713,6 +2713,10 @@ python_disable_pyc() {
export PYTHONDONTWRITEBYTECODE="1"
}
+_python_vecho() {
+ [[ -z ${PORTAGE_VERBOSE} ]] || echo "$@"
+}
+
_python_clean_compiled_modules() {
_python_initialize_prefix_variables
_python_set_color_variables
@@ -2735,7 +2739,7 @@ _python_clean_compiled_modules() {
# Delete empty child directories.
find "${path}" -type d | sort -r | while read -r dir; do
if rmdir "${dir}" 2> /dev/null; then
- echo "${_CYAN}<<< ${dir}${_NORMAL}"
+ _python_vecho "<<< ${dir}"
fi
done
fi
@@ -2768,6 +2772,7 @@ _python_clean_compiled_modules() {
else
[[ -f "${py_file}" ]] && continue
fi
+ _python_vecho "<<< ${compiled_file%[co]}[co]"
rm -f "${compiled_file%[co]}"[co]
elif [[ "${compiled_file}" == *\$py.class ]]; then
if [[ "${dir}" == "__pycache__" ]]; then
@@ -2782,6 +2787,7 @@ _python_clean_compiled_modules() {
else
[[ -f "${py_file}" ]] && continue
fi
+ _python_vecho "<<< ${compiled_file}"
rm -f "${compiled_file}"
else
die "${FUNCNAME}(): Unrecognized file type: '${compiled_file}'"
@@ -2790,7 +2796,9 @@ _python_clean_compiled_modules() {
# Delete empty parent directories.
dir="${compiled_file%/*}"
while [[ "${dir}" != "${root}" ]]; do
- if ! rmdir "${dir}" 2> /dev/null; then
+ if rmdir "${dir}" 2> /dev/null; then
+ _python_vecho "<<< ${dir}"
+ else
break
fi
dir="${dir%/*}"