Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 May 2004 16:50:32 +0200
From:      Oliver Eikemeier <eikemeier@fillmore-labs.com>
To:        Roman Neuhauser <neuhauser@chello.cz>
Cc:        FreeBSD -CURRENT <current@freebsd.org>
Subject:   Re: pkg_install patches for review / testing
Message-ID:  <4093B938.3000809@fillmore-labs.com>
In-Reply-To: <20040501142926.GB599@isis.wad.cz>
References:  <4093915F.4090403@fillmore-labs.com> <20040501142926.GB599@isis.wad.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
Roman Neuhauser wrote:

> # eikemeier@fillmore-labs.com / 2004-05-01 14:00:31 +0200:
> 
>>This patch add the following features to the pkg_install suite of tools:
>>
>>* new flags:
>>
>> -X: use extended regular expression instead of basic ones (pkg_info, 
>>     pkg_delete, pkg_version) (PR 56961)
> 
>> -E: show only matching package names and set the return code (pkg_info)
>>     (PR 56961)
> 
>     Shouldn't these two be swapped to match sed, grep, etc?

I've modeled them after -x and -e:

pkg_info -x -> regular expressions, pkg_info -X -> exended regular expressions

pkg_info -e -> test if a package is installed, pkg_info -E -> test if installed packages are matched by a glob pattern (and display the matched names).

To achieve the latter bsd.port.mk currently does `ls -d /var/db/pkg/PATTERN 2>/dev/null'.

The pkg_* tools have a plethora of inconsistent knobs, but they are mainly used in scripts. I don't really care, but I already use -E in portaudit, so do you think it is really worth the effort? Of
course I *can* check the version number, so switching the flags is possible.

-Oliver



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4093B938.3000809>