ports/152387: bash completion (portinstall) throws errors
Martin Glaß
glaszig at gmail.com
Thu Nov 18 22:10:08 UTC 2010
>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 at 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:
More information about the freebsd-ports-bugs
mailing list