From owner-freebsd-questions@FreeBSD.ORG Sat Jul 9 23:54:39 2011 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5768A1065672 for ; Sat, 9 Jul 2011 23:54:39 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3622A8FC08 for ; Sat, 9 Jul 2011 23:54:38 +0000 (UTC) Received: by pvg11 with SMTP id 11so2424284pvg.13 for ; Sat, 09 Jul 2011 16:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; bh=8qdo+9YtIXxrZB0zxn4r2it04xcX+gEUeBszxBuFqWE=; b=T+r/xYgnmAoqzWBPsZupHq4bkoK76DaHTNpPZMN94QdkDx6wwdmzB1W4Uc8Qel55Ya rVir5czhR8c0WczV8Sgtr358/Q6OWyHZdXYZoQlEg905e4FmT1CcGvPhpPxSxj1yxoZo qns1p4sXo/J0kFmRVmsBo+RSwdrLaBJCqgLWI= MIME-Version: 1.0 Received: by 10.68.6.73 with SMTP id y9mr5248275pby.290.1310255678567; Sat, 09 Jul 2011 16:54:38 -0700 (PDT) Received: by 10.68.64.104 with HTTP; Sat, 9 Jul 2011 16:54:38 -0700 (PDT) Date: Sat, 9 Jul 2011 19:54:38 -0400 Message-ID: From: "b. f." To: "Thomas D. Dean" , freebsd-questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Subject: Re: Portupgrade Package Question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jul 2011 23:54:39 -0000 Thomas D. Dean wrote: ... > For the most recent try, I have > > ... > # OS_PATCHLEVEL: "" "-p8" > # OS_PLATFORM: "i386" "amd64" > # OS_PKGBRANCH: "7-current" "6.1-release" > OS_RELEASE="8-STABLE" > OS_BRANCH="STABLE" > OS_PKGBRANCH="8-stable" The comments above were not intended as an invitation to try to define these constants here, but merely describe typical values that the constants may have. The constants are computed from parsing your 'uname -rm' output in $LOCALBASE/$RUBY_SITELIBDIR/pkgtools.rb (usually /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb), so you cannot set them in pkgtools.conf. They were only mentioned so that users would know that they were available for defining other procedures and variables (for an example, see below). > > # Useful predefined functions: > # > # localbase() > # Returns LOCALBASE. > ... > > But, portupgrade still tries to fetch from 8.2-release. If you are running 8.2-RELEASE, and yet wish to obtain "8-stable" packages (which are actually built on recent versions of 8.1-STABLE, with recent versions of the ports tree), then set PKG_SITES appropriately in pkgtools.conf. In this case, I think (untested) that you could substitute sprintf('%s/pub/FreeBSD/ports/%s/packages-%s-stable/', ENV['PACKAGEROOT'] || 'ftp://ftp.FreeBSD.org', OS_PLATFORM, OS_MAJOR) for the default pkg_site_mirror(root) in PKG_SITES. (It might be better to upgrade your base system to 8-STABLE, in which case the defaults will be correct without any need for these changes, and other problems will also be fixed). > > If I want to use binary ports it looks like I need to zap the ports tree > and recreate it with portsnap. This should not be necessary. You should be able to use any method to update the tree (anonymous cvs, csup/cvsup, portsnap, http/ftp, rsync, ctm, etc.). Of course, if your tree and index file do not correspond to the version of the binary packages that you want to use, you will occasionally trip over problems that will require intervention. (Note that in the section of the csup file that you reproduced in an earlier message, 'release-cvs' should be 'release=cvs'.) PKG_SITES will only be used by the ports-mgmt/portupgrade scripts; if you want to use pkg_add(1) manually, and obtain the 8-stable packages, then you should define PACKAGESITE in your environment, or provide a full URL. The ports-mgmt/portupgrade scripts also respect PACKAGESITE, which will override PACKAGEROOT and PKG_SITES in those scripts. b.