summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Linux/_rpm17
2 files changed, 16 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 827687d4c..dd49d765a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-29  Adam Spiers  <adam@spiers.net>
+
+	* 11017: Completion/Linux/_rpm: fixes for --rmsource and
+	--recompile options, and for breakage caused by 10772
+
 2000-04-28  Bart Schaefer  <schaefer@zsh.org>
 
 	* 11015: Src/builtin.c, Src/hashtable.c, Src/signals.c:
diff --git a/Completion/Linux/_rpm b/Completion/Linux/_rpm
index 6db97889a..6fa9d0098 100644
--- a/Completion/Linux/_rpm
+++ b/Completion/Linux/_rpm
@@ -70,8 +70,9 @@ _arguments -C -s \
   '--erase:*:uninstall:->uninstall' \
   -'b+[build mode (spec file)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages)):*:build:->build_b' \
   -'t+[build mode (tar file)]:build stage:((p\:execute\ \%prep\ stage l\:do\ a\ list\ check c\:execute\ build\ stage i\:execute\ install\ stage b\:build\ a\ binary\ package a\:build\ binary\ and\ source\ packages)):*:build:->build_t' \
-  --{rmsource,recompile,resign,addsign}':*:RPM package:->package' \
-  '--rebuild:*:Src RPM files:->package_src' \
+  --{resign,addsign}':*:RPM package:->package' \
+  '--rmsource:*:spec file:->spec_file' \
+  --{rebuild,recompile}':*:Src RPM files:->package_src' \
     '-K+[signature check mode]:*:sigcheck:->sigcheck' \
   '--checksig:*:sigcheck:->sigcheck' \
   '--rebuilddb:*:rebuild:->rebuild' && ret=0
@@ -187,24 +188,28 @@ while [[ -n "$state" ]]; do
       '--dbpath:RPM database path:_files -/' \
       '*:RPM source package file:->package_file' && ret=0
     ;;
-  package_or_file)
-    state=package_file
-    ;&
   target)
     _wanted target expl 'Target platforms' \
         compadd $(_call target rpm --showrc |grep 'compatible archs'|sed 's/.*: //') && ret=0
     ;;
+  package_or_file)
+    state=package_file
+    ;&
   package)
     _wanted packages expl 'RPM package' \
         compadd -M 'r:|-=* r:|=*' - $(_call packages rpm -qa) && ret=0
     ;;
+  spec_file)
+    _wanted specfiles expl 'spec file' \
+        _files -g \*.spec && ret=0
+    ;;
   package_file)
     if compset -P ftp://; then
       _hosts -S/ && ret=0
     else
       _alternative \
           'files:RPM package file:_files -g \*.\(\#i\)rpm' \
-	  'prefixes:ftp URL prefix:compadd ftp://' && ret=0
+          'prefixes:ftp URL prefix:compadd ftp://' && ret=0
     fi
     ;;
   package_src)