summaryrefslogtreecommitdiff
path: root/ports-mgmt/bpkg
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2007-08-17 08:42:35 +0000
committerMartin Matuska <mm@FreeBSD.org>2007-08-17 08:42:35 +0000
commit3e06c37cd37a6029c1ef1f05cef32bb9b7ba6819 (patch)
tree971ac252bb4c8e194f4f63ea2283e26da83bbffb /ports-mgmt/bpkg
parentPut the DISTFILE on MATER_SITE_LOCAL to fix fetch. (diff)
- Update to 1.4
PR: ports/115587 Submitted by: Andy Kosela <andy.kosela at gmail.com> (maintainer)
Diffstat (limited to 'ports-mgmt/bpkg')
-rw-r--r--ports-mgmt/bpkg/Makefile2
-rw-r--r--ports-mgmt/bpkg/files/bpkg.84
-rw-r--r--ports-mgmt/bpkg/files/bpkg.sh.in17
3 files changed, 20 insertions, 3 deletions
diff --git a/ports-mgmt/bpkg/Makefile b/ports-mgmt/bpkg/Makefile
index 4a251e05a84c..ed23e667d9cf 100644
--- a/ports-mgmt/bpkg/Makefile
+++ b/ports-mgmt/bpkg/Makefile
@@ -8,7 +8,7 @@
#
PORTNAME= bpkg
-PORTVERSION= 1.3
+PORTVERSION= 1.4
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 379cb0ab2b65..6295a0b6dad8 100644
--- a/ports-mgmt/bpkg/files/bpkg.8
+++ b/ports-mgmt/bpkg/files/bpkg.8
@@ -23,7 +23,7 @@
.\" SUCH DAMAGE.
.\"
.\"
-.Dd August 7, 2007
+.Dd August 16, 2007
.Dt BPKG 8
.Os
.Sh NAME
@@ -60,7 +60,7 @@ upgrade all installed packages (interactive mode). [no arguments]
.It Fl A
upgrade all installed packages (non-interactive mode). [no arguments]
.It Fl b
-upgrade/install the specified ports.
+upgrade/install the specified ports, update the list of installed ports in /root/ports.lst.
.It Fl B
create backup package file in /usr/tmp/ from a locally installed package.
.It Fl c
diff --git a/ports-mgmt/bpkg/files/bpkg.sh.in b/ports-mgmt/bpkg/files/bpkg.sh.in
index 374a8874ff51..2e0c8f71613e 100644
--- a/ports-mgmt/bpkg/files/bpkg.sh.in
+++ b/ports-mgmt/bpkg/files/bpkg.sh.in
@@ -84,6 +84,18 @@ main() {
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 ;;
+ *) 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
@@ -193,6 +205,7 @@ build_port() {
echo ""
if [ ! -z "$e_installed" ]; then
echo "Upgrading installed port:"
+ [ -z "`grep $e /root/ports.lst`" ] && echo $e >> /root/ports.lst
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 ***"
@@ -200,6 +213,7 @@ build_port() {
fi
else
echo "Installing new port:"
+ echo $e >> /root/ports.lst
fi
echo -n "Do you want to explicitly set config options now? [n] "
@@ -541,6 +555,9 @@ pkg_delete-xr() {
echo -e "\033[33m*** installed ***\033[0m"
pkg_info -xoQ $pkg | awk -F: '{OFS=": " ; print $2, $1}'
+ for e in $pkg; do
+ sed -i '' s,.*$e,,g /root/ports.lst
+ done
echo ""
echo -n "Do you want to use recursive removal? [n] "
read key