Date: Mon, 06 Jan 2003 23:51:25 +0200 From: Vladimir Chukharev <chu@gpi.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/46810: [Patch] pkg_tree additional switches Message-ID: <3E19FA5D.242D07F7@gpi.ru>
next in thread | raw e-mail | index | archive | help
>Number: 46810 >Category: ports >Synopsis: [Patch] pkg_tree additional switches >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jan 06 14:00:12 PST 2003 >Closed-Date: >Last-Modified: >Originator: Vladimir I. Chukharev >Release: FreeBSD 4.7-STABLE i386 >Organization: >Environment: System: FreeBSD svak.h33.erkki.ton.tut.fi 4.7-STABLE FreeBSD 4.7-STABLE #1: Tue Dec 24 16:21:18 EET 2002 root@svak.h33.erkki.ton.tut.fi:/usr/obj/usr/src/sys/SVAK i386 >Description: I found convinient some additional key to the pkg_tree utility, and I propose to include them. The patches can be placed in files directory. I tried to send similar patch first directly to the maintainer, but got no response. So I decided to record it as a PR. Mery Christmas (Julian calendar)! V.Chukharev >How-To-Repeat: >Fix: --- patch-aa begins here --- --- pkg_tree.orig Wed Dec 12 13:44:40 2001 +++ pkg_tree Mon Jan 6 23:02:31 2003 @@ -26,7 +26,7 @@ # updated by a newer version. In case of tcl-8.3.3_3, this is tcl-8.3.3_4. # # PKG-TREE is (c) Edwin Groothuis, edwin@mavetju.org -# For license issues, see the file LICESE. +# For license issues, see the file LICENSE. # For more information, see the website: http://www.mavetju.org # @@ -34,10 +34,13 @@ use Getopt::Std; -use vars qw/ $opt_v /; +use vars qw/ $opt_b $opt_q $opt_t $opt_v /; $opt_v=0; -getopts("v"); +$opt_t=0; +$opt_b=0; +$opt_q=0; +getopts("bqtv"); my $PKGDIR="/var/db/pkg"; @@ -46,6 +49,7 @@ closedir DIR; @dirs=grep !/^\./,@dirs; +@dirs=grep !/^pkgdb.db$/,@dirs; @dirs=sort @dirs; my @args=@ARGV; @@ -150,8 +154,10 @@ } next if (!$found); } + next if ($opt_t && $required{$pkg}[0]!=0); + next if ($opt_b && $requires{$pkg}[0]!=0); print "$pkg\n"; - if ($requires{$pkg}[0]!=0) { + if (!$opt_q && $requires{$pkg}[0]!=0) { print_deps("|"," ",1,$pkg); } } --- patch-aa ends here --- --- patch-ab begins here --- --- pkg_tree.pod.orig Wed Dec 12 13:44:40 2001 +++ pkg_tree.pod Mon Jan 6 23:20:49 2003 @@ -53,6 +53,12 @@ |\__ freetype2-2.0.5 \__ XFree86-libraries-4.1.0 (unknown) +Use the B<-t> parameter to show only top level packages, +and B<-b> to show only bottom level packages. And B<-t> B<-q> +together will give the list of top level packages without their +dependencies, installing only these packages should install all +currently installed packages. + =head1 RETURN VALUES Always 0. --- patch-ab ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E19FA5D.242D07F7>