]> git.pld-linux.org Git - packages/bash-completion.git/blob - bash-completion-FHS.patch
- pass --nodigest and --nosignature params when refreshing rpm -qa cache
[packages/bash-completion.git] / bash-completion-FHS.patch
1 --- bash_completion/bash_completion     2005-01-04 08:37:42.000000000 +0200
2 +++ /tmp/bash_completion        2006-01-02 20:18:52.000000000 +0200
3 @@ -1718,12 +1723,16 @@
4  {
5         local i
6  
7 -       if [ -r /var/log/rpmpkgs -a \
8 -               /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then
9 +       # refresh cache if writable
10 +       if [ -w /var/cache/rpmpkgs.txt -a /var/cache/rpmpkgs.txt -ot /var/lib/rpm/Packages ]; then
11 +               rpm -qa $nodig $nosig --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' | LC_ALL=C sort > /var/cache/rpmpkgs.txt
12 +       fi
13 +
14 +       if [ -r /var/cache/rpmpkgs.txt -a /var/cache/rpmpkgs.txt -nt /var/lib/rpm/Packages ]; then
15                 # using RHL 7.2 or later - this is quicker than querying the DB
16                 COMPREPLY=( $( sed -ne \
17                 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+.*\.rpm$|\1|p' \
18 -                               /var/log/rpmpkgs ) )
19 +                               /var/cache/rpmpkgs.txt ) )
20         else
21                 COMPREPLY=( $( rpm -qa $nodig $nosig | sed -ne \
22                 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+$|\1|p' ) )
This page took 0.088352 seconds and 3 git commands to generate.