From e29ff365246bf1e509aa88e3965ebea6d31f2656 Mon Sep 17 00:00:00 2001 From: Wesley Shields Date: Wed, 8 Feb 2012 14:17:42 +0000 Subject: Update to 2.1.6 PR: ports/164810 Submitted by: Andy Kosela --- ports-mgmt/bpkg/Makefile | 2 +- ports-mgmt/bpkg/files/bpkg.8 | 44 ++++++++++++----------- ports-mgmt/bpkg/files/bpkg.sh.in | 78 ++++++++++++++++++---------------------- 3 files changed, 58 insertions(+), 66 deletions(-) (limited to 'ports-mgmt/bpkg') diff --git a/ports-mgmt/bpkg/Makefile b/ports-mgmt/bpkg/Makefile index 0e7e8cdf2f49..307d82c664bd 100644 --- a/ports-mgmt/bpkg/Makefile +++ b/ports-mgmt/bpkg/Makefile @@ -8,7 +8,7 @@ # PORTNAME= bpkg -PORTVERSION= 2.1.5 +PORTVERSION= 2.1.6 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff --git a/ports-mgmt/bpkg/files/bpkg.8 b/ports-mgmt/bpkg/files/bpkg.8 index 187232c19852..69d5cd724960 100644 --- a/ports-mgmt/bpkg/files/bpkg.8 +++ b/ports-mgmt/bpkg/files/bpkg.8 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2007-2010 Andy Kosela +.\" Copyright (c) 2007-2012 Andy Kosela .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd September 24, 2010 +.Dd February 6, 2012 .Dt BPKG 8 .Os .Sh NAME @@ -33,7 +33,7 @@ .Nd a simple tool for displaying information about ports. .Sh SYNOPSIS .Nm -.Op Fl abDdeFfgIijkLMmOopQqrswz +.Op Fl abDdEeFfgIijkLMmOopQqrswz .Ar pkg-name ... .Nm .Op Fl BCchltvZ @@ -47,35 +47,38 @@ useful info about installed ports and the whole ports tree. The following command line arguments are supported: .Bl -tag -width F1 .It Fl a -show what dependent ports are, and are not installed. [portmaster +show what dependent ports are, and are not installed. [portmaster required] .It Fl B -create backup packages in /var/tmp/bpkg/ from all locally installed -ports. +create backup packages in /usr/ports/packages/bpkg from all locally +installed ports. .It Fl b -create backup package in /var/tmp/bpkg/ from a locally installed port. +create backup package in /usr/ports/packages/bpkg from a locally +installed port. .It Fl C clean all distfiles in /usr/ports/distfiles/* and also all work -directories of the ports tree /usr/ports/*/*/work/ [no arguments] +directories of the ports tree /usr/ports/*/*/work [no arguments] .It Fl c -clean all distfiles in /usr/ports/distfiles/* [no arguments] +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 +display available package in the FreeBSD repository. [-CURRENT] .It Fl e configure OPTIONS for the specified port. .It Fl F -browse www.freshports.org port's entry. [text WWW browser required] +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 show files that do not match the recorded checksum in the specified installed port. .It Fl h -display help. [no arguments] +display help. [no arguments] .It Fl i -display short description of the port (priority -- installed ports). +display short description of the port [priority -- installed ports] .It Fl I display info about the port. .It Fl j @@ -85,7 +88,7 @@ show the deinstall script (if any) for the installed port. .It Fl L show the files within the installed port. .It Fl l -display short info about all installed ports. [no arguments] +display short info about all installed ports. [no arguments] .It Fl M show the install-message file for the installed port. .It Fl m @@ -97,24 +100,22 @@ display config OPTIONS for the specified port. .It Fl p search the ports tree and display short info about each port. .It Fl Q -display the latest available package in the FreeBSD repository. -[-STABLE] +display available package in the FreeBSD repository. [-STABLE] .It Fl q -display the latest available package in the FreeBSD repository. -[-RELEASE] +display 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 t -list all installed ports with dates of their installation. [no +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] +list all installed ports and possible updates. [no arguments] .It Fl Z -display all missing dynamic object dependencies. [no arguments] +display all missing dynamic object dependencies. [no arguments] .It Fl z display dynamic object dependencies for the specified port. .El @@ -139,7 +140,8 @@ Display 10 most recently installed ports. .Pp .Dl "$ bpkg -b 'foo bar'" .Pp -Create backup packages of foo and bar in /var/tmp/bpkg directory. +Create backup packages of foo and bar in /usr/ports/packages/bpkg +directory. .Sh SEE ALSO .Xr pkg_add 1 , .Xr pkg_create 1 , diff --git a/ports-mgmt/bpkg/files/bpkg.sh.in b/ports-mgmt/bpkg/files/bpkg.sh.in index f0788056624f..6e55896c15f2 100644 --- a/ports-mgmt/bpkg/files/bpkg.sh.in +++ b/ports-mgmt/bpkg/files/bpkg.sh.in @@ -321,56 +321,44 @@ make_search_info() exit 0 } -pkg_ftp() +pkg_releaseftp() { - local arch sys e n size_pkg size mtime - - arch=`uname -m` sys=`uname -r | cut -d- -f1` + branch='-release' + pkg_ftp +} - [ -e /tmp/bpkg*.tmp ] && rm /tmp/bpkg*.tmp 1>/dev/null 2>&1 - for e in $pkg; do - echo "ls $e*" >> /tmp/bpkg.tmp - done - sed -i '' s/[0-9][0-9].*/*/ /tmp/bpkg.tmp - - echo "ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-release/Latest/" - echo "Loading data..." - ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-release/Latest/ < /tmp/bpkg.tmp > /tmp/bpkg1.tmp - ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-release/All/ < /tmp/bpkg.tmp > /tmp/bpkg2.tmp +pkg_stableftp() +{ + sys=`uname -r | cut -d. -f1` + branch='-stable' + pkg_ftp +} - n=1 - for e in `cat /tmp/bpkg1.tmp | awk '{print $9}' | cut -d. -f1` - do - size_pkg=`cat /tmp/bpkg1.tmp | sed '/^[A-Z]/d' | sed -n ${n}p | - awk '{print $11}' | cut -d/ -f3` - size=`cat /tmp/bpkg2.tmp | grep $size_pkg | awk '{print $5}'` - mtime=`cat /tmp/bpkg2.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 +pkg_currentftp() +{ + sys='' + branch=current + pkg_ftp } -pkg_latestftp() +pkg_ftp() { - local arch sys e n size_pkg size mtime + local arch site e n size_pkg size mtime arch=`uname -m` - sys=`uname -r | cut -d. -f1` + site='ftp.freebsd.org/pub/FreeBSD/ports' - [ -e /tmp/bpkg*.tmp ] && rm /tmp/bpkg*.tmp 1>/dev/null 2>&1 + [ -e /tmp/bpkg*.tmp ] && rm -f /tmp/bpkg*.tmp 1>/dev/null 2>&1 for e in $pkg; do echo "ls $e*" >> /tmp/bpkg.tmp done sed -i '' s/[0-9][0-9].*/*/ /tmp/bpkg.tmp - echo "ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-stable/Latest/" + echo "$site/$arch/packages-${sys}$branch/Latest/" echo "Loading data..." - ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-stable/Latest/ < /tmp/bpkg.tmp > /tmp/bpkg1.tmp - ftp -4Va ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-$sys-stable/All/ < /tmp/bpkg.tmp > /tmp/bpkg2.tmp + ftp -4Va ftp://$site/$arch/packages-${sys}$branch/Latest/ < /tmp/bpkg.tmp > /tmp/bpkg1.tmp + ftp -4Va ftp://$site/$arch/packages-${sys}$branch/All/ < /tmp/bpkg.tmp > /tmp/bpkg2.tmp n=1 for e in `cat /tmp/bpkg1.tmp | awk '{print $9}' | cut -d. -f1` @@ -383,7 +371,7 @@ pkg_latestftp() echo "$e -> $size_pkg `convert $size` [$mtime]" n=`expr $n + 1` done - rm /tmp/bpkg*.tmp + rm -f /tmp/bpkg*.tmp exit 0 } @@ -429,9 +417,9 @@ pkg_backup() fi pkg_install=`pkg_info -xoQ ^$pkg | cut -d: -f1 | awk '{ORS=" " ;print}'` - echo "Creating backup package(s) "$pkg_install"in /var/tmp/bpkg/" - [ ! -d /var/tmp/bpkg/ ] && mkdir /var/tmp/bpkg/ - cd /var/tmp/bpkg/ + echo "Creating backup package(s) "$pkg_install"in /usr/ports/packages/bpkg" + [ ! -d /usr/ports/packages/bpkg ] && mkdir -p /usr/ports/packages/bpkg + cd /usr/ports/packages/bpkg for e in $pkg; do i=`pkg_info -xoQ ^$e | cut -d: -f1` @@ -446,9 +434,9 @@ pkg_backup_all() local e root - echo "Creating backup packages in /var/tmp/bpkg" - [ ! -d /var/tmp/bpkg/ ] && mkdir /var/tmp/bpkg - cd /var/tmp/bpkg + echo "Creating backup packages in /usr/ports/packages/bpkg" + [ ! -d /usr/ports/packages/bpkg ] && mkdir -p /usr/ports/packages/bpkg + cd /usr/ports/packages/bpkg for e in `pkg_info -Ea`; do pkg_create -b "$e" 1>/dev/null 2>&1 @@ -751,7 +739,7 @@ help() ######################################################################## while -getopts a:b:D:d:e:F:f:g:I:i:j:k:L:M:m:O:o:p:Q:q:r:s:w:z:BCchltvZ opts +getopts a:b:D:d:E:e:F:f:g:I:i:j:k:L:M:m:O:o:p:Q:q:r:s:w:z:BCchltvZ opts do case $opts in a) pkg=$OPTARG @@ -765,6 +753,8 @@ do d) pkg=$OPTARG check_index pkg_info-x ;; + E) pkg=$OPTARG + pkg_currentftp ;; e) pkg=$OPTARG check_index make_config ;; @@ -804,9 +794,9 @@ do check_index pkg_path ;; Q) pkg=$OPTARG - pkg_latestftp ;; + pkg_stableftp ;; q) pkg=$OPTARG - pkg_ftp ;; + pkg_releaseftp ;; r) pkg=$OPTARG check_index pkg_info-xr ;; -- cgit v1.2.3