pkg version -Xs foo shows all ports, not just foo

Baptiste Daroussin bapt at FreeBSD.org
Wed Apr 11 14:14:02 UTC 2012


On Wed, Apr 11, 2012 at 08:59:30PM +0930, Wayne Sierke wrote:
> On Wed, 2012-04-11 at 09:07 +0200, Julien Laffaye wrote:
> > On 4/11/2012 8:16 AM, Wayne Sierke wrote:
> > > On Tue, 2012-04-10 at 13:47 -0700, Greg Byshenk wrote:
> > >> On Tue, Apr 10, 2012 at 08:55:41PM +0100, Anton Shterenlikht wrote:
> > >>> BUZI>  pkg version -Xs Image
> > >>> CalculiX-2.4                       =
> > >>> GraphicsMagick-1.1.15_3,1          =
> > >>> ImageMagick-6.7.5.10               =
> > >>> ORBit2-2.14.19                     =
> > >>> OpenEXR-1.6.1_3                    =
> > >>> R-2.14.2                           =
> > >>> ^C
> > >>> BUZI>
> > >>>
> > >>> The man page seems to indicate that the
> > >>> above options should only show ImageMagick.
> > >>>
> > >>> What am I doing wrong?
> > > Is it a transcription error or are you really using a command named
> > > "pkg" rather than pkg_version(1)?
> > I think he is using pkgng.
> 
> Ah, ok. I hadn't looked at pkgng yet.
> 
> Looks like those options aren't implemented yet:
> 
> mika# pwd ; grep -En -C1 "VERSION_STRING|VERSION_EREGEX" ./pkg/version.c
> /usr/ports/ports-mgmt/pkg/work/pkg-1.0-beta10
> 208-                    case 'X':
> 209:                            opt |= VERSION_EREGEX;
> 210-                            break;
> 211-                    case 's':
> 212:                            opt |= VERSION_STRING;
> 213-                            break;
> mika# grep -Ewr "VERSION_STRING|VERSION_EREGEX" .
> ./pkg/pkgcli.h:#define VERSION_EREGEX (1<<6)
> ./pkg/pkgcli.h:#define VERSION_STRING (1<<7)
> ./pkg/version.c:                                opt |= VERSION_EREGEX;
> ./pkg/version.c:                                opt |= VERSION_STRING;
> mika# 
> 
> 

implemented now: 
https://github.com/pkgng/pkgng/commit/faac85fec181eafc539c8d5473c045a4e34ebfcf

in what I think is a better way (without s and with more option):
pkg version -X foo = Extended regular expression 
pkg version -x foo = regular expression
pkg version -g foo = glob
pkg version -e foo = exact match

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120411/4b1b6aee/attachment.pgp


More information about the freebsd-ports mailing list