Subject: Re: strange things with pkgsrc tarball
To: Rumi Szabolcs <rumi_ml@rtfm.hu>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-pkg
Date: 01/15/2005 14:06:31
--=-vs5ds+W8jJbmB2MAqvJ/
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Sat, 2005-01-15 at 00:28 +0100, Rumi Szabolcs wrote:
> Hello!
> 
> I have just downloaded the pkgsrc tarball from this URL:
> 
> ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/tar_files/pkgsrc.tar.gz
> 
> mtime: 2005.01.08 04:07
> 
> And then I wanted to update it from cvs like that:
> 
> # cd /usr/pkgsrc
> # cvs update -dP
> cvs update: in directory .:
> cvs update: ignoring CVS/Root because it specifies a non-existent repository /ftp/pub/NetBSD-cvs/main
> cvs update: No CVSROOT specified!  Please use the `-d' option
> cvs [update aborted]: or set the CVSROOT environment variable.
> # cat CVS/Root
> /ftp/pub/NetBSD-cvs/main
> # cat CVS/Repository
> pkgsrc
> 
> Is this considered normal?

I don't think so.  You may want to use the attached script to fix that,
by doing something like:

set-cvsroot.sh :ext:account@your.preferred.mirror:/directory /usr/pkgsrc

And you should also file a PR reporting the issue.  We should probably
set a sane value in the tarball (though I don't know what mirror we 
should use).

-- 
Julio M. Merino Vidal <jmmv84@gmail.com>
http://www.livejournal.com/users/jmmv/
The NetBSD Project - http://www.NetBSD.org/

--=-vs5ds+W8jJbmB2MAqvJ/
Content-Disposition: attachment; filename=set-cvsroot.sh
Content-Type: application/x-shellscript; name=set-cvsroot.sh
Content-Transfer-Encoding: 7bit

#!/bin/sh

if [ $# -lt 2 ]; then
	echo "usage: $0 cvsroot dirs [...]"
	exit 1
fi

rootfile="/tmp/cvsroot.$$"
echo "$1" > $rootfile
shift

for d in $*; do
	for f in $(find $d -name Root -print | grep CVS/Root); do
		cp $rootfile $f
	done
done

rm -f $rootfile

--=-vs5ds+W8jJbmB2MAqvJ/--