From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Nov 29 17:45:07 2006 Return-Path: X-Original-To: freebsd-ports-bugs@FreeBSD.org Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 601BE16A415 for ; Wed, 29 Nov 2006 17:45:07 +0000 (UTC) (envelope-from erwin@mail.droso.net) Received: from mail.droso.net (koala.droso.net [193.88.12.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D10043DED for ; Wed, 29 Nov 2006 17:43:46 +0000 (GMT) (envelope-from erwin@mail.droso.net) Received: by mail.droso.net (Postfix, from userid 1001) id D24211CC29; Wed, 29 Nov 2006 18:43:21 +0100 (CET) Date: Wed, 29 Nov 2006 18:43:21 +0100 From: Erwin Lansing To: freebsd-ports-bugs@FreeBSD.org Message-ID: <20061129174321.GT97805@droso.net> Mail-Followup-To: freebsd-ports-bugs@FreeBSD.org References: <200611242148.kAOLm2Ij019695@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <200611242148.kAOLm2Ij019695@freefall.freebsd.org> X-Operating-System: FreeBSD/i386 6.2-PRERELEASE User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Subject: Re: ports/105835: Use portsnap by default for 'make update' X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 17:45:07 -0000 MFp4: Be a bit more userfriendly now portsnap is used by default. Test that portsnap has created PORTSDIR to make sure that an unsuspecting user doesn't need to fetch 45Mb only to be told afterwards that portsnap can't run anyway. Print a helpful text instead to tell the user to run 'portsnap fetch extract' by hand or use another way to update. New diff against cvs: --- /usr/ports/Makefile Sat Feb 11 03:26:30 2006 +++ Makefile Wed Nov 29 18:39:18 2006 @@ -146,13 +146,7 @@ SUPFLAGS+= -h ${SUPHOST} .endif update: -.if defined(PORTSNAP_UPDATE) - @echo "--------------------------------------------------------------" - @echo ">>> Running ${PORTSNAP}" - @echo "--------------------------------------------------------------" - @${PORTSNAP} ${PORTSNAP_FLAGS} fetch - @${PORTSNAP} ${PORTSNAP_FLAGS} update -.elif defined(SUP_UPDATE) && defined(PORTSSUPFILE) +.if defined(SUP_UPDATE) && defined(PORTSSUPFILE) @echo "--------------------------------------------------------------" @echo ">>> Running ${SUP}" @echo "--------------------------------------------------------------" @@ -166,5 +160,17 @@ @${ECHO_MSG} "Error: Please define PORTSSUPFILE before doing make update." @exit 1 .else - @${ECHO_MSG} "Error: Please define either PORTSNAP_UPDATE, SUP_UPDATE, or CVS_UPDATE first." + @echo "--------------------------------------------------------------" + @echo ">>> Running ${PORTSNAP}" + @echo "--------------------------------------------------------------" +.if !exists(${PORTSDIR}/.portsnap.INDEX) + @echo "Error: 'make update' uses portsnap(8) by default and" + @echo "needs ${PORTSDIR} to be created by portsnap on its first run." + @echo "Please run 'portsnap fetch extract' first." + @echo "You can also define SUP_UPDATE and PORTSSUPFILE to use csup(1)" + @echo "or CVS_UPDATE to use cvs(1) for updating." +.else + @${PORTSNAP} ${PORTSNAP_FLAGS} fetch + @${PORTSNAP} ${PORTSNAP_FLAGS} update +.endif .endif