commit: f0f07f3166c116b5dcd56f15e482eefdfc84b9f5 Author: Aaron W. Swenson <aaron <AT> grandmasfridge <DOT> org> AuthorDate: Sun Jan 14 15:47:05 2018 +0000 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org> CommitDate: Sun Jan 14 15:47:05 2018 +0000 URL: https://gitweb.gentoo.org/proj/postgresql/eselect.git/commit/?id=f0f07f31
Force symlinks Any symlink we’re trying to make should only be handled by us. We may come across a symlink we missed in some previous clean up, but really should be set properly rather than failing because it exists. postgresql.eselect | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/postgresql.eselect b/postgresql.eselect index 51d7f50..aa89b49 100644 --- a/postgresql.eselect +++ b/postgresql.eselect @@ -97,7 +97,7 @@ linker() { # Create relative links so that they work both here and inside the new # root if $ROOT is not "/". rel_source=$(relative_name "${link_source}" "${target_dir}") - ln -s "${rel_source}" "${link_target}" || die -q "Unable to create link!" + ln -sf "${rel_source}" "${link_target}" || die -q "Unable to create link!" done } @@ -225,7 +225,7 @@ do_set() { # root if $ROOT is not "/" rel_source=$(relative_name "${include_sources[$i]}" "$(dirname "${INCLUDE_TARGETS[$i]}")") - ln -s "$rel_source" "${INCLUDE_TARGETS[$i]}" || \ + ln -sf "$rel_source" "${INCLUDE_TARGETS[$i]}" || \ die -q "Unable to create link! $rel_source -> ${INCLUDE_TARGETS[$i]}" done @@ -235,7 +235,7 @@ do_set() { if [[ -d "${USR_PATH}/${x}/postgresql-${slot}/${x}" ]] ; then # 'linker' function doesn't work for linking directories. # Default lib path - create a relative link - ln -s "postgresql-${slot}/${x}" "${USR_PATH}/${x}/postgresql" + ln -sf "postgresql-${slot}/${x}" "${USR_PATH}/${x}/postgresql" # Linker works for files linker "${USR_PATH}/${x}/postgresql-${slot}/${x}/" \ @@ -264,7 +264,7 @@ do_set() { # Default share path - use a relative link here by just specifying the # base name - ln -s "postgresql-${slot}" "${USR_PATH}/share/postgresql" + ln -sf "postgresql-${slot}" "${USR_PATH}/share/postgresql" echo "success!" }