---- bash_completion/bash_completion 2005-01-04 08:37:42.000000000 +0200
-+++ /tmp/bash_completion 2006-01-02 20:18:52.000000000 +0200
-@@ -1718,12 +1723,16 @@
- {
- local i
+--- bash_completion/bash_completion 2006-03-01 22:00:59.000000000 +0200
++++ bash_completion 2006-03-01 22:06:19.000000000 +0200
+@@ -1735,17 +1735,17 @@
+ local ver nodig nosig
-- if [ -r /var/log/rpmpkgs -a \
-- /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then
-+ # refresh cache if writable
-+ if [ -w /var/cache/rpmpkgs.txt -a /var/cache/rpmpkgs.txt -ot /var/lib/rpm/Packages ]; then
-+ rpm -qa $nodig $nosig --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' | LC_ALL=C sort > /var/cache/rpmpkgs.txt
-+ fi
-+
+ # refresh cache if writable
+- if [ /var/log/rpmpkgs -ot /var/lib/rpm/Packages -a -w /var/log/rpmpkgs ]; then
++ if [ /var/cache/rpmpkgs.txt -ot /var/lib/rpm/Packages -a -w /var/cache/rpmpkgs.txt ]; then
+ # we grab the output to local variable to prevent possible race
+ local tmp=$(rpm -qa $nodig $nosig --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' | LC_ALL=C sort)
+- echo "$tmp" > /var/log/rpmpkgs
++ echo "$tmp" > /var/cache/rpmpkgs.txt
+ fi
+
+- if [ -r /var/log/rpmpkgs -a /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then
+ if [ -r /var/cache/rpmpkgs.txt -a /var/cache/rpmpkgs.txt -nt /var/lib/rpm/Packages ]; then
# using RHL 7.2 or later - this is quicker than querying the DB
COMPREPLY=( $( sed -ne \
- 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+.*\.rpm$|\1|p' \
+ 's|^\('$cur'.*\)\.rpm$|\1|p' \
- /var/log/rpmpkgs ) )
+ /var/cache/rpmpkgs.txt ) )
else
- COMPREPLY=( $( rpm -qa $nodig $nosig | sed -ne \
- 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+$|\1|p' ) )
+ nodig=""
+ nosig=""
--- bash_completion/bash_completion~ 2006-03-01 21:23:16.000000000 +0200
+++ bash_completion/bash_completion 2006-03-01 21:28:37.000000000 +0200
@@ -1742,7 +1742,7 @@
- if [ -r /var/cache/rpmpkgs.txt -a /var/cache/rpmpkgs.txt -nt /var/lib/rpm/Packages ]; then
+ if [ -r /var/log/rpmpkgs -a /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then
# using RHL 7.2 or later - this is quicker than querying the DB
COMPREPLY=( $( sed -ne \
- 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+.*\.rpm$|\1|p' \
+ 's|^\('$cur'.*\)\.rpm$|\1|p' \
- /var/cache/rpmpkgs.txt ) )
+ /var/log/rpmpkgs ) )
else
nodig=""
@@ -1757,8 +1757,7 @@
--- /dev/null
+--- bash_completion/bash_completion 2005-01-04 08:37:42.000000000 +0200
++++ bash_completion 2006-03-01 22:00:59.000000000 +0200
+@@ -1734,8 +1734,14 @@
+ {
+ local ver nodig nosig
+
+- if [ -r /var/log/rpmpkgs -a \
+- /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then
++ # refresh cache if writable
++ if [ /var/log/rpmpkgs -ot /var/lib/rpm/Packages -a -w /var/log/rpmpkgs ]; then
++ # we grab the output to local variable to prevent possible race
++ local tmp=$(rpm -qa $nodig $nosig --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' | LC_ALL=C sort)
++ echo "$tmp" > /var/log/rpmpkgs
++ fi
++
++ if [ -r /var/log/rpmpkgs -a /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then
+ # using RHL 7.2 or later - this is quicker than querying the DB
+ COMPREPLY=( $( sed -ne \
+ 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+.*\.rpm$|\1|p' \