]> git.pld-linux.org Git - packages/bash-completion.git/commitdiff
- merged bash-completion-FHS.patch bash-completion-rpm-arch.patch
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 8 Jan 2008 01:09:49 +0000 (01:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- always pass --nodigest --nosignature to rpm command

Changed files:
    bash-completion-rpm-cache.patch -> 1.2

bash-completion-rpm-cache.patch

index 468f95905c9422bc7558b6faa702c3b13f4e6128..7f8190e8915a54504896d92ba7edcc1bdee1429e 100644 (file)
@@ -1,19 +1,42 @@
---- 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 @@
+--- bash_completion/bash_completion~   2006-03-01 18:20:18.000000000 +0200
++++ bash_completion/bash_completion    2008-01-08 02:50:17.000000000 +0200
+@@ -1732,29 +1732,20 @@
+ #
+ _rpm_installed_packages()
  {
-       local ver nodig nosig
--      if [ -r /var/log/rpmpkgs -a \
--              /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then
+-      local ver nodig nosig
 +      # 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
++              local tmp=$(rpm -qa --nodigest --nosignature --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' | LC_ALL=C sort)
++              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/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'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+.*\.rpm$|\1|p' \
+-                              /var/log/rpmpkgs ) )
++              's|^\('$cur'.*\)\.rpm$|\1|p' \
++                              /var/cache/rpmpkgs.txt ) )
+       else
+-              nodig=""
+-              nosig=""
+-              ver=$(rpm --version)
+-              ver=${ver##* }
+-        
+-              if [[ "$ver" > "4.0.4" ]]; then
+-                      nodig="--nodigest"
+-              fi
+-              if [[ "$ver" > "4.0.99" ]]; then
+-                      nosig="--nosignature"
+-              fi
+-
+-              COMPREPLY=( $( rpm -qa $nodig $nosig | sed -ne \
+-              's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+$|\1|p' ) )
++              COMPREPLY=( $( rpm -qa --nodigest --nosignature --qf '%{name}-%{version}-%{release}.%{arch}\n' "$cur*" ) )
+       fi
+ }
This page took 0.0704360000000001 seconds and 4 git commands to generate.