zsh-workers
 help / color / mirror / code / Atom feed
* adding .tbz support to _bsd_pkg
@ 2002-08-04  9:23 Akinori MUSHA
  2002-08-05 10:00 ` Oliver Kiddle
  0 siblings, 1 reply; 3+ messages in thread
From: Akinori MUSHA @ 2002-08-04  9:23 UTC (permalink / raw)
  To: zsh-workers

Hi, 

FreeBSD's pkg_* tools have bzip2'd package support and the default
package format has now been changed from .tgz to .tbz.  Here's a patch
to make _bsd_pkg look for .tbz files as well as .tgz files.  Please
apply it if it looks okay.

Regards,

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"When I leave I don't know what I'm hoping to find
              When I leave I don't know what I'm leaving behind.."

Index: Completion/BSD/Command/_bsd_pkg
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/BSD/Command/_bsd_pkg,v
retrieving revision 1.3
diff -u -r1.3 _bsd_pkg
--- Completion/BSD/Command/_bsd_pkg	1 Feb 2002 14:28:31 -0000	1.3
+++ Completion/BSD/Command/_bsd_pkg	4 Aug 2002 09:21:56 -0000
@@ -16,9 +16,9 @@
   pkgsdir=${PACKAGES:-$portsdir/packages}/All
 
   paths=( "${(@)${(@s.:.)PKG_PATH}:#}" )
-  _files "$@" -g \*.tgz && ret=0
-  (( $#path )) && _files "$@" -W paths -g \*.tgz && ret=0
-  compadd "$@" - $pkgsdir/*.tgz && ret=0
+  _files "$@" -g '*.t[bg]z' && ret=0
+  (( $#path )) && _files "$@" -W paths -g '*.t[bg]z' && ret=0
+  compadd "$@" - $pkgsdir/*.t[bg]z && ret=0
 
   return ret
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: adding .tbz support to _bsd_pkg
  2002-08-04  9:23 adding .tbz support to _bsd_pkg Akinori MUSHA
@ 2002-08-05 10:00 ` Oliver Kiddle
  2002-09-20 18:35   ` Akinori MUSHA
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Kiddle @ 2002-08-05 10:00 UTC (permalink / raw)
  To: Akinori MUSHA; +Cc: zsh-workers

On 4 Aug, Akinori MUSHA wrote:

> FreeBSD's pkg_* tools have bzip2'd package support and the default
> package format has now been changed from .tgz to .tbz.  Here's a patch
> to make _bsd_pkg look for .tbz files as well as .tgz files.  Please
> apply it if it looks okay.

Thanks. The patch looks fine to me and I've applied it.

Would it also be useful for _bzip2 to look for .tbz files in addition to
.bz2?

Oliver

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: adding .tbz support to _bsd_pkg
  2002-08-05 10:00 ` Oliver Kiddle
@ 2002-09-20 18:35   ` Akinori MUSHA
  0 siblings, 0 replies; 3+ messages in thread
From: Akinori MUSHA @ 2002-09-20 18:35 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: zsh-workers

Hi,

At Mon, 05 Aug 2002 11:00:36 +0100,
Oliver Kiddle wrote:
> Would it also be useful for _bzip2 to look for .tbz files in addition to
> .bz2?

I've seen now a few tar+bzip2 tarballs suffixed with `.tbz' or
`.tbz2'.  I think they should be looked for by _bzip2.

		*		*		*

Here's another patch against _bsd_pkg, which adds support for the
pkg_create(1) command.  Please apply it if it's okay.

Note: NetBSD's pkg_create(1) has a different set of command line flags
than FreeBSD's, so NetBSD users may want to improve the minimum
ruleset written below.  Ditto for OpenBSD.

Index: Completion/BSD/Command/_bsd_pkg
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/BSD/Command/_bsd_pkg,v
retrieving revision 1.4
diff -u -r1.4 _bsd_pkg
--- Completion/BSD/Command/_bsd_pkg	5 Aug 2002 09:55:39 -0000	1.4
+++ Completion/BSD/Command/_bsd_pkg	20 Sep 2002 18:22:51 -0000
@@ -1,4 +1,4 @@
-#compdef pkg_add pkg_delete pkg_info
+#compdef pkg_add pkg_create pkg_delete pkg_info
 
 (( $+functions[_bsd_pkg_pkgfiles] )) ||
 _bsd_pkg_pkgfiles() {
@@ -78,6 +78,49 @@
       $flags[@] \
       '*:package to install:_bsd_pkg_pkgfiles'
     ;;
+
+  pkg_create)
+    case "$OSTYPE" in
+    freebsd*)
+      flags=(
+	'-f[specify plist file]:plist file:_files'
+	'(-b)-c[specify comment file]:comment file:_files'
+	'(-b)-d[specify descr file]:descr file:_files'
+	'-Y[assume YES for any questions asked]'
+	'-N[assume NO for any questions asked]'
+	'(-b)-O[packing list only mode]'
+	'-v[be verbose]'
+	'-h[force tar to follow symlinks]'
+	'(-b)-i[specify pre-install script]:pre-install script:_files'
+	'(-b)-I[specify post-install script]:post-install script:_files'
+	'(-b)-P[specify initial dependencies]:dependencies:_bsd_pkg_pkgs'
+	'(-b)-p[specify prefix]:prefix directory:_files -/'
+	'(-b)-k[specify deinstall script]:deinstall script:_files'
+	'(-b)-K[specify post-deinstall script]:post-deinstall script:_files'
+	'(-b)-r[specify req script]:req script:_files'
+	'(-b)-s[specify source directory]:source directory:_files -/'
+	'(-b)-t[specify mktemp template]:mktemp template:_files'
+	'(-b)-X[specify exclude file]:exclude file for tar:_files'
+	'(-b)-D[specify message file]:message file:_files'
+	'(-b)-m[specify mtree file]:mtree file:_files'
+	'(-b)-o[specify origin]:origin:_files -W ${PORTSDIR\:-/usr/ports} -/'
+	'-j[use bzip2]'
+	'-z[use gzip]'
+	'(-c -d -O -i -I -P -p -k -K -r -s -t -X -D -m -o)-b[specify pkgname]:pkgname:_bsd_pkg_pkgs'
+	'*:package file name:_files'
+      )
+      ;;
+    netbsd*)
+      # NetBSD users, improve me!
+      flags=(
+	'*:package name:_bsd_pkg_pkgs'
+      )
+      ;;
+    esac
+
+    _arguments -s \
+      $flags[@]
+      ;;
 
   pkg_delete)
     flags=(


-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"When I leave I don't know what I'm hoping to find
              When I leave I don't know what I'm leaving behind.."


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-09-20 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-04  9:23 adding .tbz support to _bsd_pkg Akinori MUSHA
2002-08-05 10:00 ` Oliver Kiddle
2002-09-20 18:35   ` Akinori MUSHA

Code repositories for project(s) associated with this public 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).