]> git.pld-linux.org Git - packages/bash-completion.git/commitdiff
- split and rediff patches for easier upstream merge
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 1 Mar 2006 20:08:02 +0000 (20:08 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bash-completion-FHS.patch -> 1.4
    bash-completion-rpm-arch.patch -> 1.5
    bash-completion-rpm-cache.patch -> 1.1

bash-completion-FHS.patch
bash-completion-rpm-arch.patch
bash-completion-rpm-cache.patch [new file with mode: 0644]

index 2aa81192d78b5a3023fb838a0d05769cf512d338..b6e6faa1a9755d601fb506a2520f985243cc64b7 100644 (file)
@@ -1,22 +1,24 @@
---- 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=""
index 3a90351371edfb3eee651d05abc3118ef85f0cc3..051bc4082e56923d84b218d13c5658f616ccb9c9 100644 (file)
@@ -1,12 +1,12 @@
 --- 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 @@
diff --git a/bash-completion-rpm-cache.patch b/bash-completion-rpm-cache.patch
new file mode 100644 (file)
index 0000000..468f959
--- /dev/null
@@ -0,0 +1,19 @@
+--- 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' \
This page took 0.044738 seconds and 4 git commands to generate.