Re: pkg_install patches for review / testing

From: Oliver Eikemeier <eikemeier_at_fillmore-labs.com>
Date: Sat, 01 May 2004 16:50:32 +0200
Roman Neuhauser wrote:

> # eikemeier_at_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
Received on Sat May 01 2004 - 05:50:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:52 UTC