diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-11-01 07:54:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-11-01 07:54:34 +0000 |
commit | 22c54bb67e27f453c98fc7b908298db95633a850 (patch) | |
tree | b59812b0be51e3b0c317cd6b880c243e4f63f6f0 /dev-util | |
parent | Cleanup. (diff) | |
download | gentoo-2-22c54bb67e27f453c98fc7b908298db95633a850.tar.gz gentoo-2-22c54bb67e27f453c98fc7b908298db95633a850.tar.bz2 gentoo-2-22c54bb67e27f453c98fc7b908298db95633a850.zip |
Trim empty ccache dirs automatically #517242 by Arfrever Frehtes Taifersar Arahesis.
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/ccache/ChangeLog | 6 | ||||
-rw-r--r-- | dev-util/ccache/files/ccache-config | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/dev-util/ccache/ChangeLog b/dev-util/ccache/ChangeLog index 7d186f3347e3..fc474ce90e52 100644 --- a/dev-util/ccache/ChangeLog +++ b/dev-util/ccache/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-util/ccache # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/ccache/ChangeLog,v 1.139 2014/10/22 05:04:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/ccache/ChangeLog,v 1.140 2014/11/01 07:54:34 vapier Exp $ + + 01 Nov 2014; Mike Frysinger <vapier@gentoo.org> files/ccache-config: + Trim empty ccache dirs automatically #517242 by Arfrever Frehtes Taifersar + Arahesis. *ccache-3.1.10 (22 Oct 2014) diff --git a/dev-util/ccache/files/ccache-config b/dev-util/ccache/files/ccache-config index 8c1bcb2d3734..a7dc4a04a76e 100644 --- a/dev-util/ccache/files/ccache-config +++ b/dev-util/ccache/files/ccache-config @@ -2,7 +2,7 @@ # # ccache-config - helper script for ccache and its ebuild # -# Copyright 2003-2010 Superlucidity Services, LLC +# Copyright 2003-2014 Superlucidity Services, LLC # This program licensed under the GNU GPL version 2. # # This script developed by Zachary T Welch at Superlucidity Services, LLC @@ -45,6 +45,13 @@ cc_remove_link() { c_ebegin "Removing ${t}" rm -f "${t}" c_eend + + # Trim the empty dir if possible. #517242 + t=${t%/*} + if rmdir "${t}" 2>/dev/null; then + rmdir "${t%/*}" 2>/dev/null + fi + : fi } cc_install_link() { @@ -73,7 +80,7 @@ cc_links() { [ "${a}" = "cc" ] && continue a="${2}-${a}" fi - eval "cc_${1}_link" "${a}" + "cc_${1}_link" "${a}" done } |