pkg_install patches for review / testing
Oliver Eikemeier
eikemeier at fillmore-labs.com
Sat May 1 07:50:39 PDT 2004
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
More information about the freebsd-current
mailing list