From owner-freebsd-current@FreeBSD.ORG Sat May 1 07:50:39 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6572816A4CE for ; Sat, 1 May 2004 07:50:39 -0700 (PDT) Received: from fillmore.dyndns.org (port-212-202-49-130.reverse.qsc.de [212.202.49.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6E5543D2D for ; Sat, 1 May 2004 07:50:38 -0700 (PDT) (envelope-from eikemeier@fillmore-labs.com) Received: from [172.16.0.2] (helo=fillmore-labs.com) by fillmore.dyndns.org with esmtp (Exim 4.32; FreeBSD) id 1BJvp2-0000Nw-N5; Sat, 01 May 2004 16:50:34 +0200 Message-ID: <4093B938.3000809@fillmore-labs.com> Date: Sat, 01 May 2004 16:50:32 +0200 From: Oliver Eikemeier Organization: Fillmore Labs GmbH - http://www.fillmore-labs.com/ MIME-Version: 1.0 To: Roman Neuhauser References: <4093915F.4090403@fillmore-labs.com> <20040501142926.GB599@isis.wad.cz> In-Reply-To: <20040501142926.GB599@isis.wad.cz> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit User-Agent: KMail/1.5.9 cc: FreeBSD -CURRENT Subject: Re: pkg_install patches for review / testing X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 May 2004 14:50:39 -0000 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