From owner-freebsd-ports@FreeBSD.ORG Fri Jul 27 20:27:04 2007 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1677E16A41A for ; Fri, 27 Jul 2007 20:27:04 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with SMTP id 9B30813C428 for ; Fri, 27 Jul 2007 20:27:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 21150 invoked by uid 399); 27 Jul 2007 20:27:00 -0000 Received: from localhost (HELO ?192.168.0.4?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTP; 27 Jul 2007 20:27:00 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <46AA550E.3090704@FreeBSD.org> Date: Fri, 27 Jul 2007 13:26:54 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Garrett Cooper References: <20070726011654.cec378be.ota@j.email.ne.jp> <46A866BE.1000407@u.washington.edu> <20070726233610.e536c2e2.ota@j.email.ne.jp> <46A9B112.7040408@u.washington.edu> In-Reply-To: <46A9B112.7040408@u.washington.edu> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Yoshihiro Ota , freebsd-ports@freebsd.org Subject: Re: Call for testers for yet another ports upgrade program, ports+ X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2007 20:27:04 -0000 Garrett Cooper wrote: > Every time you run make install, portmaster, or portupgrade, there's > a lot of stuff going on behind the scenes. One of the things involved is > installing package information in /var/db/pkg. That's where pkg_version > gets its information from, along with portmaster (AFAIK) and the > makefiles for ports (for sure). Garrett's right on the mark in this post, so I'll just confirm that this is what portmaster does: 1. port_ver=`make -V PKGNAME` 2. Check if that is empty, and error out if it is (moved ports and other edge cases are handled elsewhere already). 3. If the port version from the Makefile matches what's installed, check to see if it's a forced upgrade, and if not cache the fact that it's up to date. 4. case `pkg_version -t $1 $port_ver` in \<) do_update=yes ;; =) ;; # Should not be reached *) if [ -n "$VERBOSE" ]; then echo " ===>>> Port version $port_ver does not" echo " ===>>> seem newer than installed $1" fi ;; esac hth, Doug -- This .signature sanitized for your protection