Date: Thu, 18 Nov 2010 22:05:31 GMT From: Martin Glaß <glaszig@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/152387: bash completion (portinstall) throws errors Message-ID: <201011182205.oAIM5Vgm007012@www.freebsd.org> Resent-Message-ID: <201011182210.oAIMA8cU072473@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 152387 >Category: ports >Synopsis: bash completion (portinstall) throws errors >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 18 22:10:08 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Martin Glaß >Release: 8.0-RELEASE-p3 >Organization: >Environment: FreeBSD gate.local.net 8.0-RELEASE-p3 FreeBSD 8.0-RELEASE-p3 #1: Mon Jun 7 01:53:04 CEST 2010 email@example.com:/usr/obj/usr/src/sys/GATE-8.0 i386 >Description: i have installed the bash-completion port. it ships support for port name completion when using portinstall/portupgrade. when using portinstall, bash complains: -bash: portsdir: command not found -bash: /INDEX-.: No such file or directory -bash: /INDEX-.: No such file or directory so i dug into /usr/local/etc/bash_completion.d/portupgrade and found some typo on line 26 of that file (wrong variable and string offset). >How-To-Repeat: install bash-completion_1.2_1,1 source the bash_completion script try using portinstall >Fix: i have attached a patch. Patch attached with submission follows: --- portupgrade.orig 2010-11-18 22:42:14.000000000 +0100 +++ portupgrade 2010-11-18 22:38:10.000000000 +0100 @@ -26,7 +26,7 @@ portsdir=${PORTSDIR:-/usr/ports}/ _get_comp_words_by_ref cur prev - indexfile="$(portsdir)/INDEX-${OSTYPE:8:1}" + indexfile="$portsdir/INDEX-${OSTYPE:7:1}" [[ "$prev" == -l || "$prev" == -L || "$prev" == -o ]] && return 0 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011182205.oAIM5Vgm007012>