From owner-svn-src-head@FreeBSD.ORG Tue Jul 20 14:26:09 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E5041065670 for ; Tue, 20 Jul 2010 14:26:09 +0000 (UTC) (envelope-from kozlov@ravenloft.kiev.ua) Received: from hosting.nash.net.ua (hosting.nash.net.ua [193.151.252.10]) by mx1.freebsd.org (Postfix) with SMTP id 6B7F48FC1D for ; Tue, 20 Jul 2010 14:26:07 +0000 (UTC) Received: (qmail 7090 invoked by uid 509); 20 Jul 2010 14:26:06 -0000 Received: from ravenloft.kiev.ua (94.244.131.95) by hosting.nash.net.ua with SMTP; 20 Jul 2010 14:26:06 -0000 Date: Tue, 20 Jul 2010 17:25:05 +0300 From: Alex Kozlov To: Jilles Tjoelker , Gabor Kovesdan , svn-src-head@freebsd.org, spam@rm-rf.kiev.ua Message-ID: <20100720142505.GA28760@ravenloft.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: Subject: Re: svn commit: r210254 - in head/etc: defaults periodic/security X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 14:26:09 -0000 On Tue, Jul 20, 2010 at 02:58:46PM +0200, Jilles Tjoelker wrote: > On Mon, Jul 19, 2010 at 08:19:14PM +0000, Gabor Kovesdan wrote: > > + pkg_info -ga 2>/dev/null | \ > > The stderr output is also interesting, as it contains error messages > about files that are in a package but do not exist. Unfortunately, > pkg_info -ga 2>&1 | ... > will mix the stderr with the stdout in an unusable way. I suppose > pkg_info -g should be modified so the missing files are in the stdout. I know, but I couldn't find a reliable way to parse mixed output. If You modify pkg_info it will be great. I immediately fix this script. > > + ;; > > + Mismatched|'') ;; > > + *) > > + if [ -n ${name} ]; then > Note that this is true if name is empty or not set. You probably want > [ -n "${name}" ] Yes, good catch. > > > + echo ${name}: ${one} > > This handles pathnames with spaces incorrectly. Consider reading lines > with > IFS= read -r line > This also collapses the nested case statements to one, for > 'Information for'*, Mismatched*, '' and /*. > > The variables in the echo commands should be quoted to avoid word > splitting and pathname generation. It's makes parser stateful and overly complex, I will think about most simple way to do this. Fortunately, at the moment very few, if any, ports have files with space in names. -- Adios