Gentoo Archives: gentoo-commits

From: Aaron Swenson <titanofold@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/postgresql/eselect:master commit in: /
Date: Sun, 21 Oct 2018 11:00:36
Message-Id: 1540119466.1cf8648293a946af9989c1a6094708160bbe38da.titanofold@gentoo
1 commit: 1cf8648293a946af9989c1a6094708160bbe38da
2 Author: Aaron W. Swenson <aaron <AT> grandmasfridge <DOT> org>
3 AuthorDate: Sun Oct 21 10:57:46 2018 +0000
4 Commit: Aaron Swenson <titanofold <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 21 10:57:46 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/postgresql/eselect.git/commit/?id=1cf86482
7
8 Do not dereference links
9
10 In some conditions, ln will follow symlinks it isn’t supposed to. Add
11 the -n switch to keep that from happening.
12
13 Closes: https://bugs.gentoo.org/662810
14
15 postgresql.eselect | 8 ++++----
16 1 file changed, 4 insertions(+), 4 deletions(-)
17
18 diff --git a/postgresql.eselect b/postgresql.eselect
19 index 3614202..4283ee9 100644
20 --- a/postgresql.eselect
21 +++ b/postgresql.eselect
22 @@ -94,7 +94,7 @@ linker() {
23 # Create relative links so that they work both here and inside the new
24 # root if $ROOT is not "/".
25 rel_source=$(relative_name "${link_source}" "${target_dir}")
26 - ln -sf "${rel_source}" "${link_target}" || \
27 + ln -sfn "${rel_source}" "${link_target}" || \
28 die -q "SYMLINK FAILED: ${rel_source} -> ${link_target}"
29 done
30 }
31 @@ -223,7 +223,7 @@ do_set() {
32 # root if $ROOT is not "/"
33 rel_source=$(relative_name "${include_sources[$i]}" "$(dirname "${INCLUDE_TARGETS[$i]}")")
34
35 - ln -sf "$rel_source" "${INCLUDE_TARGETS[$i]}" || \
36 + ln -sfn "$rel_source" "${INCLUDE_TARGETS[$i]}" || \
37 die -q "SYMLINK FAILED: $rel_source -> ${INCLUDE_TARGETS[$i]}"
38 done
39
40 @@ -233,7 +233,7 @@ do_set() {
41 if [[ -d "${USR_PATH}/${x}/postgresql-${slot}/${x}" ]] ; then
42 # 'linker' function doesn't work for linking directories.
43 # Default lib path - create a relative link
44 - ln -sf "postgresql-${slot}/${x}" "${USR_PATH}/${x}/postgresql" || \
45 + ln -sfn "postgresql-${slot}/${x}" "${USR_PATH}/${x}/postgresql" || \
46 die -q "SYMLINK FAILED: postgresql-${slot}/${x} -> ${USR_PATH}/${x}/postgresql"
47
48 # Linker works for files
49 @@ -263,7 +263,7 @@ do_set() {
50
51 # Default share path - use a relative link here by just specifying the
52 # base name
53 - ln -sf "postgresql-${slot}" "${USR_PATH}/share/postgresql" || \
54 + ln -sfn "postgresql-${slot}" "${USR_PATH}/share/postgresql" || \
55 die -q "SYMLINK FAILED: postgresql-${slot} -> ${USR_PATH}/share/postgresql"
56
57 echo "success!"