diff options
author | Mike Frysinger <vapier@gentoo.org> | 2014-11-04 04:51:22 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2014-11-04 04:51:22 +0000 |
commit | 64925e7cff8ee948a2eb636aecdccf6ce00cc9bf (patch) | |
tree | 463c112fb5c132fc418dfb31889768d0701fad14 /dev-util | |
parent | Drop old for more repoman happy (diff) | |
download | gentoo-2-64925e7cff8ee948a2eb636aecdccf6ce00cc9bf.tar.gz gentoo-2-64925e7cff8ee948a2eb636aecdccf6ce00cc9bf.tar.bz2 gentoo-2-64925e7cff8ee948a2eb636aecdccf6ce00cc9bf.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-2 | 9 |
2 files changed, 13 insertions, 2 deletions
diff --git a/dev-util/ccache/ChangeLog b/dev-util/ccache/ChangeLog index 9d872d8c6406..fe6ccf8f8c51 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.141 2014/11/01 08:11:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/ccache/ChangeLog,v 1.142 2014/11/04 04:51:22 vapier Exp $ + + 04 Nov 2014; Mike Frysinger <vapier@gentoo.org> files/ccache-config-2: + Trim empty ccache dirs automatically #517242 by Arfrever Frehtes Taifersar + Arahesis. *ccache-3.1.10-r1 (01 Nov 2014) diff --git a/dev-util/ccache/files/ccache-config-2 b/dev-util/ccache/files/ccache-config-2 index 9253e6eff784..914f09500a37 100644 --- a/dev-util/ccache/files/ccache-config-2 +++ b/dev-util/ccache/files/ccache-config-2 @@ -48,6 +48,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() { @@ -70,7 +77,7 @@ cc_install_link() { cc_links() { local a for a in gcc cc c++ g++ icc icpc clang clang++ ; do - eval "cc_${1}_link" "${2}${2:+-}${a}" + "cc_${1}_link" "${2}${2:+-}${a}" done } |