Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Jeremy Olexa (darkside)" <darkside@g.o>
Subject: gentoo-x86 commit in app-admin/eselect/files: eselect-1.0.11-relative-profiles.patch
Date: Wed, 08 Apr 2009 05:36:35 +0000
darkside    09/04/08 05:36:35

  Added:                eselect-1.0.11-relative-profiles.patch
  Log:
  Make 'eselect profile show' show the relative path. Patch by Thomas Bellman in bug 248487
  (Portage version: 2.1.6.11/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  app-admin/eselect/files/eselect-1.0.11-relative-profiles.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect/files/eselect-1.0.11-relative-profiles.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect/files/eselect-1.0.11-relative-profiles.patch?rev=1.1&content-type=text/plain

Index: eselect-1.0.11-relative-profiles.patch
===================================================================
Allow relative paths to be shown instead of abs paths for eselect profile show, 

patch by Thomas Bellman in bug 248487

Already in svn.

--- modules/profile.eselect	(revision 397)
+++ modules/profile.eselect	(working copy)
@@ -83,9 +83,10 @@
 do_show() {
 	write_list_start "Current make.profile symlink:"
 	if [[ -L "${ROOT}/etc/make.profile" ]] ; then
-		local link=$(canonicalise ${ROOT}/etc/make.profile)
+		local link=$(canonicalise "${ROOT}/etc/make.profile")
 		local portdir=$(portageq portdir)
-		link=${link##..${ROOT}/${portdir}/profiles/}
+		local profiledir=$(canonicalise "${ROOT}/${portdir}/profiles")
+		link=${link##${profiledir}/}
 		write_kv_list_entry "${link}" ""
 	else
 		write_kv_list_entry "(unset)" ""
@@ -99,13 +100,15 @@
 }
 
 do_list() {
-	local active targets
+	local portdir profiledir active targets
 	targets=( $(find_targets) )
 
 	[[ -z "${targets}" ]] && die -q "Failed to get a list of valid profiles"
 
-	active=$(canonicalise ${ROOT}/etc/make.profile)
-	active=${active##*profiles/}
+	portdir=$(portageq portdir)
+	profiledir=$(canonicalise "${ROOT}/${portdir}/profiles")
+	active=$(canonicalise "${ROOT}/etc/make.profile")
+	active=${active##${profiledir}/}
 	if [[ -n ${targets[@]} ]] ; then
 		local i
 		for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do





Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in app-admin/eselect: ChangeLog eselect-1.0.11-r2.ebuild
Next by thread:
gentoo-x86 commit in app-shells/bash: bash-4.0_p17.ebuild ChangeLog
Previous by date:
gentoo-x86 commit in app-admin/eselect: ChangeLog eselect-1.0.11-r2.ebuild
Next by date:
gentoo-x86 commit in app-shells/bash: bash-4.0_p17.ebuild ChangeLog


Updated Oct 08, 2010

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.