From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Sep 21 13:20:01 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 6D08D16A46B for ; Fri, 21 Sep 2007 13:20:01 +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 471DF13C4A5 for ; Fri, 21 Sep 2007 13:20:01 +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 l8LDK16M005486 for ; Fri, 21 Sep 2007 13:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l8LDK1To005485; Fri, 21 Sep 2007 13:20:01 GMT (envelope-from gnats) Resent-Date: Fri, 21 Sep 2007 13:20:01 GMT Resent-Message-Id: <200709211320.l8LDK1To005485@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, Martin Kammerhofer Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82CD616A46D for ; Fri, 21 Sep 2007 13:11:54 +0000 (UTC) (envelope-from dada@pluto.tugraz.at) Received: from mailrelay.tugraz.at (mailrelay.tu-graz.ac.at [129.27.2.202]) by mx1.freebsd.org (Postfix) with ESMTP id 14E0113C4BB for ; Fri, 21 Sep 2007 13:11:49 +0000 (UTC) (envelope-from dada@pluto.tugraz.at) Received: from pluto.tugraz.at (pluto.tu-graz.ac.at [129.27.3.200]) by mailrelay1.tugraz.at (8.14.1/8.14.1) with ESMTP id l8LCdBIm023474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 21 Sep 2007 14:39:11 +0200 (CEST) Received: from pluto.tugraz.at (localhost.localdomain [127.0.0.1]) by pluto.tugraz.at (8.13.8/8.13.8) with ESMTP id l8LCd42h026022 for ; Fri, 21 Sep 2007 14:39:05 +0200 Received: (from dada@localhost) by pluto.tugraz.at (8.13.8/8.13.8/Submit) id l8LCd4vK026021 for freebsd-gnats-submit@freebsd.org; Fri, 21 Sep 2007 14:39:04 +0200 Message-Id: <200709211239.l8LCd4vK026021@pluto.tugraz.at> Date: Fri, 21 Sep 2007 14:39:04 +0200 From: Martin Kammerhofer To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: ports/116512: ports-mgmt/portless: upgrade to 0.2.7 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: Fri, 21 Sep 2007 13:20:01 -0000 >Number: 116512 >Category: ports >Synopsis: ports-mgmt/portless: upgrade to 0.2.7 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Sep 21 13:20:00 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Martin Kammerhofer >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD Martin.liebt.Susi 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Aug 19 14:22:22 CEST 2007 toor@Martin.liebt.Susi:/usr/obj/usr/src/sys/P2B-S i386 >Description: Ignore trailing slash in port globs. Optionally narrow selected ports by grepping the pkg-descr files. >How-To-Repeat: >Fix: diff -ru /usr/ports/ports-mgmt/portless/Makefile ./Makefile --- /usr/ports/ports-mgmt/portless/Makefile 2007-02-05 02:08:30.000000000 +0100 +++ ./Makefile 2007-09-21 10:46:38.000000000 +0200 @@ -6,7 +6,7 @@ # PORTNAME= portless -PORTVERSION= 0.2.5 +PORTVERSION= 0.2.7 CATEGORIES= ports-mgmt MASTER_SITES= # empty DISTFILES= # none diff -ru /usr/ports/ports-mgmt/portless/files/portless.1 ./files/portless.1 --- /usr/ports/ports-mgmt/portless/files/portless.1 2007-02-05 03:18:06.000000000 +0100 +++ ./files/portless.1 2007-09-21 11:23:00.000000000 +0200 @@ -1,4 +1,4 @@ -.\" Copyright (c) 2006 Martin Kammerhofer +.\" Copyright (c) 2006, 2007 Martin Kammerhofer .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,11 +22,11 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)portless.1,v 1.10 2006/08/30 09:36:44 martin Exp +.\" @(#)portless.1,v 1.14 2007/09/21 09:23:00 martin Exp .\" .\" Note: The date here should be updated whenever a non-trivial .\" change is made to the manual page. -.Dd August 30, 2006 +.Dd September 21, 2007 .Dt PORTLESS 1 .Os .Sh NAME @@ -35,10 +35,12 @@ .Sh SYNOPSIS .Nm .Op Fl dfIiMmp +.Op Fl gG Ar 'pattern' .Op Fl P Ar pager .Ar portglob... .Nm -.Op Fl W | w +.Op Fl IWw +.Op Fl gG Ar 'pattern' .Ar portglob... .Sh DESCRIPTION .Nm @@ -55,6 +57,17 @@ Take the .Ar portglob argument literal (not as a shell glob). +.It Fl gG Ar 'pattern' +Filter the list of selected files with +.Xr grep 1 +\&. Option +.Fl G +differs from +.Fl g +only by using +.Pa fgrep +rather than +.Pa grep . .It Fl I Ignore case when matching .Ar portglob @@ -65,7 +78,9 @@ .Sq Li \&? , or .Sq Li [ -). +). Used together with +.Fl g +it also greps case insensitively. .It Fl i Display the .Pa distinfo @@ -131,10 +146,12 @@ .Dl "portless lang/\e*doc" .Dl "portless 'www/*python*'" .Sh SEE ALSO +The .Xr ports_glob 1 -from the +command (part of the .Pa ports-mgmt/portupgrade -port +port), +.Xr grep 1 . .Sh AUTHOR The .Nm diff -ru /usr/ports/ports-mgmt/portless/files/portless.sh ./files/portless.sh --- /usr/ports/ports-mgmt/portless/files/portless.sh 2006-08-30 17:14:00.000000000 +0200 +++ ./files/portless.sh 2007-09-21 11:23:01.000000000 +0200 @@ -1,9 +1,9 @@ #! @BASH@ -- -# (X)Emacs: -*- mode: Shell-Script; coding: iso8859-1; -*- -# @(#)portless.sh,v 1.12 2006/08/30 09:21:22 martin Exp +# (X)Emacs: -*- mode: Shell-Script; coding: latin-1; -*- +# @(#)portless.sh,v 1.17 2007/09/21 09:23:01 martin Exp # Show "pkg-descr" file of matching port(s). # -# Copyright (c) 2006 Martin Kammerhofer +# Copyright (c) 2006, 2007 Martin Kammerhofer # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -29,12 +29,13 @@ Script=`basename $0` # name of this script # set defaults -for opt in d f I i M m P p W w; do +for opt in d f g G I i M m P p W w; do eval opt_$opt="" done PORTSDIR=${PORTSDIR:-/usr/ports} PAGER=${PAGER:-less -e} PKGDESCR="pkg-descr" +GREP_PATTERN="" filelist="" rc=0 @@ -45,7 +46,7 @@ echo >&2 "$Script: $1" shift done - echo >&2 "usage: $Script [-dfIiMmp | -Ww] [-P pager] 'portglob'..." + echo >&2 "usage: $Script [-dfIiMmp | -Ww] [-gG pattern] [-P pager] 'portglob'..." exit 64 # EX_USAGE } @@ -60,15 +61,17 @@ } # process options -while getopts "D:dfIiMmpP:Wwx" option +while getopts "D:dfG:g:IiMmpP:Wwx" option do case "$option" in (D) PORTSDIR="$OPTARG";; # undocumented (d) addopt d "$PKGDESCR";; (f) opt_f="f";; + (G) GREP_PATTERN="$OPTARG"; opt_g="G"; opt_G="-F";; + (g) GREP_PATTERN="$OPTARG"; opt_g="g"; opt_G="";; (I) shopt -s nocaseglob || usage "option -I needs bash!" - opt_I="I";; + opt_I="-i";; (i) addopt i "distinfo";; (M) addopt M "Makefile";; (m) addopt m "pkg-message";; @@ -114,6 +117,10 @@ set -- "$@" "$PORTSDIR"$dirglob$portglob/"$f" fi done + if [ -n "$opt_g" ]; then + set -- $(grep -l $opt_G $opt_I -- "$GREP_PATTERN" "$@") + [ $# = 0 ] && return # grep found no match + fi if [ -n "$opt_W" -o -n "$opt_w" ]; then lstrip="" [ -n "$opt_W" ] && lstrip=-e\ 's;^.*/\([^/]*/[^/]*\)$;\1;' @@ -128,6 +135,7 @@ # main for p in "$@"; do + p=${p%/} # strip a trailing slash expr "$p" : ".*[$IFS]" >/dev/null && usage "portglob '$p' contains whitespace!" case "$p" in >Release-Note: >Audit-Trail: >Unformatted: