diff options
author | Aaron W. Swenson <aaron@grandmasfridge.org> | 2018-10-21 06:57:46 -0400 |
---|---|---|
committer | Aaron W. Swenson <aaron@grandmasfridge.org> | 2018-10-21 06:57:46 -0400 |
commit | 1cf8648293a946af9989c1a6094708160bbe38da (patch) | |
tree | 3256e18606a6b07709000472365dc7301975894d | |
parent | Bump to 2.4 (diff) | |
download | eselect-1cf8648293a946af9989c1a6094708160bbe38da.tar.gz eselect-1cf8648293a946af9989c1a6094708160bbe38da.tar.bz2 eselect-1cf8648293a946af9989c1a6094708160bbe38da.zip |
In some conditions, ln will follow symlinks it isn’t supposed to. Add
the -n switch to keep that from happening.
Closes: https://bugs.gentoo.org/662810
-rw-r--r-- | postgresql.eselect | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/postgresql.eselect b/postgresql.eselect index 3614202..4283ee9 100644 --- a/postgresql.eselect +++ b/postgresql.eselect @@ -94,7 +94,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 -sf "${rel_source}" "${link_target}" || \ + ln -sfn "${rel_source}" "${link_target}" || \ die -q "SYMLINK FAILED: ${rel_source} -> ${link_target}" done } @@ -223,7 +223,7 @@ do_set() { # root if $ROOT is not "/" rel_source=$(relative_name "${include_sources[$i]}" "$(dirname "${INCLUDE_TARGETS[$i]}")") - ln -sf "$rel_source" "${INCLUDE_TARGETS[$i]}" || \ + ln -sfn "$rel_source" "${INCLUDE_TARGETS[$i]}" || \ die -q "SYMLINK FAILED: $rel_source -> ${INCLUDE_TARGETS[$i]}" done @@ -233,7 +233,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 -sf "postgresql-${slot}/${x}" "${USR_PATH}/${x}/postgresql" || \ + ln -sfn "postgresql-${slot}/${x}" "${USR_PATH}/${x}/postgresql" || \ die -q "SYMLINK FAILED: postgresql-${slot}/${x} -> ${USR_PATH}/${x}/postgresql" # Linker works for files @@ -263,7 +263,7 @@ do_set() { # Default share path - use a relative link here by just specifying the # base name - ln -sf "postgresql-${slot}" "${USR_PATH}/share/postgresql" || \ + ln -sfn "postgresql-${slot}" "${USR_PATH}/share/postgresql" || \ die -q "SYMLINK FAILED: postgresql-${slot} -> ${USR_PATH}/share/postgresql" echo "success!" |