Permalink
Browse files

fix #98

(update gentoo completions to reflect current portage files state)

Signed-off-by: Vadim A. Misbakh-Soloviov <mva@mva.name>
  • Loading branch information...
1 parent 589938f commit b0e171924ee20e38e2ecc2dc0f3ec7edf700f2c9 @msva msva committed Sep 5, 2012
Showing with 46 additions and 27 deletions.
  1. +1 −1 src/_baselayout
  2. +1 −1 src/_eselect
  3. +2 −2 src/_gcc-config
  4. +1 −1 src/_genlop
  5. +32 −16 src/_gentoo_packages
  6. +1 −1 src/_gentoolkit
  7. +1 −1 src/_layman
  8. +1 −1 src/_portage
  9. +6 −3 src/_portage_utils
View
@@ -34,7 +34,7 @@
# Authors
# -------
#
-# * Vadim A. Misbakh-Soloviev <mva@mva.name>
+# * Vadim A. Misbakh-Soloviov <mva@mva.name>
# * Bapt <bapt@tuxfamily.org>
# * kaworu <kaworu@kaworu.ch>
# * David Durrleman <dualmoo@gmail.com>
View
@@ -35,7 +35,7 @@
# Authors
# -------
#
-# * Vadim A. Misbakh-Soloviev <mva@mva.name>
+# * Vadim A. Misbakh-Soloviov <mva@mva.name>
# * Bapt <bapt@tuxfamily.org>
# * kaworu <kaworu@kaworu.ch>
# * David Durrleman <dualmoo@gmail.com>
View
@@ -34,7 +34,7 @@
# Authors
# -------
#
-# * Vadim A. Misbakh-Soloviev <mva@mva.name>
+# * Vadim A. Misbakh-Soloviov <mva@mva.name>
# * Bapt <bapt@tuxfamily.org>
# * kaworu <kaworu@kaworu.ch>
# * David Durrleman <dualmoo@gmail.com>
@@ -48,7 +48,7 @@ local arguments
arguments=(
'(- :)'{--use-old,-O}'[use the old profile if one was selected]'
- '(- :)'{--use-portage-chost,-P}'[only set profile if its CHOST matches /etc/make.conf]:profiles:_gcc_profile'
+ '(- :)'{--use-portage-chost,-P}'[only set profile if its CHOST matches /etc/{portage/}make.conf]:profiles:_gcc_profile'
'(- :)'{--get-current-profile,-c}'[print current used gcc profile]'
'(- :)'{--list-profiles,-l}'[print a list of available profiles]'
'(- :)'{--print-environ,-E}'[print environment of the given/current profile]:profiles:_gcc_profile'
View
@@ -34,7 +34,7 @@
# Authors
# -------
#
-# * Vadim A. Misbakh-Soloviev <mva@mva.name>
+# * Vadim A. Misbakh-Soloviov <mva@mva.name>
# * Bapt <bapt@tuxfamily.org>
# * kaworu <kaworu@kaworu.ch>
# * David Durrleman <dualmoo@gmail.com>
View
@@ -35,7 +35,7 @@
# Authors
# -------
#
-# * Vadim A. Misbakh-Soloviev <mva@mva.name>
+# * Vadim A. Misbakh-Soloviov <mva@mva.name>
# * Bapt <bapt@tuxfamily.org>
# * kaworu <kaworu@kaworu.ch>
# * David Durrleman <dualmoo@gmail.com>
@@ -47,7 +47,7 @@
# List installed overlays
_gentoo_packages_overlays () {
- for f in /etc/make.conf /etc/make.globals; do
+ for f in /etc/portage/make.conf /etc/make.conf /usr/share/portage/config/make.globals; do
[[ -z "$PORTDIR_OVERLAY" && -r "$f" ]] &&
local PORTDIR_OVERLAY="`. "$f" 2>/dev/null; echo ${PORTDIR_OVERLAY}`"
done
@@ -66,10 +66,12 @@ _gentoo_packages_sets() {
_gentoo_packages_licenses () {
local licenses var PORTDIR
var=PORTDIR
+ [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
+ local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.globals ]] &&
- local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
+ [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
+ local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
licenses=($PORTDIR/licenses/*(:t))
compadd $licenses
}
@@ -78,10 +80,12 @@ _gentoo_packages_licenses () {
_gentoo_packages_useflag(){
local flags var PORTDIR
var=PORTDIR
+ [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
+ local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.globals ]] &&
- local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
+ [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
+ local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
flags=( ${${(M)${(f)"$(<$PORTDIR/profiles/use.desc)"}:#* - *}%% - *}
${${${(M)${(f)"$(<$PORTDIR/profiles/use.local.desc)"}#* - *}%% - *}#*:} )
@@ -91,6 +95,8 @@ _gentoo_packages_useflag(){
_gentoo_packages_active_useflag(){
local flags var USE
var=USE
+ [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
+ local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
flags=(${${${=USE}%-*}%\\*})
@@ -99,10 +105,12 @@ _gentoo_packages_active_useflag(){
_gentoo_packages_category(){
local var trees category
for var in PORTDIR PORTDIR_OVERLAY ; do
+ [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
+ local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.globals ]] &&
- local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
+ [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
+ local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
done
trees=($PORTDIR $=PORTDIR_OVERLAY)
category=( $trees/*-*(/:t) )
@@ -136,10 +144,12 @@ _gentoo_packages_available_pkgnames_only(){
local var trees packages
for var in PORTDIR PORTDIR_OVERLAY ; do
+ [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
+ local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.globals ]] &&
- local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
+ [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
+ local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
done
trees=( $PORTDIR $=PORTDIR_OVERLAY)
@@ -151,10 +161,12 @@ _gentoo_packages_available(){
local var trees category packages pkg expl
for var in PORTDIR PORTDIR_OVERLAY ; do
+ [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
+ local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.globals ]] &&
- local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
+ [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
+ local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
done
trees=( $PORTDIR $=PORTDIR_OVERLAY)
category=( $trees/*-*(/:t) )
@@ -179,10 +191,12 @@ _gentoo_packages_available_versions(){
local var overlay_ebuilds portage_ebuilds expl trees category
for var in PORTDIR PORTDIR_OVERLAY ; do
+ [[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
+ local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
- [[ -z ${(P)var} && -r /etc/make.globals ]] &&
- local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
+ [[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
+ local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
done
trees=($PORTDIR $=PORTDIR_OVERLAY)
category=( $trees/*-*(/:t) )
@@ -199,10 +213,12 @@ _gentoo_packages_available_versions(){
#Function to show tbz2 files available
_gentoo_packages_binary() {
+ [[ -z $PKGDIR && -r /etc/portage/make.conf ]] &&
+ local PKGDIR="`. /etc/portage/make.conf 2>/dev/null; echo $PKGDIR`"
[[ -z $PKGDIR && -r /etc/make.conf ]] &&
local PKGDIR="`. /etc/make.conf 2>/dev/null; echo $PKGDIR`"
- [[ -z $PKGDIR && -r /etc/make.globals ]] &&
- local PKGDIR="`. /etc/make.globals 2>/dev/null; echo $PKGDIR`"
+ [[ -z $PKGDIR && -r /usr/share/portage/config/make.globals ]] &&
+ local PKGDIR="`. /usr/share/portage/config/make.globals 2>/dev/null; echo $PKGDIR`"
# this doesn't take care of ${PORTAGE_BINHOST}. If Gentoo official
# binary mirror will be available we should rewrite it accordingly.
View
@@ -35,7 +35,7 @@
# Authors
# -------
#
-# * Vadim A. Misbakh-Soloviev <mva@mva.name>
+# * Vadim A. Misbakh-Soloviov <mva@mva.name>
# * Bapt <bapt@tuxfamily.org>
# * kaworu <kaworu@kaworu.ch>
# * David Durrleman <dualmoo@gmail.com>
View
@@ -34,7 +34,7 @@
# Authors
# -------
#
-# * Vadim A. Misbakh-Soloviev <mva@mva.name>
+# * Vadim A. Misbakh-Soloviov <mva@mva.name>
# * Bapt <bapt@tuxfamily.org>
# * kaworu <kaworu@kaworu.ch>
# * David Durrleman <dualmoo@gmail.com>
View
@@ -36,7 +36,7 @@
# Authors
# -------
#
-# * Vadim A. Misbakh-Soloviev <mva@mva.name>
+# * Vadim A. Misbakh-Soloviov <mva@mva.name>
# * Bapt <bapt@tuxfamily.org>
# * kaworu <kaworu@kaworu.ch>
# * David Durrleman <dualmoo@gmail.com>
View
@@ -35,7 +35,7 @@
# Authors
# -------
#
-# * Vadim A. Misbakh-Soloviev <mva@mva.name>
+# * Vadim A. Misbakh-Soloviov <mva@mva.name>
# * Bapt <bapt@tuxfamily.org>
# * kaworu <kaworu@kaworu.ch>
# * David Durrleman <dualmoo@gmail.com>
@@ -48,10 +48,13 @@
local common_args PORTDIR var
var=PORTDIR
+[[ -z ${(P)var} && -r /etc/portage/make.conf ]] &&
+local $var="`. /etc/portage/make.conf 2>/dev/null; echo ${(P)var}`"
[[ -z ${(P)var} && -r /etc/make.conf ]] &&
local $var="`. /etc/make.conf 2>/dev/null; echo ${(P)var}`"
-[[ -z ${(P)var} && -r /etc/make.globals ]] &&
-local $var="`. /etc/make.globals 2>/dev/null; echo ${(P)var}`"
+[[ -z ${(P)var} && -r /usr/share/portage/config/make.globals ]] &&
+local $var="`. /usr/share/portage/config/make.globals 2>/dev/null; echo ${(P)var}`"
+
common_args=(
{'(--verbose)-v','(-v)--verbose'}'[Make a lot of noise]' \
{'(--quiet)-q','(-q)--quiet'}'[Tighter output; suppress warnings]' \

0 comments on commit b0e1719

Please sign in to comment.