about summary refs log tree commit diff
path: root/Completion/Redhat
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2001-09-12 02:00:13 +0000
committerWayne Davison <wayned@users.sourceforge.net>2001-09-12 02:00:13 +0000
commit3cba01db03111ea3398cea94c5e73493a55ce06d (patch)
tree07ab977cb6f76e904a6cac234ab31dc40aacc681 /Completion/Redhat
parent1a295f969f035cb0c0101ba78a011c1aa7d4e623 (diff)
downloadzsh-3cba01db03111ea3398cea94c5e73493a55ce06d.tar.gz
zsh-3cba01db03111ea3398cea94c5e73493a55ce06d.tar.xz
zsh-3cba01db03111ea3398cea94c5e73493a55ce06d.zip
Brought over the --verify package-specification options and the
updated caching policy for newer versions of rpm.
Diffstat (limited to 'Completion/Redhat')
-rw-r--r--Completion/Redhat/Command/_rpm9
1 files changed, 6 insertions, 3 deletions
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 "$@"