aboutsummaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-04-27 22:24:32 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2009-04-27 22:24:32 +0100
commitc3e8cf81afbed97fddb6d653b1c5c608a34713eb (patch)
tree845f6f68e37ff52ceed2027d920874ea601aa9cb /hooks
parentdd166c6563ad44ad6b75c0fcb13d13789580ca15 (diff)
downloadpaludis-c3e8cf81afbed97fddb6d653b1c5c608a34713eb.tar.gz
paludis-c3e8cf81afbed97fddb6d653b1c5c608a34713eb.tar.xz
Only invalidate expired write cache entries
Diffstat (limited to 'hooks')
-rw-r--r--hooks/Makefile.am.m46
-rwxr-xr-xhooks/write_cache_clean.bash41
2 files changed, 1 insertions, 46 deletions
diff --git a/hooks/Makefile.am.m4 b/hooks/Makefile.am.m4
index b9eefb756..772078dc6 100644
--- a/hooks/Makefile.am.m4
+++ b/hooks/Makefile.am.m4
@@ -18,8 +18,7 @@ installhookcommonprog_SCRIPTS = \
eselect_env_update.bash \
log.bash \
installable_cache_regen.bash \
- installed_cache_regen.bash \
- write_cache_clean.bash
+ installed_cache_regen.bash
installhookautoprog_SCRIPTS = \
news.hook \
@@ -48,7 +47,6 @@ EXTRA_DIST = \
log.bash \
installable_cache_regen.bash \
installed_cache_regen.bash \
- write_cache_clean.bash \
news.hook.in \
find_config_updates.hook \
$(installhookinstallpost_SCRIPTS) \
@@ -260,7 +258,6 @@ install-data-local :
ln -sf ../common/log.bash $(DESTDIR)/$(libexecdir)/paludis/hooks/sync_pre/
ln -sf ../common/log.bash $(DESTDIR)/$(libexecdir)/paludis/hooks/sync_post/
ln -sf ../common/installable_cache_regen.bash $(DESTDIR)/$(libexecdir)/paludis/hooks/sync_all_post/
- ln -sf ../common/write_cache_clean.bash $(DESTDIR)/$(libexecdir)/paludis/hooks/sync_all_post/
ln -sf ../common/installed_cache_regen.bash $(DESTDIR)/$(libexecdir)/paludis/hooks/install_post/
ln -sf ../common/installed_cache_regen.bash $(DESTDIR)/$(libexecdir)/paludis/hooks/uninstall_post/
ln -sf ../common/installed_cache_regen.bash $(DESTDIR)/$(libexecdir)/paludis/hooks/clean_post/
@@ -269,7 +266,6 @@ uninstall-local :
rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/gnu_info_index.bash
rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/eselect_env_update.bash
rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/log.bash
- rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/write_cache_clean.bash
Makefile.am : Makefile.am.m4
$(top_srcdir)/misc/do_m4.bash Makefile.am
diff --git a/hooks/write_cache_clean.bash b/hooks/write_cache_clean.bash
deleted file mode 100755
index ab02e863f..000000000
--- a/hooks/write_cache_clean.bash
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env bash
-# vim: set et sw=4 sts=4 :
-
-# Copyright (c) 2007, 2008 Ciaran McCreesh
-#
-# This file is part of the Paludis package manager. Paludis is free software;
-# you can redistribute it and/or modify it under the terms of the GNU General
-# Public License, version 2, as published by the Free Software Foundation.
-#
-# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA
-
-export PATH="$(${PALUDIS_EBUILD_DIR}/utils/canonicalise ${PALUDIS_EBUILD_DIR}/utils/ ):${PATH}"
-source ${PALUDIS_ECHO_FUNCTIONS_DIR:-${PALUDIS_EBUILD_DIR}}/echo_functions.bash
-
-[[ -n "${PALUDIS_NO_WRITE_CACHE_CLEAN}" ]] && exit 0
-
-echo
-einfo_unhooked "Cleaning write cache for ebuild format repositories..."
-
-while read repo ; do
- wcloc=$(${PALUDIS_COMMAND} --configuration-variable ${repo} write_cache )
-
- [[ $(canonicalise ${wcloc} ) == "/var/empty" ]] && continue
- wcloc="${wcloc}/${repo}"
-
- [[ $(echo "${wcloc}"/* ) != "${wcloc}/*" ]] || continue
- echo rm -fr "${wcloc}/*"
- rm -fr "${wcloc}"/* || eerror "Couldn't clear cache for ${repo} at ${wcloc}"
-
-done < <(${PALUDIS_COMMAND} --list-repositories --repository-format ebuild | \
- sed -n -e '/^\*/s,^\*\s*,,p' )
-
-einfo_unhooked "Done cleaning write cache for ebuild format repositories"
-