From owner-svn-src-all@FreeBSD.ORG Sat Dec 15 18:45:54 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F03B71F; Sat, 15 Dec 2012 18:45:54 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-da0-f54.google.com (mail-da0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 594648FC13; Sat, 15 Dec 2012 18:45:54 +0000 (UTC) Received: by mail-da0-f54.google.com with SMTP id n2so1848918dad.13 for ; Sat, 15 Dec 2012 10:45:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=wLxk4uZaWhxwF9eb9hWTzbTk1S+gdkiVhl+6wpFxe3M=; b=O4/EZDyVbGuRZxBvywQCLoMViri3EMIO8hD0+CwHNWPJc34wqIAW+43+A+M3lRCYxY htvLZoQMjNCEIydYDTBxSeoJGxvGJdsmJtOzxTa4x9ZDi/CvT6xhQ+YZNCcWAmocBLaH bVztc5qfv/Y0ftwPiS7Yh9vJBtNfm5OVYb3h+GWtumQrFFMrPzH9KPNtLnWZDbS59vT1 5DmoQsv2tAfM53N9fhulR1rcUlEAupUfFaYYgsQLvduxEGow6syQ+wV+o4ycjLYT5b+5 An6B4f2JUgD4oOtPfitk4idShBmRvAfAH/wU+YK86/9CFT7ok+sUeJAqk/3LedcwQTAR 8mAw== Received: by 10.66.78.168 with SMTP id c8mr8568288pax.16.1355597148261; Sat, 15 Dec 2012 10:45:48 -0800 (PST) Received: from [192.168.20.11] (c-24-19-191-56.hsd1.wa.comcast.net. [24.19.191.56]) by mx.google.com with ESMTPS id rk17sm5101566pbb.3.2012.12.15.10.45.46 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 15 Dec 2012 10:45:47 -0800 (PST) Subject: Re: svn commit: r244269 - head/tools/tools/sysbuild Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: <39007.1355595870@critter.freebsd.dk> Date: Sat, 15 Dec 2012 10:45:44 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <72791331-4C62-4ACD-ADB1-94A109647032@gmail.com> References: <201212151754.qBFHsT5D008579@svn.freebsd.org> <7855873A-AC30-4511-AA9B-F9B0E380FF92@gmail.com> <39007.1355595870@critter.freebsd.dk> To: "Poul-Henning Kamp" X-Mailer: Apple Mail (2.1283) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2012 18:45:54 -0000 On Dec 15, 2012, at 10:24 AM, Poul-Henning Kamp wrote: > -------- > In message <7855873A-AC30-4511-AA9B-F9B0E380FF92@gmail.com>, Garrett = Cooper wri > tes: >=20 >> If you have a ports tree, setting the appropriate variables and=20= >> then running make check-already-installed is both forwards and = backwards=20 >> compatible. >=20 > Uhm, I'm not sure I understand how this would apply to sysbuild, which > constructs an disk-image from scratch... You're checking whether or not the package has been installed on the = running system via `pkg info`. I discovered (after poking around = bsd.port.mk a bit for other things) that `make check-already-installed` = in the ports directory is an equivalent backwards compatible way of = doing this (again, setting PORTSDIR, PKGDBDIR, etc to the right values). = Example: # for i in shells/bash shells/zsh; do (cd /usr/ports/$i; make = check-already-installed; echo ec =3D $?); done =3D=3D=3D> Checking if shells/bash already installed =3D=3D=3D> bash-4.2.37 is already installed You may wish to ``make deinstall'' and install this port again by ``make reinstall'' to upgrade it properly. If you really wish to overwrite the old port of shells/bash without deleting it first, set the variable "FORCE_PKG_REGISTER" in your environment or the "make install" command line. *** Error code 1 Stop. make: stopped in /usr/ports/shells/bash ec =3D 1 =3D=3D=3D> Checking if shells/zsh already installed ec =3D 0 All you have to do is test for the exit code being non-zero (already = installed) or zero (not installed). It's unfortunate that things are = flip-flopped, but I understand the reason for it being that way in the = make rules. Also, your last commit snuck in a =3D=3D instead of a =3D -- this breaks = on older copies of /bin/sh . HTH, -Garrett PS Just trying to help make sure things are backwards compatible because = there are random people who have reported breakage issues in the past = with various tools like nanobsd, picobsd, etc that aren't tied to a = particular release.=