Gentoo Archives: gentoo-commits

From: "Arfrever Frehtes Taifersar Arahesis (arfrever)" <arfrever@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: python.eclass
Date: Sat, 29 May 2010 16:39:21
Message-Id: 20100529163913.E9B922CF37@corvid.gentoo.org
1 arfrever 10/05/29 16:39:13
2
3 Modified: python.eclass
4 Log:
5 Fix deletion of empty parent directories in _python_clean_compiled_modules().
6
7 Revision Changes Path
8 1.100 eclass/python.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python.eclass?rev=1.100&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python.eclass?rev=1.100&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python.eclass?r1=1.99&r2=1.100
13
14 Index: python.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/python.eclass,v
17 retrieving revision 1.99
18 retrieving revision 1.100
19 diff -u -r1.99 -r1.100
20 --- python.eclass 25 May 2010 19:49:54 -0000 1.99
21 +++ python.eclass 29 May 2010 16:39:13 -0000 1.100
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2010 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.99 2010/05/25 19:49:54 arfrever Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.100 2010/05/29 16:39:13 arfrever Exp $
27
28 # @ECLASS: python.eclass
29 # @MAINTAINER:
30 @@ -1923,7 +1923,9 @@
31 if [[ "${EBUILD_PHASE}" == "postrm" ]]; then
32 # Delete empty child directories.
33 find "${path}" -type d | sort -r | while read -r dir; do
34 - rmdir "${dir}" 2> /dev/null && echo "${_CYAN}<<< ${dir}${_NORMAL}"
35 + if rmdir "${dir}" 2> /dev/null; then
36 + echo "${_CYAN}<<< ${dir}${_NORMAL}"
37 + fi
38 done
39 fi
40 elif [[ "${path}" == *.py ]]; then
41 @@ -1979,8 +1981,8 @@
42 # Delete empty parent directories.
43 dir="${compiled_file%/*}"
44 while [[ "${dir}" != "${root}" ]]; do
45 - if rmdir "${compiled_file%/*}" 2> /dev/null; then
46 - echo "${_CYAN}<<< ${compiled_file%/*}${_NORMAL}"
47 + if rmdir "${dir}" 2> /dev/null; then
48 + echo "${_CYAN}<<< ${dir}${_NORMAL}"
49 else
50 break
51 fi