Date: Fri, 21 Sep 2007 14:39:04 +0200 From: Martin Kammerhofer <dada@pluto.tugraz.at> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/116512: ports-mgmt/portless: upgrade to 0.2.7 Message-ID: <200709211239.l8LCd4vK026021@pluto.tugraz.at> Resent-Message-ID: <200709211320.l8LDK1To005485@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <mkamm@gmx.net> .\" 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 <mkamm@gmx.net> +# Copyright (c) 2006, 2007 Martin Kammerhofer <mkamm@gmx.net> # 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709211239.l8LCd4vK026021>