Date: Thu, 6 Dec 2012 17:46:10 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r308394 - in head/ports-mgmt/portmaster: . files Message-ID: <201212061746.qB6HkAfF001798@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Thu Dec 6 17:46:10 2012 New Revision: 308394 URL: http://svnweb.freebsd.org/changeset/ports/308394 Log: - Add upstream patch for fixing bash completions with PKGNG and to respect env PORTSDIR/PKG_DBDIR Feature safe: yes Added: head/ports-mgmt/portmaster/files/patch-files-bash-completions (contents, props changed) Modified: head/ports-mgmt/portmaster/Makefile Modified: head/ports-mgmt/portmaster/Makefile ============================================================================== --- head/ports-mgmt/portmaster/Makefile Thu Dec 6 16:55:35 2012 (r308393) +++ head/ports-mgmt/portmaster/Makefile Thu Dec 6 17:46:10 2012 (r308394) @@ -2,7 +2,7 @@ PORTNAME= portmaster PORTVERSION= 3.14 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= ports-mgmt MASTER_SITES= GH \ http://mirror.shatow.net/freebsd/portmaster/ Added: head/ports-mgmt/portmaster/files/patch-files-bash-completions ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/ports-mgmt/portmaster/files/patch-files-bash-completions Thu Dec 6 17:46:10 2012 (r308394) @@ -0,0 +1,46 @@ +diff --git files/bash-completions files/bash-completions +index 2293183..d5bf298 100644 +--- files/bash-completions ++++ files/bash-completions +@@ -1,13 +1,25 @@ + # $FreeBSD$ + # ++_pkgs_list() { ++ local dbdir="$1" ++ shift 1 # the rest will be passed diretly to compgen ++ if [ -n "$(make -f /usr/share/mk/bsd.port.mk -V WITH_PKGNG)" ]; then ++ compgen -W "$(pkg info -aq)" $* ++ else ++ cd ${dbdir} && compgen -d $* ++ fi ++} ++ + _portmaster () { +- local cur ++ local cur dbdir portsdir + cur=${COMP_WORDS[COMP_CWORD]} ++ dbdir=${PKG_DBDIR:-/var/db/pkg} ++ portsdir=${PORTSDIR:-/usr/ports} + + case "$cur" in +- /usr/ports/*) ++ ${portsdir}/*) + COMPREPLY=( $( compgen -d $cur ) ) ;; +- */*) COMPREPLY=( $( compgen -d /usr/ports/$cur ) ) ;; ++ */*) COMPREPLY=( $( compgen -d ${portsdir}/$cur ) ) ;; + --*) COMPREPLY=( $( compgen -W '--force-config --show-work \ + --packages --packages-only \ + --packages-build --packages-if-newer --delete-build-only \ +@@ -20,9 +32,9 @@ _portmaster () { + --check-depends --check-port-dbdir --list-origins \ + --help --version' -- $cur ) ) + ;; +- *) COMPREPLY=( $( compgen -d /var/db/pkg/$cur ) ) +- COMPREPLY=( ${COMPREPLY[@]#/var/db/pkg/} ) +- COMPREPLY=( ${COMPREPLY[@]} $( compgen -d /usr/ports/$cur ) ) ++ *) COMPREPLY=( $(_pkgs_list ${dbdir} "${cur}" ) ) ++ COMPREPLY=( ${COMPREPLY[@]#${dbdir}/} ) ++ COMPREPLY=( ${COMPREPLY[@]} $( compgen -d ${portsdir}/$cur ) ) + COMPREPLY=( ${COMPREPLY[@]#/ports/} ) + ;; + esac \ No newline at end of file
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212061746.qB6HkAfF001798>