From owner-freebsd-ports-bugs@FreeBSD.ORG Thu May 10 13:10:04 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DAF3B16A40E for ; Thu, 10 May 2007 13:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id AEA0913C4C2 for ; Thu, 10 May 2007 13:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l4ADA3O5092624 for ; Thu, 10 May 2007 13:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l4ADA3Tl092623; Thu, 10 May 2007 13:10:03 GMT (envelope-from gnats) Resent-Date: Thu, 10 May 2007 13:10:03 GMT Resent-Message-Id: <200705101310.l4ADA3Tl092623@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andy Kosela Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F89D16A403 for ; Thu, 10 May 2007 13:01:56 +0000 (UTC) (envelope-from spear@proclus.um.lublin.pl) Received: from proclus.um.lublin.pl (keeper.um.lublin.pl [193.93.68.19]) by mx1.freebsd.org (Postfix) with ESMTP id 5616413C447 for ; Thu, 10 May 2007 13:01:55 +0000 (UTC) (envelope-from spear@proclus.um.lublin.pl) Received: from proclus.um.lublin.pl (localhost [127.0.0.1]) by proclus.um.lublin.pl (8.13.8/8.13.8) with ESMTP id l4ACngHO042865 for ; Thu, 10 May 2007 14:49:42 +0200 (CEST) (envelope-from spear@proclus.um.lublin.pl) Received: (from root@localhost) by proclus.um.lublin.pl (8.13.8/8.13.8/Submit) id l4ACng2N042864; Thu, 10 May 2007 14:49:42 +0200 (CEST) (envelope-from spear) Message-Id: <200705101249.l4ACng2N042864@proclus.um.lublin.pl> Date: Thu, 10 May 2007 14:49:42 +0200 (CEST) From: Andy Kosela To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/112572: [NEW PORT] ports-mgmt/pkg: Smart tool for managing FreeBSD ports X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2007 13:10:04 -0000 >Number: 112572 >Category: ports >Synopsis: [NEW PORT] ports-mgmt/pkg: Smart tool for managing FreeBSD ports >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu May 10 13:10:03 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Andy Kosela >Release: FreeBSD 6.2-RELEASE-p4 i386 >Organization: >Environment: System: FreeBSD proclus.um.lublin.pl 6.2-RELEASE-p4 FreeBSD 6.2-RELEASE-p4 #0: Thu Apr 26 17:40:53 UTC 2007 >Description: The pkg utility is a smart tool for managing FreeBSD ports. It uses system base tools pkg_* to manage packages and external tool portmaster written by Doug Barton to manage ports compiled from source. The main goal of this project is to provide one common tool for managing the ports instead of relying on many applications. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- pkg-1.0.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # pkg # pkg/files # pkg/files/pkg.sh.in # pkg/files/pkg.8 # pkg/Makefile # pkg/pkg-descr # echo c - pkg mkdir -p pkg > /dev/null 2>&1 echo c - pkg/files mkdir -p pkg/files > /dev/null 2>&1 echo x - pkg/files/pkg.sh.in sed 's/^X//' >pkg/files/pkg.sh.in << 'END-of-pkg/files/pkg.sh.in' X#!/bin/sh X X# Copyright (c) 2007 Andy Kosela X# All rights reserved. X# X# Redistribution and use in source and binary forms, with or without X# modification, are permitted provided that the following conditions X# are met: X# 1. Redistributions of source code must retain the above copyright X# notice, this list of conditions and the following disclaimer. X# 2. Redistributions in binary form must reproduce the above copyright X# notice, this list of conditions and the following disclaimer in the X# documentation and/or other materials provided with the distribution. X# X# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X# SUCH DAMAGE. X Xtrap trap_exit 2 X Xpkg=$@ X Xroot() { Xif [ `whoami` != root ]; then X echo "You must be root to use this magnificent tool" X exit 0 Xfi X} X Xtrap_exit() { X echo -e "\nMaster, it seems you pressed ^C and activated SIGINT. Peace \ Xbe upon you." X exit 1 X} X Xinstalled() { Xa=pkg_installed X} X Xmissing() { Xecho "Master, it seems you typed the port which is not available in /usr/ports/" Xecho "Check your port's name and try again." Xexit 0 X} X Xinit_check() { Xfor e in $pkg; do X pkg_chk=`ls -l /var/db/pkg/ | grep $e.*-[0-9]` X [ ! -z "$pkg_chk" ] && installed Xdone X Xif [ -z "$a" ]; then Xfor e in $pkg; do X port_chk=`whereis -s $e | cut -d: -f2` X [ -z "$port_chk" ] && missing Xdone Xfi X X} X Xone_many() { Xif [ -z `echo $pkg | awk '{print $2}'` ]; then X port1="Master, this port is not installed." X port2="Master, this port is installed." X else X port1="Master, these ports are not installed." X port2="Master, these ports are installed." Xfi X X} X Xone_many2() { Xif [ -z `echo $t | awk '{print $2}'` ]; then X port1="Master, this port is not installed." X port2="Master, this port is installed." X else X port1="Master, these ports are not installed." X port2="Master, these ports are installed." Xfi X X} X Xmain() { X Xroot Xif [ -z "$pkg" ]; then X echo "Master, you didn't specified any package to install/upgrade." X exit 0 Xfi X Xinit_check X Xif [ -z "$a" ]; then X one_many X echo "`whereis -s $pkg | cut -d' ' -f2`" X echo "" X echo $port1 X echo -n "Do you want to install $pkg using binary packages [y] " X read key X case $key in X n) echo "" X portmaster -i `whereis -s $pkg | cut -d' ' -f2` X exit 0;; X *) echo "" X echo "Installing new package..." && pkg_add -r $pkg X exit 0;; X esac Xfi X Xpkg_install=`pkg_info -xoq $pkg | cut -d/ -f2 | awk '{ORS=" " ; print}'` Xpkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}' Xecho "" Xecho -n "Master, do you want to upgrade "$pkg_install"using binary packages? [y] " Xread key X Xcase $key in X n) echo "" X portmaster -bi $pkg_install X exit 0;; X *) echo "" X pkg_delete -fix $pkg_install && pkg_add -r $pkg_install X exit 0;; Xesac X} X Xsimulation() { X Xroot Xinit_check X Xif [ -z "$a" ]; then X one_many X echo "`whereis -s $pkg | cut -d' ' -f2`" X echo "" X echo $port1 X echo -n "Do you want to install $pkg using binary packages (simulation \ Xmode) [y] " X read key X case $key in X n) echo "" X portmaster -in `whereis -s $pkg | cut -d' ' -f2` X exit 0;; X *) echo "" X echo "Installing new package..." && pkg_add -rn $pkg X exit 0;; X esac Xfi X Xpkg_install=`pkg_info -xoq $pkg | cut -d/ -f2 | awk '{ORS=" " ; print}'` Xpkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}' Xecho "" Xecho -n "Master, do you want to upgrade "$pkg_install"using binary packages? \ X(simulation mode) [y] " Xread key X Xcase $key in X n) echo "" X portmaster -bin $pkg_install X exit 0;; X *) echo "" X pkg_delete -ixn $pkg_install && pkg_add -rn $pkg_install X exit 0;; Xesac X} X Xnoninteractive() { X Xroot Xinit_check X Xif [ -z "$a" ]; then X one_many X echo "`whereis -s $pkg | cut -d' ' -f2`" X echo "" X echo $port1 X echo -n "Do you want to install $pkg using binary packages [y] " X read key X case $key in X n) echo "" X portmaster `whereis -s $pkg | cut -d' ' -f2` X exit 0;; X *) echo "" X echo "Installing new package..." && pkg_add -r $pkg X exit 0;; X esac Xfi X Xpkg_install=`pkg_info -xoq $pkg | cut -d/ -f2 | awk '{ORS=" " ; print}'` Xpkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}' Xecho "" Xecho -n "Master, do you want to upgrade "$pkg_install"using binary packages? [y] " Xread key X Xcase $key in X n) echo "" X portmaster -b $pkg_install X exit 0;; X *) echo "" X pkg_delete -xf $pkg_install && pkg_add -r $pkg_install X exit 0;; Xesac X} X Xall() { X Xroot Xecho "" Xecho -n "Master, do you want to upgrade all installed packages using binary \ Xpackages? (interactive mode) [y] " Xread key X Xcase $key in X n) echo "" X portmaster -aib X exit 0;; X *) echo "" X all=`ls -l /var/db/pkg/ | awk '{print $9}' | sed 's/\(.*\)-.*/\1/g' \ X| awk '{ORS=" " ;print}'` X pkg_delete -ifx $all && pkg_add -r $all X exit 0;; Xesac X} X Xall_noninteractive() { X Xroot Xecho "" Xecho -n "Master, do you want to upgrade all installed packages using binary \ Xpackages? (noninteractive mode) [y] " Xread key X Xcase $key in X n) echo "" X portmaster -aub X exit 0;; X *) echo "" X all=`ls -l /var/db/pkg/ | awk '{print $9}' | sed 's/\(.*\)-.*/\1/g' \ X| awk '{ORS=" " ;print}'` X pkg_delete -fx $all && pkg_add -r $all X exit 0;; Xesac X} X Xpkg_info-xI() { X Xinit_check Xone_many Xif [ -z "$a" ]; then X echo $port1 X echo "" X path=`whereis -s $pkg | cut -d' ' -f2` X echo $path: `cat $path/Makefile | grep COMMENT | cut -d= -f2` X else X echo $port2 X echo "" X pkg_info -xI $pkg Xfi X Xexit 0 X} X Xpkg_info-xL() { Xz=`pkg_info -xL $pkg 2>/dev/null` X Xif [ -z "$z" ]; then X echo "pkg: no installed packages match pattern(s)" X else X echo "$z" Xfi X Xexit 0 X} X Xpkg_info-() { Xpkg_info X Xexit 0 X} X Xpkg_info-xs() { Xz=`pkg_info -xs $pkg 2>/dev/null` X Xif [ -z "$z" ]; then X echo "pkg: no installed packages match pattern(s)" X else X echo "$z" Xfi X Xexit 0 X} X Xpkg_info-xr() { Xinit_check Xone_many Xif [ -z "$a" ]; then X echo $port1 X echo "" X for e in $pkg; do X path=`whereis -s $e | cut -d' ' -f2` X echo $path: `cat $path/Makefile | grep COMMENT | cut -d= -f2` X cd /usr/ports && make search name=^$e | grep R-deps X echo "" X done X else X echo $port2 X echo "" X pkg_info -xrR $pkg Xfi X Xexit 0 X} X Xpkg_info-xg() { Xz=`pkg_info -xg $pkg 2>/dev/null` X Xif [ -z "$z" ]; then X echo "pkg: no installed packages match pattern(s)" X else X echo "$z" Xfi X Xexit 0 X} X Xpkg_info-xf() { Xinit_check Xone_many Xif [ -z "$a" ]; then X echo $port1 X echo "" X for e in $pkg; do X path=`whereis -s $e | cut -d' ' -f2` X echo $path: `cat $path/Makefile | grep COMMENT | cut -d= -f2` X echo "" X cat $path/pkg-plist X echo "" X done X else X echo $port2 X echo "" X pkg_info -xf $pkg Xfi X Xexit 0 X} X X#pkg_info-xf() { X#z=`pkg_info -xf $pkg 2>/dev/null` X X#if [ -z "$z" ]; then X # echo "pkg: no installed packages match pattern(s)" X #else X #echo "$z" X#fi X X#exit 0 X#} X Xpkg_info-xo() { Xz=`pkg_info -xo $pkg 2>/dev/null` X Xif [ -z "$z" ]; then X echo "pkg: no installed packages match pattern(s)" X else X echo "$z" Xfi X Xexit 0 X} X Xpkg_info-xk() { Xz=`pkg_info -xk $pkg 2>/dev/null` X Xif [ -z "$z" ]; then X echo "pkg: no installed packages match pattern(s)" X else X echo "$z" Xfi X Xexit 0 X} X Xpkg_info-x() { X Xinit_check Xone_many X Xif [ -z "$a" ]; then X echo $port1 X echo "" X path=`whereis -s $pkg | cut -d' ' -f2` X echo `echo $path | cut -d/ -f4,5`: `cat $path/Makefile | grep COMMENT \ X| cut -d= -f2` X echo "" X echo "Description:" X echo "`cat $path/pkg-descr`" X else X echo $port2 X echo "" X pkg_info -x $pkg X Xfi X Xexit 0 X} X Xpkg_version-() { Xpkg_version -Iv X Xexit 0 X} X Xportmaster-l() { Xportmaster -l X Xexit 0 X} X Xpkg_wildcard() { X Xfor e in `ls -l /usr/ports/*/ | grep $pkg | awk '{print $9}'`; do X whereis -s $e | cut -d' ' -f2 Xdone X Xexit 0 X} X Xpkg_makefile() { X Xinit_check Xpath=`whereis -s $pkg | cut -d' ' -f2` X$PAGER $path/Makefile Xexit 0 X} X Xmake_search() { X Xinit_check Xif [ -z "$a" ]; then X one_many X echo $port1 X echo "" X for e in $pkg; do X cd /usr/ports && make search name=^$e X done X X else X X t=`pkg_info -xI $pkg | cut -d' ' -f1 | awk '{ORS=" " ; print}'` X one_many2 X echo $port2 X pkg_info -xI $pkg | cut -d' ' -f1 X echo "" X for e in $pkg; do X name=`pkg_info -xoq $e` X for i in $name; do X cd /usr/ports && make search path=$i$ X done X done Xfi X Xexit 0 X} X Xmake_search_w() { X Xcd /usr/ports && make search name=$pkg Xexit 0 X} X Xpkg_find() { Xarch=`uname -m` Xsys=`uname -r | cut -d- -f1,2 | tr '[:upper:]' '[:lower:]'` Xftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys/Latest/ X Xexit 0 X} X Xpkg_delete-xr() { Xroot X Xz=`pkg_info -xoQ $pkg 2>/dev/null` X Xif [ -z "$z" ]; then X echo "pkg: no installed packages match pattern(s)" X exit 0 Xfi X Xpkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}' Xecho "" Xecho -n "Master, do you want to use recursive removal? [y] " Xread key X Xcase $key in X n) echo -n "Master, do you want to use force removal? [y] " X read key2 X case $key2 in X n) pkg_delete -xi $pkg X exit 0;; X *) pkg_delete -xfi $pkg X exit 0;; X esac;; X *) echo -n "Master, do you want to use force removal? [y] " X read key2 X case $key2 in X n) pkg_delete -xri $pkg X exit 0;; X *) pkg_delete -xrfi $pkg X exit 0;; X esac;; Xesac X} X Xpkg_clean() { Xroot Xecho "Master, I will clean /usr/ports/distfiles/*" Xrm -r /usr/ports/distfiles/* 1>/dev/null 2>&1 ; echo "Done." Xexit 0 X} X Xpkg_clean2() { Xroot Xecho "Master, I will clean /usr/ports/distfiles/* and /usr/ports/*/*/work/" Xrm -r /usr/ports/distfiles/* 1>/dev/null 2>&1 ; rm -r /usr/ports/*/*/work/ \ X1>/dev/null 2>&1 ; echo "Done." Xexit 0 X} X Xhelp() { X Xecho "`ls -l /var/db/pkg/ | awk '{print $9}' | awk -F/ '{print $1}' | grep \ X'pkg-[0-9]'`" Xecho "" Xecho "Help:" Xecho "pkg [-dDfgiIkLmnNorsSw] pkg-name ..." Xecho "pkg [-aAcCFhlvV]" Xecho "" Xecho "Master, I think you should really read the man page: man pkg" X Xexit 0 X} X X# End of functions X################################################################################ X Xwhile getopts d:D:f:g:i:I:k:L:m:n:N:o:r:s:S:w:aAcCFhlvV opts; do X case $opts in X d) pkg=$OPTARG X pkg_delete-xr;; X D) pkg=$OPTARG X pkg_info-x;; X f) pkg=$OPTARG X pkg_info-xf;; X g) pkg=$OPTARG X pkg_info-xg;; X i) pkg=$OPTARG X make_search;; X I) pkg=$OPTARG X pkg_info-xI;; X k) pkg=$OPTARG X pkg_info-xk;; X L) pkg=$OPTARG X pkg_info-xL;; X m) pkg=$OPTARG X pkg_makefile;; X n) pkg=$OPTARG X simulation;; X N) pkg=$OPTARG X noninteractive;; X o) pkg=$OPTARG X pkg_info-xo;; X r) pkg=$OPTARG X pkg_info-xr;; X s) pkg=$OPTARG X pkg_info-xs;; X S) pkg=$OPTARG X make_search_w;; X w) pkg=$OPTARG X pkg_wildcard;; X a) all;; X A) all_noninteractive;; X c) pkg_clean;; X C) pkg_clean2;; X h) help;; X l) pkg_info-;; X F) pkg_find;; X v) portmaster-l;; X V) pkg_version-;; X *) help;; X esac Xdone X Xmain END-of-pkg/files/pkg.sh.in echo x - pkg/files/pkg.8 sed 's/^X//' >pkg/files/pkg.8 << 'END-of-pkg/files/pkg.8' X.\" Copyright (c) 2007 Andy Kosela X.\" All rights reserved. X.\" X.\" Redistribution and use in source and binary forms, with or without X.\" modification, are permitted provided that the following conditions X.\" are met: X.\" 1. Redistributions of source code must retain the above copyright X.\" notice, this list of conditions and the following disclaimer. X.\" 2. Redistributions in binary form must reproduce the above copyright X.\" notice, this list of conditions and the following disclaimer in the X.\" documentation and/or other materials provided with the distribution. X.\" X.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND X.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE X.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE X.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE X.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL X.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS X.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) X.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT X.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY X.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF X.\" SUCH DAMAGE. X.\" X.\" X.Dd May 9, 2007 X.Dt PKG 8 X.Os X.Sh NAME X.Nm pkg X.Nd smart tool for managing FreeBSD ports. X.Sh SYNOPSIS X.Nm X.Op Fl dDfgiIkLmnNorsSw X.Ar pkg-name ... X.Nm X.Op Fl aAcCFhlvV X.Pp X.Sh DESCRIPTION XThe X.Nm Xutility is a smart tool for managing FreeBSD ports. It uses system base tools Xpkg_* to manage packages and external tool portmaster written by Doug Barton to Xmanage ports compiled from source. The main goal of this project is to provide Xone common tool for managing the ports instead of relying on many applications. X.Sh OPTIONS XThe following command line arguments are supported: X.Bl -tag -width F1 X.It Ar pkg-name ... Xwith no additional arguments, upgrade/install the specified packages. X.It Fl a Xupgrade all ports (interactive mode). [no arguments] X.It Fl A Xupgrade all ports (noninteractive mode). [no arguments] X.It Fl c Xclean all distfiles in /usr/ports/distfiles/* [no arguments] X.It Fl C Xclean all distfiles in /usr/ports/distfiles/* and also all working directories Xof the ports tree /usr/ports/*/*/work/ [no arguments] X.It Fl d Xdelete specified packages. X.It Fl D Xdisplay description of the package. X.It Fl f Xshow the packing list instructions for the package. X.It Fl F Xftp to FreeBSD packages repository and check the latest available package Xversion. [no arguments] X.It Fl g Xshow files that do not match the recorded checksum. X.It Fl h Xdisplay help file. [no arguments] X.It Fl i Xdisplay info about the package. X.It Fl I Xdisplay short info about the package. X.It Fl k Xshow the deinstall script (if any) for the package. X.It Fl l Xdisplay short info about all installed packages. [no arguments] X.It Fl L Xshow the files within the package. X.It Fl m Xdisplay port's Makefile. X.It Fl n Xdo not actually install a package, just report the steps that would be taken if Xit was. X.It Fl N Xperform noninteractive installation of the package. X.It Fl o Xshow the path to the port. X.It Fl r Xshow the list of dependencies and also the list of installed packages which Xrequire specified package. X.It Fl s Xshow the total size occupied by files installed within the package. X.It Fl S Xsearch the ports for the specified string. X.It Fl w Xsearch the ports for the specified ports' name and display its path. X.It Fl v Xlist all installed packages by category. X.It Fl V Xlist all installed packages, and search for upgrades for them using ports. X.El X.Sh EXIT STATUS X.Ex -std X.Sh EXAMPLES XThe following is an example of a typical usage Xof the X.Nm Xcommand: X.Pp X.Dl Nm "pkg foo" X.Pp XUpgrade or install a package named foo. X.Pp X.Dl Nm "pkg -i 'foo1 foo2' X.Pp XDisplay info about packages foo1 and foo2. X.Pp X.Dl Nm "pkg -S ^foo X.Pp XDisplay ports that start with foo string. X.Sh SEE ALSO X.Xr pkg_add 1 , X.Xr pkg_delete 1 , X.Xr pkg_info 1 , X.Xr pkg_version 1 , X.Xr ports 7 , X.Xr portmaster 8 X.Sh AUTHORS X.An Andy Kosela END-of-pkg/files/pkg.8 echo x - pkg/Makefile sed 's/^X//' >pkg/Makefile << 'END-of-pkg/Makefile' X# New ports collection makefile for: portmaster X# Date created: 9 May 2007 X# Whom: Andy Kosela X# X# $FreeBSD$ X# X# This port is self contained in the files directory. X# X XPORTNAME= pkg XPORTVERSION= 1.0 XCATEGORIES= ports-mgmt XMASTER_SITES= # none XDISTFILES= # none X XMAINTAINER= andy.kosela@gmail.com XCOMMENT= Smart tool for managing FreeBSD ports X XRUN_DEPENDS= portmaster:${PORTSDIR}/ports-mgmt/portmaster X XNO_BUILD= yes XSUB_FILES= pkg.sh X XPLIST_FILES= sbin/pkg X XMAN8= pkg.8 X Xdo-fetch: X @${DO_NADA} X Xdo-install: X ${INSTALL_SCRIPT} ${WRKDIR}/pkg.sh ${PREFIX}/sbin/pkg X ${INSTALL_MAN} ${FILESDIR}/pkg.8 ${MAN8PREFIX}/man/man8 X X.include END-of-pkg/Makefile echo x - pkg/pkg-descr sed 's/^X//' >pkg/pkg-descr << 'END-of-pkg/pkg-descr' XThe pkg utility is a smart tool for managing FreeBSD ports. It uses system base Xtools pkg_* to manage packages and external tool portmaster written by Doug XBarton to manage ports compiled from source. The main goal of this project is to Xprovide one common tool for managing the ports instead of relying on many Xapplications. END-of-pkg/pkg-descr exit --- pkg-1.0.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted: