public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] eselect r766 - in trunk/extern: . modules
@ 2010-02-26 21:13 99% Ulrich Mueller (ulm)
  0 siblings, 0 replies; 1+ results
From: Ulrich Mueller (ulm) @ 2010-02-26 21:13 UTC (permalink / raw
  To: gentoo-commits

Author: ulm
Date: 2010-02-26 21:13:00 +0000 (Fri, 26 Feb 2010)
New Revision: 766

Modified:
   trunk/extern/ChangeLog
   trunk/extern/modules/vi.eselect
Log:
Fix handling of ROOT in symlinks, bug 260593.

Modified: trunk/extern/ChangeLog
===================================================================
--- trunk/extern/ChangeLog	2010-02-16 22:41:25 UTC (rev 765)
+++ trunk/extern/ChangeLog	2010-02-26 21:13:00 UTC (rev 766)
@@ -1,3 +1,8 @@
+2010-02-26  Ulrich Mueller  <ulm@gentoo.org>
+
+	* modules/vi.eselect (set_symlinks): Fix handling of ROOT in
+	symlinks, bug 260593.
+
 2010-02-03  Ryan Hill  <dirtyepic@gentoo.org>
 
 	* AUTHORS: Add myself.

Modified: trunk/extern/modules/vi.eselect
===================================================================
--- trunk/extern/modules/vi.eselect	2010-02-16 22:41:25 UTC (rev 765)
+++ trunk/extern/modules/vi.eselect	2010-02-26 21:13:00 UTC (rev 766)
@@ -1,5 +1,5 @@
 # -*-eselect-*-  vim: ft=eselect
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -57,7 +57,7 @@
 	local target="${1}" targets
 	if is_number "${target}" && [[ ${target} -ge 1 ]] ; then
 		targets=( $(find_targets ) )
-		target=${targets[$(( ${target} - 1 ))]}
+		target=${targets[target-1]}
 	fi
 
 	local dir
@@ -76,12 +76,13 @@
 		set_man_symlink "${target}" "view"
 
 		# it's not okay if these fail
-		ln -s "${dir}/${target}" "${ROOT}/usr/bin/vi" || \
-			die "Couldn't set ${target} /usr/bin/vi symlink"
-		ln -s "${dir}/${target}" "${ROOT}/usr/bin/ex" || \
-			die "Couldn't set ${target} /usr/bin/ex symlink"
-		ln -s "${dir}/${target}" "${ROOT}/usr/bin/view" || \
-			die "Couldn't set ${target} /usr/bin/view symlink"
+		target=$(relative_name "${dir}/${target}" "${ROOT}/usr/bin")
+		ln -s "${target}" "${ROOT}/usr/bin/vi" \
+			|| die "Couldn't set ${target} /usr/bin/vi symlink"
+		ln -s "${target}" "${ROOT}/usr/bin/ex" \
+			|| die "Couldn't set ${target} /usr/bin/ex symlink"
+		ln -s "${target}" "${ROOT}/usr/bin/view" \
+			|| die "Couldn't set ${target} /usr/bin/view symlink"
 	else
 		die -q  "Target \"${1}\" doesn't appear to be valid!"
 	fi




^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2010-02-26 21:13 99% [gentoo-commits] eselect r766 - in trunk/extern: . modules Ulrich Mueller (ulm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox