about summary refs log tree commit diff
path: root/Completion/Redhat/Command/_rpm
diff options
context:
space:
mode:
authorAdam Spiers <adamspiers@users.sourceforge.net>2001-08-15 13:33:49 +0000
committerAdam Spiers <adamspiers@users.sourceforge.net>2001-08-15 13:33:49 +0000
commit3df9884871ff48175fd26ecdaf7d10b472cdda5d (patch)
tree320f0ea59b42ba98695fa1fca1441279071ba020 /Completion/Redhat/Command/_rpm
parentd4e7ce1b9cb8d199e93e5842fac6a80ce43c6b7c (diff)
downloadzsh-3df9884871ff48175fd26ecdaf7d10b472cdda5d.tar.gz
zsh-3df9884871ff48175fd26ecdaf7d10b472cdda5d.tar.xz
zsh-3df9884871ff48175fd26ecdaf7d10b472cdda5d.zip
15630: update caching policy for newer versions of rpm.
Diffstat (limited to 'Completion/Redhat/Command/_rpm')
-rw-r--r--Completion/Redhat/Command/_rpm5
1 files changed, 4 insertions, 1 deletions
diff --git a/Completion/Redhat/Command/_rpm b/Completion/Redhat/Command/_rpm
index a174f1aa6..635d28989 100644
--- a/Completion/Redhat/Command/_rpm
+++ b/Completion/Redhat/Command/_rpm
@@ -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 "$@"