Subject: Re: Upgrading from 1.5.2 to -current?
To: Brad Knowles <brad.knowles@skynet.be>
From: Greg A. Woods <woods@weird.com>
List: port-sparc
Date: 04/22/2002 13:13:54
[ On Monday, April 22, 2002 at 00:25:00 (+0200), Brad Knowles wrote: ]
> Subject: Re: Upgrading from 1.5.2 to -current?
>
> 	Let me quote another section from that same document:
> 
> | To just update the 1.5 release source tree if you already got one:
> |
> | % setenv CVSROOT :pserver:anoncvs@anoncvs.netbsd.org:/cvsroot
> | % cd /usr
> | % cvs login
> | password: anoncvs
> | % cvs -d $CVSROOT update -rnetbsd-1-5 -PAd src
> |
> |
> | Or by ssh:
> |
> | % setenv CVS_RSH ssh
> | % setenv CVSROOT anoncvs@anoncvs.netbsd.org:/cvsroot
> | % cd /usr
> | % cvs -d $CVSROOT update -rnetbsd-1-5 -PAd src
> |
> |
> | To update the 1.5 current source tree, omit the "-rnetbsd-1-5" To
> | update the 1.4 release source tree, use "-rnetbsd-1-4"
> 
> 
> 	Now, if you want to tell me that the documentation is wrong, 
> that's fine.

It's actually not wrong in this case, though slightly confusing.

Again it does say "if you already got one" (which though is very poor
grammar in that context, is essentially correct and of course means if
you already have a "src" working directory), and in that case it should
still work exactly as shown since CVSROOT is both set in the environment
and on the command line, and the sub-directory "src", where the existing
working directory is contained, is specified on the command line.  If
you want "-current" (i.e. the trunk) then just omit the '-rTAG'.

(Note also that in older versions of CVS I think I remember that the
'cvs update' operation could function as 'cvs checkout' if there was no
existing working directory.  That doesn't work any more though -- you'll
get an error like: "cannot open CVS/Entries for reading".)

It's much safer and simpler once you have a proper working directory to
go right into it to do the update, i.e. 'cd /usr/src; cvs update -PAd'.
That way the CVSROOT setting used to create the working directory will
be used (unless you give a different '-d repo' on the command line :-).
Assuming the snapshot source tars are created properly with an anon-CVS
CVSROOT setting, then all is well, except of course you cannot choose
the server to use, though in the above case with "cvs -d $CVSROOT"
you'll always override the working-directory settings, which is, I
presume, the intention of documenting it exactly that way.  However
having to type "cvs -d $CVSROOT ..." for every operation is painful, to
say the least.

I would suggest that if you have good network connectivity to a
not-too-busy anon-CVS server then you should just check out a complete
tree from scratch using CVS only.  Forget about trying to prefetch the
tar files.  This way of doing the fetch also means you won't need to set
CVSROOT in your environment and you won't need to type 'cvs -d $CVSROOT'
forever more either.

	cd /whereever-you-want-with-enough-space
	cvs -d anoncvs@anoncvs.MIRROR.netbsd.org:/cvsroot login
	password: anoncvs
	cvs -d anoncvs@anoncvs.MIRROR.netbsd.org:/cvsroot co -P src

If you want to call the directory something other than "src" then you
can add "-d dirname-to-checkout-into" just before the "src" parameter.

If you want a release branch instead of -current then add the '-r' as
documented above.

From then on just run "cvs update -Pd" from within the directory created
above.  You can also put "update -Pd" in ~/.cvsrc and then you won't
have to remember those option flags either.

	$ cat ~/.cvsrc
	checkout -P
	diff    -N -c
	export  -kv
	rdiff   -u
	release -d
	update  -d -P

If you want to compress the data on the wire (and assuming the anon-CVS
server you choose has sufficient CPU power to do so), you can add '-z3'
right after the "cvs" command name.  If you do that the whole process
should be far at least as efficient as first fetching the source tars.
You can put that in your ~/.cvsrc too, as "cvs -z3".

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>