Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 213451 Details for
Bug 292113
app-admin/eselect-{rails,ruby}: support brief output mode
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for ruby and rails eselect modules
0001-Support-eselect-brief-output-mode-bug-292113.patch (text/plain), 3.50 KB, created by
Ulrich Müller
on 2009-12-19 08:19:28 UTC
(
hide
)
Description:
Patch for ruby and rails eselect modules
Filename:
MIME Type:
Creator:
Ulrich Müller
Created:
2009-12-19 08:19:28 UTC
Size:
3.50 KB
patch
obsolete
>From a4bafb434551bfd735692f82add736bc67217f8e Mon Sep 17 00:00:00 2001 >From: Ulrich Mueller <ulm@gentoo.org> >Date: Sat, 19 Dec 2009 09:20:19 +0100 >Subject: [PATCH] Support eselect --brief output mode, bug 292113. > >Signed-off-by: Ulrich Mueller <ulm@gentoo.org> >--- > eselect-rails/rails.eselect | 27 ++++++++++--------------- > eselect-ruby/ruby.eselect | 45 +++++++++++++++++++----------------------- > 2 files changed, 31 insertions(+), 41 deletions(-) > >diff --git a/eselect-rails/rails.eselect b/eselect-rails/rails.eselect >index 62791e3..afdb80e 100644 >--- a/eselect-rails/rails.eselect >+++ b/eselect-rails/rails.eselect >@@ -1,10 +1,10 @@ >-# Copyright 1999-2007 Gentoo Foundation >+# Copyright 1999-2009 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Id: vi.eselect 261 2006-03-30 21:11:55Z kugelfang $ >+# $Id$ > > DESCRIPTION="Manage Ruby on Rails versions" > MAINTAINER="graaff@gentoo.org" >-SVN_DATE='$Date: 2006-03-30 23:11:55 +0200 (gio, 30 mar 2006) $' >+SVN_DATE='$Date: $' > VERSION=$(svn_date_to_version "${SVN_DATE}" ) > > RAILS="${ROOT}/usr/bin/rails" >@@ -101,19 +101,14 @@ do_list() { > fi > > local i targets >- targets=( $(find_targets ) ) >- if [[ -n ${targets[@]} ]] ; then >- for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do >- [[ ${targets[${i}]} = \ >- $(basename $(canonicalise ${ROOT}/usr/bin/rails) ) ]] && >- targets[${i}]="${targets[${i}]} $(highlight '*')" >- >- done >- write_list_start "Available Ruby on Rails versions:" >- write_numbered_list "${targets[@]}" >- else >- write_kv_list_entry "(none found)" "" >- fi >+ targets=( $(find_targets) ) >+ for (( i = 0; i < ${#targets[@]}; i++ )); do >+ [[ ${targets[i]} = \ >+ $(basename "$(canonicalise "${ROOT}/usr/bin/rails")") ]] \ >+ && targets[i]=$(highlight_marker "${targets[i]}") >+ done >+ write_list_start "Available Ruby on Rails versions:" >+ write_numbered_list -m "(none found)" "${targets[@]}" > } > > ### set action ### >diff --git a/eselect-ruby/ruby.eselect b/eselect-ruby/ruby.eselect >index 47eda4d..1f10672 100644 >--- a/eselect-ruby/ruby.eselect >+++ b/eselect-ruby/ruby.eselect >@@ -1,4 +1,4 @@ >-# Copyright 1999-2008 Gentoo Foundation >+# Copyright 1999-2009 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 > # $Id$ > >@@ -128,30 +128,25 @@ describe_list() { > > do_list() { > write_list_start "Available Ruby profiles:" >- local targets=( $(find_targets ) ) >- >- if [[ ${#targets[@]} -ne 0 ]] ; then >- local i >- for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do >- local line="$(basename ${targets[${i}]} )" >- >- # Do we have a matching rubygems? >- if [[ -e ${targets[${i}]/ruby/gem} ]] ; then >- line="${line} (with Rubygems)" >- fi >- >- >- # find out the current version >- if [[ ${targets[${i}]} = $(canonicalise ${ROOT}${bindir}/ruby) ]] ; then >- targets[${i}]="${line} $(highlight '*' )" >- else >- targets[${i}]=${line} >- fi >- done >- write_numbered_list "${targets[@]}" >- else >- write_kv_list_entry "(none found)" "" >- fi >+ local targets=( $(find_targets) ) >+ local i line >+ >+ for (( i = 0; i < ${#targets[@]}; i++ )) ; do >+ line=$(basename "${targets[i]}") >+ >+ # Do we have a matching rubygems? >+ if [[ -e ${targets[i]/ruby/gem} ]] ; then >+ line="${line} (with Rubygems)" >+ fi >+ >+ # find out the current version >+ if [[ ${targets[i]} = $(canonicalise "${ROOT}${bindir}/ruby") ]] ; then >+ targets[i]=$(highlight_marker "${line}") >+ else >+ targets[i]=${line} >+ fi >+ done >+ write_numbered_list -m "(none found)" "${targets[@]}" > } > > ### set action ### >-- >1.6.5.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 292113
: 213451