From nobody@FreeBSD.org  Fri Nov 11 12:32:47 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 4E8CA16A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Nov 2005 12:32:47 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1121F43D49
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Nov 2005 12:32:47 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id jABCWk7h084271
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Nov 2005 12:32:46 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id jABCWksn084270;
	Fri, 11 Nov 2005 12:32:46 GMT
	(envelope-from nobody)
Message-Id: <200511111232.jABCWksn084270@www.freebsd.org>
Date: Fri, 11 Nov 2005 12:32:46 GMT
From: Luca Morettoni <luca@morettoni.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Enable use of CVSROOT variable into src Makefile (for update target)
X-Send-Pr-Version: www-2.3

>Number:         88840
>Category:       misc
>Synopsis:       Enable use of CVSROOT variable into src Makefile (for update target)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 11 12:40:14 GMT 2005
>Closed-Date:    Fri Nov 11 14:16:47 GMT 2005
>Last-Modified:  Fri Nov 11 14:16:47 GMT 2005
>Originator:     Luca Morettoni
>Release:        5.4-STABLE
>Organization:
>Environment:
FreeBSD home.morettoni.local 5.4-STABLE FreeBSD 5.4-STABLE #162: Tue Oct 11 01:01:40 CEST 2005     luca@home.morettoni.local:/usr/obj/usr/src/sys/HOME  i386
>Description:
              If you set CVS_UPDATE in make.conf you can update system source files by CVS system. If you want to change the CVS server you can set the CVSROOT, but the code in Makefile.inc1 did not take that parameter.
>How-To-Repeat:
              cd /usr/src; make -DCVS_UPDATE -DCVSROOT=xxx
the new XXX server is ignored.
>Fix:
              Apply this little patch and now (if you define CVSROOT var) cvs use new server address, otherwise it update from the default server!

--- Makefile.inc1.original      Fri Nov 11 13:14:40 2005
+++ Makefile.inc1       Fri Nov 11 13:17:42 2005
@@ -765,7 +765,11 @@
        @echo "--------------------------------------------------------------"
        @echo ">>> Updating ${.CURDIR} from CVS repository" ${CVSROOT}
        @echo "--------------------------------------------------------------"
+.if defined(CVSROOT)
+       cd ${.CURDIR}; ${CVS} -R -q -d ${CVSROOT} update ${CVSFLAGS}
+.else
        cd ${.CURDIR}; ${CVS} -R -q update ${CVSFLAGS}
+.endif
 .endif
 
 #

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Fri Nov 11 14:04:53 GMT 2005 
State-Changed-Why:  
CVSROOT is special environment variable that is already 
set in environment for many people, and enforcing it 
through the -d option may upset some of them. 

What you want is already possible by doing 
make -DCVS_UPDATE CVS="cvs -d xxx" 

http://www.freebsd.org/cgi/query-pr.cgi?pr=88840 
>Unformatted:
