From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Sep 22 10:30:04 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32E1A16A421 for ; Sat, 22 Sep 2007 10:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0A64B13C459 for ; Sat, 22 Sep 2007 10:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l8MAU3Ig086718 for ; Sat, 22 Sep 2007 10:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l8MAU30G086717; Sat, 22 Sep 2007 10:30:03 GMT (envelope-from gnats) Resent-Date: Sat, 22 Sep 2007 10:30:03 GMT Resent-Message-Id: <200709221030.l8MAU30G086717@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 [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF13F16A417 for ; Sat, 22 Sep 2007 10:24:16 +0000 (UTC) (envelope-from root@aegis.um.lublin.pl) Received: from aegis.um.lublin.pl (aegis.um.lublin.pl [193.93.68.20]) by mx1.freebsd.org (Postfix) with ESMTP id 29CF013C44B for ; Sat, 22 Sep 2007 10:24:15 +0000 (UTC) (envelope-from root@aegis.um.lublin.pl) Received: from localhost (localhost [127.0.0.1]) by aegis.um.lublin.pl (Postfix) with ESMTP id 34EDA6789D; Sat, 22 Sep 2007 12:25:37 +0200 (CEST) Received: from aegis.um.lublin.pl ([127.0.0.1]) by localhost (aegis.um.lublin.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HWxxL39Oz-zq; Sat, 22 Sep 2007 12:25:36 +0200 (CEST) Received: by aegis.um.lublin.pl (Postfix, from userid 0) id 608386789C; Sat, 22 Sep 2007 12:25:36 +0200 (CEST) Message-Id: <20070922102536.608386789C@aegis.um.lublin.pl> Date: Sat, 22 Sep 2007 12:25:36 +0200 (CEST) From: Andy Kosela To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: andy.kosela@gmail.com Subject: ports/116545: [MAINTAINER-UPDATE] ports-mgmt/bpkg: update to 1.6 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: Sat, 22 Sep 2007 10:30:04 -0000 >Number: 116545 >Category: ports >Synopsis: [MAINTAINER-UPDATE] ports-mgmt/bpkg: update to 1.6 >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: Sat Sep 22 10:30:03 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Andy Kosela >Release: FreeBSD 6.2-RELEASE-p2 i386 >Organization: Protect Ya Neck Records/Wu-Tang Management >Environment: System: FreeBSD aegis.um.lublin.pl 6.2-RELEASE-p2 FreeBSD 6.2-RELEASE-p2 #0: Tue Feb 27 22:56:09 UTC 2007 >Description: - Update to 1.6 >How-To-Repeat: >Fix: --- bpkg-1.6.patch begins here --- diff -ruN --exclude=CVS /usr/ports/ports-mgmt/bpkg/Makefile /usr/home/spear/downloads/bpkg-1.6/Makefile --- /usr/ports/ports-mgmt/bpkg/Makefile Fri Sep 14 12:22:15 2007 +++ /usr/home/spear/downloads/bpkg-1.6/Makefile Sat Sep 22 11:39:39 2007 @@ -2,13 +2,13 @@ # Date created: 24 June 2007 # Whom: Andy Kosela # -# $FreeBSD: ports/ports-mgmt/bpkg/Makefile,v 1.7 2007/09/14 10:22:15 miwi Exp $ +# $FreeBSD$ # # This port is self contained in the files directory. # PORTNAME= bpkg -PORTVERSION= 1.5 +PORTVERSION= 1.6 CATEGORIES= ports-mgmt MASTER_SITES= # none DISTFILES= # none diff -ruN --exclude=CVS /usr/ports/ports-mgmt/bpkg/files/bpkg.8 /usr/home/spear/downloads/bpkg-1.6/files/bpkg.8 --- /usr/ports/ports-mgmt/bpkg/files/bpkg.8 Fri Aug 17 10:42:35 2007 +++ /usr/home/spear/downloads/bpkg-1.6/files/bpkg.8 Sat Sep 22 12:20:48 2007 @@ -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 @@ 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 @@ .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 @@ 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 -ruN --exclude=CVS /usr/ports/ports-mgmt/bpkg/files/bpkg.sh.in /usr/home/spear/downloads/bpkg-1.6/files/bpkg.sh.in --- /usr/ports/ports-mgmt/bpkg/files/bpkg.sh.in Fri Sep 14 12:22:15 2007 +++ /usr/home/spear/downloads/bpkg-1.6/files/bpkg.sh.in Sat Sep 22 12:12:02 2007 @@ -1,5 +1,5 @@ #!/bin/sh -# $FreeBSD: ports/ports-mgmt/bpkg/files/bpkg.sh.in,v 1.6 2007/09/14 10:22:15 miwi Exp $ +# $FreeBSD$ # Copyright (c) 2007 Andy Kosela # All rights reserved. @@ -114,6 +114,81 @@ 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 @@ 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 @@ 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 @@ # 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 @@ 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 --- bpkg-1.6.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: