Date: Sat, 9 Jul 2011 19:54:38 -0400 From: "b. f." <bf1783@googlemail.com> To: "Thomas D. Dean" <tomdean@speakeasy.org>, freebsd-questions@FreeBSD.org Subject: Re: Portupgrade Package Question Message-ID: <CAGFTUwM8RhA6zL_GJ==pwTaZFsrg-_5aPfJXEugwcRhW9=ZKxg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGFTUwM8RhA6zL_GJ==pwTaZFsrg-_5aPfJXEugwcRhW9=ZKxg>