From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 13 15:40:03 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C88111065675 for ; Tue, 13 Jul 2010 15:40:03 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8FB7C8FC08 for ; Tue, 13 Jul 2010 15:40:03 +0000 (UTC) Received: by iwn35 with SMTP id 35so7348911iwn.13 for ; Tue, 13 Jul 2010 08:40:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=ZcKV+wuPa9gUkSMcMeKQ1gvujDR3aOA/Ah63E3rMZn0=; b=ULwuyNL2Q2DJLwwpp9ySb9ZM2wrkVFOXO93hPmor2FEuIsGV6D1GO2mu4xsoIl+q4j g1gnrmPQmQmFU+KNzy1SeNtwoQGNrmGlp9CWsoCtqkrqYDJEZOBuULmYve5h5E2woxk9 l5O4FIRC2aQn5hxtyH8SPhSiUOor9nQqCs+M0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=fDTIkyOEcZOGUQQF8bTZy9kzTzByvBwPtoCFM3I0P4jHEptez0O2czizRaTtXD6iiy utjZoy538MVIhBVz4FWXx5mpfcEdWuOHrlF0b6RkkPJy6XJZP2d4qd6y5KoIrrDbmoZg OP3U9Gs8uDActJt4epeU04mf1xDh0N9NLrlHU= MIME-Version: 1.0 Received: by 10.231.146.205 with SMTP id i13mr12397610ibv.30.1279033941887; Tue, 13 Jul 2010 08:12:21 -0700 (PDT) Received: by 10.231.182.74 with HTTP; Tue, 13 Jul 2010 08:12:21 -0700 (PDT) In-Reply-To: <4C3B6876.9000402@FreeBSD.org> References: <4C3B6876.9000402@FreeBSD.org> Date: Tue, 13 Jul 2010 08:12:21 -0700 Message-ID: From: Garrett Cooper To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: [PATCH] Fix typos in bsd.port.mk and minor logic improvements X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 15:40:04 -0000 On Mon, Jul 12, 2010 at 12:09 PM, Doug Barton wrote: > On 07/09/10 08:11, Garrett Cooper wrote: >> -# UNAUTHORISED CHANGES WILL BE UNCONDITIONALLY REVERTED! >> +# UNAUTHORIZED CHANGES WILL BE UNCONDITIONALLY REVERTED! > > Couple of comments. The above is not a typo, that's the British > spelling. We generally don't change those. (Arguably it adds character > to the project.) :) > > The other is more of a question, I'm not sure what the point of these > changes is: ${var:-} The :- parameter substitution kicks in if var is > unset or null, but you're not substituting it with anything. Yeah, that was silly. I was doing this out of habit with set -u... So I'm taking it that the only change of benefit is the attached patch. Thanks, -Garrett --- /usr/ports/Mk/bsd.port.mk 2010-06-04 01:09:17.000000000 -0700 +++ bsd.port.mk 2010-07-13 08:09:13.000000000 -0700 @@ -5465,10 +5465,9 @@ if [ "${CHILD_DEPENDS}" ]; then \ installed=$$(${PKG_INFO} -qO ${PKGORIGIN} 2>/dev/null || \ ${TRUE}); \ - if [ "$$installed" ]; then \ + if [ -n "$$installed" ]; then \ break; \ - fi; \ - if [ -z "$$installed" ]; then \ + else \ installed="${PKGNAME}"; \ fi; \ for pkgname in $$installed; do \ @@ -5511,16 +5510,15 @@ while [ $$\# -gt 1 ]; do \ if [ ! -d "${PORTSDIR}/$$2" ]; then \ shift; \ - continue; \ - fi; \ - if [ "$$dir" = "$$2" ]; then \ + elif [ "$$dir" = "$$2" ]; then \ ${ECHO_CMD} $$1:$$dir; \ if [ -e ${PKG_DBDIR}/$$1/+CONTENTS -a -z "${EXPLICIT_PACKAGE_DEPENDS}" ]; then \ packagelist="$$packagelist ${PKG_DBDIR}/$$1/+CONTENTS"; \ fi; \ break; \ + else \ + shift 2; \ fi; \ - shift 2; \ done; \ done; \ [ -z "$$packagelist" ] || ${AWK} -F '( |:)' 'BEGIN { pkgname="broken_contents" } /@pkgdep / { pkgname=$$2 } /@comment DEPORIGIN:/ { printf "%s:%s\n", pkgname, $$3; pkgname="broken_contents" }' $$packagelist; \ @@ -5541,7 +5539,7 @@ (cd $$dir; ${MAKE} package-noinstall); \ done -# Show missing dependiencies +# Show missing dependencies missing: @_origins=$$(${PKG_INFO} -aoq); \ for dir in $$(${ALL-DEPENDS-LIST}); do \