1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-25 01:21:09 +01:00

34335: fix bugs in _yum_all_pkgs

This commit is contained in:
Jun-ichi Takimoto 2015-01-23 23:10:33 +09:00
parent 12b813b589
commit 0833518980
2 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2015-01-23 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 34335: _yum: fix bugs in _yum_all_pkgs
2015-01-22 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 34331: Src/builtin.c, Src/utils.c: don't trip over

View file

@ -85,15 +85,14 @@ _yum()
fi
}
# Fills the installed pkg cache
# Fills the all pkg cache
_yum_all_pkgs()
{
if ( [[ ${+_all_pkgs} -eq 0 ]] || _cache_invalid ALL ) &&
! _retrieve_cache ALL;
then
local prog="yum -C list all | sed 's/\s.*//' | grep '\.'"
_all_pkgs=( $(kages $prog 2>/dev/null) )
_store_cache ALL _all_pkg
_all_pkgs=( $(yum -C list all | sed 's/\s.*//' | grep '\.' 2>/dev/null) )
_store_cache ALL _all_pkgs
fi
}
@ -227,8 +226,9 @@ _yum_list_or_info()
else
local subcmd
subcmd="${${listlist[(r)$words[2]:*]%%:*}}"
# Deal with any aliases
# offer packages selected by the subcommand
case $subcmd in
all) _yum_all;;
installed) _yum_erase;;
available) _yum_install;;
updates) _yum_update;;