summaryrefslogtreecommitdiffstats
path: root/ports-mgmt
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-09-23 05:56:28 +0000
committerrafan <rafan@FreeBSD.org>2007-09-23 05:56:28 +0000
commitd110042313da0f3da8f17bb43371203713834730 (patch)
tree5f3d5da2880d8848cf067d312f43489414476f7b /ports-mgmt
parent349e050bb3d9673c2ff25f09739dc1a57874f6ce (diff)
downloadFreeBSD-ports-d110042313da0f3da8f17bb43371203713834730.zip
FreeBSD-ports-d110042313da0f3da8f17bb43371203713834730.tar.gz
- Update to 1.6
PR: ports/116545 Submitted by: Andy Kosela <andy.kosela at gmail.com> (maintainer)
Diffstat (limited to 'ports-mgmt')
-rw-r--r--ports-mgmt/bpkg/Makefile2
-rw-r--r--ports-mgmt/bpkg/files/bpkg.812
-rw-r--r--ports-mgmt/bpkg/files/bpkg.sh.in96
3 files changed, 103 insertions, 7 deletions
diff --git a/ports-mgmt/bpkg/Makefile b/ports-mgmt/bpkg/Makefile
index f8d984e..5b79713 100644
--- a/ports-mgmt/bpkg/Makefile
+++ b/ports-mgmt/bpkg/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= bpkg
-PORTVERSION= 1.5
+PORTVERSION= 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 6295a0b..beb5179 100644
--- a/ports-mgmt/bpkg/files/bpkg.8
+++ b/ports-mgmt/bpkg/files/bpkg.8
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.\"
-.Dd August 16, 2007
+.Dd September 22, 2007
.Dt BPKG 8
.Os
.Sh NAME
@@ -31,7 +31,7 @@
.Nd a simple tool for managing FreeBSD packages/ports.
.Sh SYNOPSIS
.Nm
-.Op Fl bBdDeEfFgiIkLmMnoOprsSwz
+.Op Fl bBdDeEfFgiIkLmMnoOpqQrsSwz
.Ar pkg-name ...
.Nm
.Op Fl aAcChltvZ
@@ -54,7 +54,7 @@ in .tbz format made from a port.
The following command line arguments are supported:
.Bl -tag -width F1
.It Ar pkg-name ...
-with no additional arguments, upgrade/install the specified packages.
+with no additional arguments, upgrade/install the specified packages from -RELEASE repository.
.It Fl a
upgrade all installed packages (interactive mode). [no arguments]
.It Fl A
@@ -80,7 +80,7 @@ compile and install the port itself.
.It Fl f
show the packing list instructions for the package/port.
.It Fl F
-show the latest available binary package in the FreeBSD repository.
+show the latest available binary package in the FreeBSD repository. [-RELEASE]
.It Fl g
show files that do not match the recorded checksum in the specified installed
package.
@@ -108,6 +108,10 @@ display config options for the specified package/port.
remove config options for the specified package/port.
.It Fl p
search the ports tree and display short info about the port.
+.It Fl q
+upgrade/install the specified packages from -STABLE repository.
+.It Fl Q
+show the latest available binary package in the FreeBSD repository. [-STABLE]
.It Fl r
show the list of all package/port's dependencies.
.It Fl s
diff --git a/ports-mgmt/bpkg/files/bpkg.sh.in b/ports-mgmt/bpkg/files/bpkg.sh.in
index cfc70fa..f831835 100644
--- a/ports-mgmt/bpkg/files/bpkg.sh.in
+++ b/ports-mgmt/bpkg/files/bpkg.sh.in
@@ -114,6 +114,81 @@ main() {
done
}
+pkg_latest() {
+ root
+ if [ -z "$pkg" ]; then
+ echo "bpkg: you didn't specify any package to install/upgrade"
+ exit 0
+ fi
+
+ echo "Available in ports:"
+ for e in $pkg; do
+ cd /usr/ports && make search path=/$e.* | awk '/Port/ /Path/ { print $0 "\n" }'
+ done
+
+ for z in $pkg; do
+ pkg_install=`cd /usr/ports && make search path=/$z.* | grep Path | cut -d/ -f4,5`
+
+ for e in $pkg_install; do
+ e_stripped=`echo $e | cut -d/ -f2`
+ e_installed=`grep $e$ /var/db/pkg/*/+CONTENTS | grep -w ORIGIN | cut -d/ -f5`
+
+ if [ -z "$e_installed" ]; then
+ echo -n "Do you want to install new $e? [y] "
+ else
+ echo -n "Do you want to upgrade installed $e_installed? [y] "
+ fi
+ read key
+ case $key in
+ n) ;;
+ *)
+ arch=`uname -m`
+ setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/$arch/packages-stable/Latest/
+
+ if [ ! -z "$e_installed" ]; then
+ echo -n "Creating backup package in /usr/tmp/$e_installed.tbz... "
+ cd /usr/tmp/ && pkg_create -b $e_installed
+ echo "Done."
+ fi
+
+ # Fetch and install binary package
+
+ echo ""
+ if [ ! -z "$e_installed" ]; then
+ if [ ! -z "`grep $e /root/ports.lst`" ]; then
+ echo "It seems you installed this package using ports."
+ echo "It is strongly recommended to upgrade it using also ports."
+ echo -n "Do you want to cancel this binary upgrade process? [y] "
+ read key
+ case $key in
+ n)
+ sed -i '' s,$e,,g /root/ports.lst ;;
+ *)
+ unsetenv PACKAGESITE
+ exit 0;;
+ esac
+ fi
+
+ echo "Upgrading installed package:"
+ pkg_delete -f $e_installed 1>/dev/null 2>&1
+ if [ ! -z `pkg_info -oq $e_installed 2>/dev/null` ]; then
+ echo "*** cannot proceed without first removing the package ***"
+ exit 0
+ fi
+ pkg_add -r $e_stripped
+ unsetenv PACKAGESITE
+ exit 0
+ else
+ echo "Installing new package:"
+ pkg_add -r $e_stripped
+ unsetenv PACKAGESITE
+ exit 0
+ fi;;
+ esac
+ done
+ done
+}
+
simulation() {
root
if [ -z "$pkg" ]; then
@@ -539,11 +614,24 @@ pkg_find() {
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
exit 0
}
+pkg_latestftp() {
+ arch=`uname -m`
+
+ for e in $pkg; do
+ echo "ls $e*" >> /tmp/bpkg.tmp
+ done
+ 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
+ exit 0
+}
+
pkg_delete-xr() {
root
z=`pkg_info -xoQ $pkg 2>/dev/null`
@@ -1026,7 +1114,7 @@ make_ldd_all() {
help() {
echo "bpkg version `pkg_info -xI bpkg | cut -d- -f2 | cut -d' ' -f1`"
echo ""
- echo "Usage: bpkg [-bBdDeEfFgiIkLmMnoOprsSwz] pkg-name ..."
+ echo "Usage: bpkg [-bBdDeEfFgiIkLmMnoOpqQrsSwz] pkg-name ..."
echo " bpkg [-aAcChltvZ]"
echo ""
echo "Please see the bpkg(8) man page for more information"
@@ -1037,7 +1125,7 @@ help() {
# End of functions
################################################################################
-while getopts b:B:d:D:e:E:f:F:g:i:I:k:L:m:M:n:o:O:p:r:s:S:w:z:aAcChltvZ opts; do
+while getopts b:B:d:D:e:E:f:F:g:i:I:k:L:m:M:n:o:O:p:q:Q:r:s:S:w:z:aAcChltvZ opts; do
case $opts in
b) pkg=$OPTARG
build_port;;
@@ -1077,6 +1165,10 @@ while getopts b:B:d:D:e:E:f:F:g:i:I:k:L:m:M:n:o:O:p:r:s:S:w:z:aAcChltvZ opts; do
make_rmc;;
p) pkg=$OPTARG
pkg_path;;
+ q) pkg=$OPTARG
+ pkg_latest;;
+ Q) pkg=$OPTARG
+ pkg_latestftp;;
r) pkg=$OPTARG
pkg_info-xr;;
s) pkg=$OPTARG
OpenPOWER on IntegriCloud