zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: Update _bsd_pkg
@ 2022-03-31  3:48 Matthew Martin
  0 siblings, 0 replies; only message in thread
From: Matthew Martin @ 2022-03-31  3:48 UTC (permalink / raw)
  To: zsh-workers

Mostly adding + to flags which take arguments. NetBSD's pkg_delete has
a few new flags and removed -a. OpenBSD's -D can be repeated and no
longer has cdrom permissions.

diff --git a/Completion/BSD/Command/_bsd_pkg b/Completion/BSD/Command/_bsd_pkg
index 6bdce58e0..82cf6226c 100644
--- a/Completion/BSD/Command/_bsd_pkg
+++ b/Completion/BSD/Command/_bsd_pkg
@@ -78,12 +78,12 @@ _bsd_pkg() {
       ;;
     openbsd*)
       flags+=(
-        '-A[arch to assume for any package tests]:architecture:_obsd_architectures'
+        '-A+[arch to assume for any package tests]:architecture:_obsd_architectures'
         '-a[do not record packages as installed manually]'
         '-aa[force already installed packages to be tagged as installed automatically]'
-        '-B[specify destdir prefix]:destdir directory:_files -/'
+        '-B+[specify destdir prefix]:destdir directory:_files -/'
         '-c[while replacing packages, delete extra configuration file in the old package]'
-        '-D[specify failsafe to waive]:failsafe:((
+        '*-D+[specify failsafe to waive]:failsafe:((
           allversions\:"do not trim older p* variants of packages for updates"
           arch\:"architecture recorded in package may not match"
           checksum\:"verify checksums before deleting or tying old files"
@@ -91,9 +91,7 @@ _bsd_pkg() {
           donttie\:"do not try to find new files in old packages by comparing the stored sha256"
           downgrade\:"do not filter out package versions older than what is currently installed"
           installed\:"in update mode, reinstall an existing package with the same update signature"
-          libdepends\:"library specifications may not be fulfilled"
           nonroot\:"install even if not running as root"
-          paranoid\:"do not run any @exec/@unexec"
           repair\:"attempt to repair installed packages with missing registration data"
           scripts\:"external scripts may fail"
           SIGNER\:"list of trusted signers, separated by commas"
@@ -103,10 +101,10 @@ _bsd_pkg() {
         ))'
         '-I[force non-interactive mode]'
         '-i[force interactive mode]'
-        '-L[specify a localbase]:localbase:_files -/'
-        '-l[specify pkg_info output file to install]:pkg_info file:_files'
+        '-L+[specify a localbase]:localbase:_files -/'
+        '-l+[specify pkg_info output file to install]:pkg_info file:_files'
         '-m[always display progress meter]'
-        '-P[check distribution permissions]:permission type:(cdrom ftp)'
+        '-P+[check distribution permissions]:permission type:(ftp)'
         "-qq[don't check checksums]"
         '-r[replace existing packages]'
         "-s[don't install; just report disk size changes]"
@@ -143,26 +141,28 @@ _bsd_pkg() {
     case "$OSTYPE" in
     netbsd*)
       flags+=(
-        '(:)-a[delete all installed packages]'
         '(:)-A[remove automatically installed packages that are no longer required]'
         "-D[don't execute deinstallation scripts]"
         '-F[specify each package by an installed file]'
         '-f[force deinstallation]'
-        '-K[override PKG_DBDIR]:pkg_dbdir:_files -/'
+        '-ff[force deinstallation even if preserved]'
+        '-K+[override PKG_DBDIR]:pkg_dbdir:_files -/'
+        '-k[silently skip preserved packages]'
+        '-N[leave the files installed]'
         "-O[only delete the package's entries]"
-        '-P[specify destdir prefix]:destdir directory:_files -/'
-        '-p[specify prefix]:prefix directory:_files -/'
+        '-P+[specify destdir prefix]:destdir directory:_files -/'
+        '-p+[specify prefix]:prefix directory:_files -/'
         '-R[delete upward recursively]'
         '-r[delete recursively]'
         '-V[show version and exit]'
-        '(-a)*:package name:_bsd_pkg_pkgs_and_files'
+        '*:package name:_bsd_pkg_pkgs_and_files'
       )
       ;;
     openbsd*)
       flags+=(
         '-a[delete unused dependencies]'
-        '-B[specify destdir prefix]:destdir directory:_files -/'
-        '-D[specify failsafe to waive]:failsafe:((
+        '-B+[specify destdir prefix]:destdir directory:_files -/'
+        '*-D+[specify failsafe to waive]:failsafe:((
           baddepend\:"force deletion of packages even if they reference nonexistent dependencies"
           checksum\:"verify checksums before deleting or tying old files"
           dependencies\:"delete the set of packages that depend upon the requested packages"
@@ -190,11 +190,11 @@ _bsd_pkg() {
       '(:)-a[show all installed packages]'
       '-c[show comment fields]'
       '-d[show long descriptions]'
-      '-e[test if package is installed]:package name:_bsd_pkg_pkgs'
+      '-e+[test if package is installed]:package name:_bsd_pkg_pkgs'
       '-f[show packing list instructions]'
       '-I[show index lines]'
       '-L[show full pathnames of files]'
-      '-l[specify prefix string]:prefix string:'
+      '-l+[specify prefix string]:prefix string:'
       '-q[be quiet]'
       '-R[show list of installed requiring packages]'
       '-s[show total size occupied by each package]'
@@ -210,13 +210,13 @@ _bsd_pkg() {
         '-D[show install-message files]'
         '-F[specify each package by an installed file]'
         '-i[show install scripts]'
-        '-K[override PKG_DBDIR]:pkg_dbdir:_files -/'
+        '-K+[override PKG_DBDIR]:pkg_dbdir:_files -/'
         '-k[show deinstall scripts]'
         '-m[show mtree files]'
         '-N[show which packages each package was built with]'
         '-n[show which packages each package needs]'
         '-p[show installation prefixes]'
-        '-Q[show the definition of the specified variable from the build information]:variable:'
+        '-Q+[show the definition of the specified variable from the build information]:variable:'
         '-r[show list of installed requiring packages recursively]'
         '-S[show total size occupied by each package and its dependents]'
         '-u[show information for all user-installed packages]'
@@ -228,14 +228,19 @@ _bsd_pkg() {
       flags+=(
         '(:)-A[show all installed packages, including internal packages]'
         '-C[show certificate information]'
+        '*-D+[specify failsafe to waive]:failsafe:((
+          SIGNER\:"list of trusted signers, separated by commas"
+          snap\:"force %c and %m to expand to snapshots"
+          unsigned\:"allow the installation of unsigned packages without warnings/errors"
+        ))'
         '-E[show the package that contains the specified file]:file:_files'
         # XXX only with -L
         '-K[prefix filenames with category keywords]'
         '-M[show the install-message file]'
         '-m[only show manual installations]'
         '-P[show the pkgpath]'
-        '-Q[show packages matching the specified query]:query:'
-        '-r[check the list of packages for a specified pkgspec]:pkgspec:'
+        '-Q+[show packages matching the specified query]:query:'
+        '-r+[check the list of packages for a specified pkgspec]:pkgspec:'
         '-S[show the update signature]'
         '-t[show packages not required by any other]'
         '-U[show the deinstall-message file]'


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-31  3:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31  3:48 PATCH: Update _bsd_pkg Matthew Martin

Code repositories for project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).