From owner-freebsd-questions@FreeBSD.ORG Sat Feb 4 16:14:58 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E3E5F16A420 for ; Sat, 4 Feb 2006 16:14:57 +0000 (GMT) (envelope-from nikolas.britton@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 675D84464A for ; Sat, 4 Feb 2006 16:14:57 +0000 (GMT) (envelope-from nikolas.britton@gmail.com) Received: by xproxy.gmail.com with SMTP id s9so559400wxc for ; Sat, 04 Feb 2006 08:14:56 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YWMqN1x0Yaams8haZKMP0Gs651H46//7S5n0d6plQtChSxpwmFW63FBSsINPnEdWFWzWff7D3rZ8k2w8BydX6iJi8QBNY840ql+2mVrUX4M88CxpAfk/8rFDQuwWiHllyOWkPwNSBNBnWENJtycNpyMF4po6CRGhNCV+fPQa/fE= Received: by 10.70.118.19 with SMTP id q19mr1566782wxc; Sat, 04 Feb 2006 08:14:56 -0800 (PST) Received: by 10.70.67.17 with HTTP; Sat, 4 Feb 2006 08:14:56 -0800 (PST) Message-ID: Date: Sat, 4 Feb 2006 10:14:56 -0600 From: Nikolas Britton To: Xn Nooby In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Cc: freebsd-questions@freebsd.org Subject: Re: Why does portsdb -Uu run so long? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Feb 2006 16:14:58 -0000 On 2/4/06, Xn Nooby wrote: > > > > It just does, after you cvsup new ports cd into /usr/ports and type > > make fetchindex. what way is the "old foolproof way"? > > > > Here is how I update my system (without using a 'make fetchindex') > > cvsup -g -L 2 /root/stable-supfile > less UPDATING > make buildworld > make buildkernel > make installkernel > shutdown now > cd /usr/src > make installworld > mergemaster > shutdown -r now > portsdb -Uu > portversion -l "<" > portupgrade -arR > reboot > > It takes forever, but it works everytime. Everything else I've ever trie= d > has always had some kind of error, and I never know what they mean or wha= t I > should do. > > Maybe by never doing a fetchindex, I've never really updated my system, a= nd > thats why its never had a problem, lol. That would be embarassing. > No, If I remember right (someone step in if I'm wrong) make fetchindex is what you would get if you ran portsdb -Uu. By the looks of it when you cvsup you get everything (src-all, ports-all, etc) all at once. I think it might be better if you split that into two sup-files where you would have one for the system, src-all, and the other one for ports. This way you don't have to rebuild the system every time you update your ports, this also works the other way around. Once a branch is cut and declared -STABLE the libraries used to make your programs work are rarely changed, If it does change they will tell you in /usr/src/UPDATING. For the sake of troubleshooting it helps if you don't change everything all at once. This is what I, generally, do when updating ports: 1. cvsup -g -L 2 ~/ports-supfile 2. cd /usr/ports; make fetchindex 3. more UPDATING 4. pkg_version | grep "<" 5. nice +20 portupgrade -rRW pkgname_glob Repeat steps 4 and 5 until done. 6. portsclean -CDD (optional) On my home system I typically do this once a week starting with step 1 on Saturday and then upgrading the ports at my leisure over the course of the week. Right now I have 'portsclean -C; nice +20 portupgrade -rfWw "expat*"' running in the background, why you ask? The reason is in /usr/ports/UPDATING, you must always read this file before you upgrade your ports. And the way I clean, or don't clean, ports probably looks erratic but I have my reasons, they are mostly just to save time. One thing I have noticed, and stopped doing, is changing the default values for CFLAGS and CXXFLAGS via /etc/make.conf. It's easy to screw up the stability of your system if you set them and then use automated tools such as portupgrade. Also of note is not setting CPUTYPE too high in make.conf, I have a p4 but I set it to p2. You can set individual build options for each port in pkg-tools.conf located in /usr/local/etc but I like to set them in make.conf because the build options are set in stone then, make will always use these options regardless of how or who built the port. You can do this with a simple .if .endif block, two examples from one of my 5.4 servers are below: .if ${.CURDIR:M*/lang/php4} WITHOUT_MYSQL=3Dyes WITH_POSTGRESQL=3Dyes WITHOUT_MCAL=3Dyes .endif .if ${.CURDIR:M*/net/samba3} WITH_SAM_PGSQL=3Dyes WITH_SYSLOG=3Dyes WITH_ACL_SUPPORT=3Dyes WITH_QUOTAS= =3Dyes .endif