Date: Tue, 5 Aug 2008 16:59:54 +0200 (CEST) From: Andy Kosela <akosela@andykosela.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/126277: [MAINTAINER-UPDATE] ports-mgmt/bpkg: update to 2.0.3 Message-ID: <20080805145954.423DF67CA6@aegis.um.lublin.pl> Resent-Message-ID: <200808051510.m75FA17E072530@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 126277 >Category: ports >Synopsis: [MAINTAINER-UPDATE] ports-mgmt/bpkg: update to 2.0.3 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue Aug 05 15:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Andy Kosela >Release: FreeBSD 6.2-RELEASE-p11 i386 >Organization: >Environment: System: FreeBSD aegis.um.lublin.pl 6.2-RELEASE-p11 FreeBSD 6.2-RELEASE-p11 #0: Wed Feb 13 07:00:04 UTC 2008 >Description: - New -F and -D flags - Minor changes - Update to 2.0.3 >How-To-Repeat: >Fix: --- bpkg-2.0.3.patch begins here --- diff -ruN --exclude=CVS /usr/ports/ports-mgmt/bpkg/Makefile /usr/home/akosela/downloads/bpkg-2.0.3/Makefile --- /usr/ports/ports-mgmt/bpkg/Makefile Sun Jul 27 21:19:22 2008 +++ /usr/home/akosela/downloads/bpkg-2.0.3/Makefile Mon Aug 4 09:38:33 2008 @@ -2,14 +2,13 @@ # Date created: 24 June 2007 # Whom: Andy Kosela <akosela@andykosela.com> # -# $FreeBSD: ports/ports-mgmt/bpkg/Makefile,v 1.18 2008/07/27 19:19:22 beech Exp $ +# $FreeBSD$ # # This port is self contained in the files directory. # PORTNAME= bpkg -PORTVERSION= 2.0.2 -PORTREVISION= 1 +PORTVERSION= 2.0.3 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff -ruN --exclude=CVS /usr/ports/ports-mgmt/bpkg/files/bpkg.8 /usr/home/akosela/downloads/bpkg-2.0.3/files/bpkg.8 --- /usr/ports/ports-mgmt/bpkg/files/bpkg.8 Sun Jul 27 21:19:22 2008 +++ /usr/home/akosela/downloads/bpkg-2.0.3/files/bpkg.8 Tue Aug 5 16:39:54 2008 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd July 19, 2008 +.Dd August 5, 2008 .Dt BPKG 8 .Os .Sh NAME @@ -31,10 +31,10 @@ .Nd a simple tool for displaying information about ports. .Sh SYNOPSIS .Nm -.Op Fl bdeEfgiIjkLmMoOpqQrsSwz +.Op Fl bDdeFfgIijkLMmOopQqrSswz .Ar pkg-name ... .Nm -.Op Fl cChltvZ +.Op Fl CchltvZ .Pp .Sh DESCRIPTION .Nm @@ -46,15 +46,19 @@ .Bl -tag -width F1 .It Fl b create backup package in /var/tmp/bpkg/ from a locally installed port. -.It Fl c -clean all distfiles in /usr/ports/distfiles/* [no arguments] .It Fl C -clean all distfiles in /usr/ports/distfiles/* and also all working directories +clean all distfiles in /usr/ports/distfiles/* and also all work directories of the ports tree /usr/ports/*/*/work/ [no arguments] +.It Fl c +clean all distfiles in /usr/ports/distfiles/* [no arguments] +.It Fl D +display size of port's source files. .It Fl d display description of the port. .It Fl e -configure options for the specified port using dialog(1). +configure OPTIONS for the specified port. +.It Fl F +browse www.freshports.org port's entry. [text WWW browser required] .It Fl f show the packing list instructions for the port. .It Fl g @@ -70,40 +74,40 @@ search the ports tree according to ports' descriptions. .It Fl k show the deinstall script (if any) for the installed port. -.It Fl l -display short info about all installed ports. [no arguments] .It Fl L show the files within the installed port. -.It Fl m -display port's Makefile. +.It Fl l +display short info about all installed ports. [no arguments] .It Fl M show the install-message file for the installed port. -.It Fl o -display config options for the specified port. +.It Fl m +display port's Makefile. .It Fl O -remove config options for the specified port. +remove config OPTIONS for the specified port. +.It Fl o +display config OPTIONS for the specified port. .It Fl p search the ports tree and display short info about the port. -.It Fl q -show the latest available package in the FreeBSD repository. [-RELEASE] .It Fl Q -show the latest available package in the FreeBSD repository. [-STABLE] +display the latest available package in the FreeBSD repository. [-STABLE] +.It Fl q +display the latest available package in the FreeBSD repository. [-RELEASE] .It Fl r show the list of all port's dependencies. -.It Fl s -show the total size occupied by files installed within the port. .It Fl S search the ports tree and display info about the port. +.It Fl s +show the total size occupied by files installed within the port. .It Fl t list all installed ports with dates of their installation. [no arguments] .It Fl w which installed port owns the specified file. .It Fl v list all installed ports and possible updates. [no arguments] -.It Fl z -display dynamic object dependencies for the specified port. .It Fl Z display all missing dynamic object dependencies. [no arguments] +.It Fl z +display dynamic object dependencies for the specified port. .El .Sh EXIT STATUS .Ex -std diff -ruN --exclude=CVS /usr/ports/ports-mgmt/bpkg/files/bpkg.sh.in /usr/home/akosela/downloads/bpkg-2.0.3/files/bpkg.sh.in --- /usr/ports/ports-mgmt/bpkg/files/bpkg.sh.in Sun Jul 27 21:19:22 2008 +++ /usr/home/akosela/downloads/bpkg-2.0.3/files/bpkg.sh.in Tue Aug 5 16:17:10 2008 @@ -309,13 +309,28 @@ pkg_makefile() { path=`cd /usr/ports && make search path=/$pkg$ | grep -w Path | \ - cut -d/ -f4,5` + sed -n 1p | cut -d/ -f4,5` [ -z "$path" ] && echo "bpkg: can't find the port in /usr/ports/" less /usr/ports/$path/Makefile 2>/dev/null exit 0 } +pkg_distinfo() +{ + path=`cd /usr/ports && make search path=/$pkg$ | grep -w Path | \ + sed -n 1p | cut -d/ -f4,5` + [ -z "$path" ] && echo "bpkg: can't find the port in /usr/ports/" + + for e in `cat /usr/ports/$path/distinfo 2>/dev/null | grep SIZE | \ + cut -d'=' -f2`; do + echo "`cat /usr/ports/$path/distinfo | grep $e | \ + sed 's/SIZE// ; s/(// ; s/)//' | \ + cut -d' ' -f2` `convert $e`" + done + exit 0 +} + make_search() { for e in $pkg; do @@ -365,9 +380,23 @@ for e in $pkg; do echo "ls $e*" >> /tmp/bpkg.tmp done - echo "ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys/Latest/" - ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys/Latest/ < /tmp/bpkg.tmp - rm /tmp/bpkg.tmp + cat /tmp/bpkg.tmp | sed s/[0-9][0-9].*/*/ > /tmp/bpkg1.tmp + + echo "ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-stable/Latest/" + ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys/Latest/ < /tmp/bpkg1.tmp > /tmp/bpkg2.tmp + ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys/All/ < /tmp/bpkg1.tmp > /tmp/bpkg3.tmp + + n=1 + for e in `cat /tmp/bpkg2.tmp | awk '{print $9}' | cut -d. -f1`; do + size_pkg=`cat /tmp/bpkg2.tmp | sed '/^[A-Z]/d' | \ + sed -n ${n}p | awk '{print $11}' | cut -d/ -f3` + size=`cat /tmp/bpkg3.tmp | grep $size_pkg | awk '{print $5}'` + mtime=`cat /tmp/bpkg3.tmp | grep $size_pkg | \ + awk '{print $6, $7, $8}'` + echo "$e -> $size_pkg `convert $size` [$mtime]" + n=`expr $n + 1` + done + rm /tmp/bpkg*.tmp exit 0 } @@ -378,9 +407,23 @@ for e in $pkg; do echo "ls $e*" >> /tmp/bpkg.tmp done + cat /tmp/bpkg.tmp | sed s/[0-9][0-9].*/*/ > /tmp/bpkg1.tmp + echo "ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-stable/Latest/" - ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-stable/Latest/ < /tmp/bpkg.tmp - rm /tmp/bpkg.tmp + ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-stable/Latest/ < /tmp/bpkg1.tmp > /tmp/bpkg2.tmp + ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-stable/All/ < /tmp/bpkg1.tmp > /tmp/bpkg3.tmp + + n=1 + for e in `cat /tmp/bpkg2.tmp | awk '{print $9}' | cut -d. -f1`; do + size_pkg=`cat /tmp/bpkg2.tmp | sed '/^[A-Z]/d' | \ + sed -n ${n}p | awk '{print $11}' | cut -d/ -f3` + size=`cat /tmp/bpkg3.tmp | grep $size_pkg | awk '{print $5}'` + mtime=`cat /tmp/bpkg3.tmp | grep $size_pkg | \ + awk '{print $6, $7, $8}'` + echo "$e -> $size_pkg `convert $size` [$mtime]" + n=`expr $n + 1` + done + rm /tmp/bpkg*.tmp exit 0 } @@ -569,6 +612,22 @@ exit 0 } +pkg_freshports() +{ + browser=`ls /usr/local/bin/w3m 2>/dev/null || \ + ls /usr/local/bin/lynx 2>/dev/null || \ + ls /usr/local/bin/links 2>/dev/null` + if [ -z "$browser" ]; then + echo "bpkg: text WWW browser required" + else + echo "Loading..." + path=`cd /usr/ports && make search path=/$pkg | grep -w Path | \ + sed -n 1p | cut -d/ -f4,5` + $browser http://www.freshports.org/$path + fi + exit 0 +} + make_ldd() { for e in $pkg; do @@ -801,12 +860,34 @@ exit 0 } +convert() +{ + kilo=$(echo "scale=1; $1/1024" | bc ) + kiloint=$(echo "$1/1024" | bc ) + + mega=$(echo "scale=1; $kilo/1024" | bc ) + megaint=$(echo "$kilo/1024" | bc ) + + giga=$(echo "scale=1; $mega/1024" | bc ) + gigaint=$(echo "$mega/1024" | bc ) + + if [ $kiloint -lt 1 ]; then + echo "$1 bytes" + elif [ $megaint -lt 1 ]; then + echo "${kilo}K" + elif [ $gigaint -lt 1 ]; then + echo "${mega}M" + else + echo "${giga}G" + fi +} + help() { echo "bpkg version `pkg_info -xI bpkg | cut -d- -f2 | cut -d' ' -f1`" echo "" - echo "Usage: bpkg [-bdefgiIjkLmMoOpqQrsSwz] pkg-name ..." - echo " bpkg [-cChltvZ]" + echo "Usage: bpkg [-bDdeFfgIijkLMmOopQqrSswz] pkg-name ..." + echo " bpkg [-CchltvZ]" echo "" echo "Please see the bpkg(8) man page for more information" echo "" @@ -816,54 +897,58 @@ # End of functions ############################################################################### -while getopts b:d:e:f:g:i:I:j:k:L:m:M:o:O:p:q:Q:r:s:S:w:z:cChltvZ opts; do +while getopts b:D:d:e:F:f:g:I:i:j:k:L:M:m:O:o:p:Q:q:r:S:s:w:z:CchltvZ opts; do case $opts in b) pkg=$OPTARG pkg_backup;; + D) pkg=$OPTARG + pkg_distinfo;; d) pkg=$OPTARG pkg_info-x;; e) pkg=$OPTARG make_config;; + F) pkg=$OPTARG + pkg_freshports;; f) pkg=$OPTARG pkg_info-xf;; g) pkg=$OPTARG pkg_info-xg;; - i) pkg=$OPTARG - make_search;; I) pkg=$OPTARG pkg_info-xI;; + i) pkg=$OPTARG + make_search;; j) pkg=$OPTARG make_search_info;; k) pkg=$OPTARG pkg_info-xk;; L) pkg=$OPTARG pkg_info-xL;; - m) pkg=$OPTARG - pkg_makefile;; M) pkg=$OPTARG pkg_info-xD;; - o) pkg=$OPTARG - make_showc;; + m) pkg=$OPTARG + pkg_makefile;; O) pkg=$OPTARG make_rmc;; + o) pkg=$OPTARG + make_showc;; p) pkg=$OPTARG pkg_path;; - q) pkg=$OPTARG - pkg_ftp;; Q) pkg=$OPTARG pkg_latestftp;; + q) pkg=$OPTARG + pkg_ftp;; r) pkg=$OPTARG pkg_info-xr;; - s) pkg=$OPTARG - pkg_info-xs;; S) pkg=$OPTARG make_search_S;; + s) pkg=$OPTARG + pkg_info-xs;; w) pkg=$OPTARG pkg_which-;; z) pkg=$OPTARG make_ldd;; - c) pkg_clean;; C) pkg_clean2;; + c) pkg_clean;; h) help;; l) pkg_inf;; t) pkg_time;; --- bpkg-2.0.3.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080805145954.423DF67CA6>