aboutsummaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-01-03 23:35:03 +0000
committerAvatar Fernando J. Pereda <ferdy@ferdyx.org> 2008-01-03 23:35:03 +0000
commitb3cdccec1405d42c6dea03573fc37f97aaa58e1a (patch)
tree259511f53552506c8457b56acaaa420e43ba78df /hooks
parent3102f3c540e1cdac69ffdcf8f9ad37fe60ab312c (diff)
downloadpaludis-b3cdccec1405d42c6dea03573fc37f97aaa58e1a.tar.gz
paludis-b3cdccec1405d42c6dea03573fc37f97aaa58e1a.tar.xz
Make symlink rewriting part of the merger and EAPI-configurable. Fixes ticket:351
Diffstat (limited to 'hooks')
-rw-r--r--hooks/Makefile.am.m46
-rwxr-xr-xhooks/fix_symlinks.bash56
2 files changed, 1 insertions, 61 deletions
diff --git a/hooks/Makefile.am.m4 b/hooks/Makefile.am.m4
index a32565ab3..a5c44b07a 100644
--- a/hooks/Makefile.am.m4
+++ b/hooks/Makefile.am.m4
@@ -20,8 +20,7 @@ installhookcommonprog_SCRIPTS = \
news.hook \
installable_cache_regen.bash \
installed_cache_regen.bash \
- write_cache_clean.bash \
- fix_symlinks.bash
+ write_cache_clean.bash
installhookinstallallpost_SCRIPTS = \
find_config_updates.hook
@@ -254,8 +253,6 @@ install-data-local :
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/
- ln -sf ../common/fix_symlinks.bash $(DESTDIR)/$(libexecdir)/paludis/hooks/merger_check_sym_post/
- ln -sf ../common/fix_symlinks.bash $(DESTDIR)/$(libexecdir)/paludis/hooks/merger_install_sym_post/
uninstall-local :
rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/gnu_info_index.bash
@@ -263,7 +260,6 @@ uninstall-local :
rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/log.bash
rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/news.hook
rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/write_cache_clean.bash
- rm -f $(DESTDIR)/$(libexecdir)/paludis/hooks/*/fix_symlinks.bash
Makefile.am : Makefile.am.m4
$(top_srcdir)/misc/do_m4.bash Makefile.am
diff --git a/hooks/fix_symlinks.bash b/hooks/fix_symlinks.bash
deleted file mode 100755
index 2c78212de..000000000
--- a/hooks/fix_symlinks.bash
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-# vim: set et sw=4 sts=4 :
-
-# Copyright (c) 2007 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_EBUILD_DIR}/echo_functions.bash
-
-shopt -s extglob
-
-image=$(tr -s / <<<"${IMAGE}" )
-
-case "${HOOK}" in
-
- merger_check_sym_post)
- target=$(readlink "${INSTALL_SOURCE}" | tr -s / )
- [[ "${target#${image}}" == "${target}" ]] && exit 0
-
- ewarn "Bad symlink ${INSTALL_SOURCE} -> $(readlink "${INSTALL_SOURCE}" ) will be rewritten"
- ;;
-
- merger_install_sym_post)
- target=$(readlink "${INSTALL_DESTINATION}" | tr -s / )
- [[ "${target#${image}}" == "${target}" ]] && exit 0
-
- new_target=${target#${image}}
- new_target=/${new_target##+(/)}
- ewarn "Relinking bad symlink ${INSTALL_DESTINATION} -> $(readlink \
- "${INSTALL_DESTINATION}" ) to ${new_target}"
- echo rm -f "${INSTALL_DESTINATION}" 1>&2
- rm -f "${INSTALL_DESTINATION}"
- echo ln -s "${new_target}" "${INSTALL_DESTINATION}" 1>&2
- ln -s "${new_target}" "${INSTALL_DESTINATION}"
- ;;
-
- *)
- ewarn "$0: Don't know how to respond to HOOK ${HOOK}"
- ;;
-
-esac
-
-true
-