From 3cba01db03111ea3398cea94c5e73493a55ce06d Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 12 Sep 2001 02:00:13 +0000 Subject: Brought over the --verify package-specification options and the updated caching policy for newer versions of rpm. --- Completion/Redhat/Command/_rpm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Completion/Redhat') diff --git a/Completion/Redhat/Command/_rpm b/Completion/Redhat/Command/_rpm index a174f1aa6..228480039 100644 --- a/Completion/Redhat/Command/_rpm +++ b/Completion/Redhat/Command/_rpm @@ -142,9 +142,9 @@ _rpm () { verify) _arguments -s \ '(-y --verify)-V' '(-V --verify)-y' '(-y -V)--verify' \ - "${commonopts[@]}" "${pathopts[@]}" \ + "${commonopts[@]}" "${packageopts[@]}" "${pathopts[@]}" \ --no{deps,md5,files} \ - '*:RPM package:->package' && ret=0 + '*:RPM package:->package_or_file' && ret=0 ;; upgrade) tmp=( '(--upgrade)-U' '(-U)--upgrade' '(--force)--oldpackage' ) @@ -272,7 +272,10 @@ _rpms_caching_policy () { oldp=( "$1"(mw+1) ) (( $#oldp )) && return 0 - [[ /var/lib/rpm/packages.rpm -nt "$1" ]] + pkg_indices=( /var/lib/rpm/{packages.rpm,Packages}(N) ) + for pkg_index in $pkg_indices; do + [[ "$pkg_index" -nt "$1" ]] && return 0 + done } _rpm "$@" -- cgit 1.4.1