From owner-freebsd-questions@FreeBSD.ORG Sat Feb 12 02:00:04 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C82C106566C for ; Sat, 12 Feb 2011 02:00:04 +0000 (UTC) (envelope-from illoai@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id A0C028FC12 for ; Sat, 12 Feb 2011 02:00:03 +0000 (UTC) Received: by fxm16 with SMTP id 16so3624531fxm.13 for ; Fri, 11 Feb 2011 18:00:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=oeiTXFoigaSt5Bf5B3voCWNoMo0aR3BFWU+vLJIg5t4=; b=m33yHQHDGElZ7wnkFbUs9Z0fpWdviLdlE/bltdwGmFapHFFBSbvJxnZuG2E2qmX54t mIn/AU3/nQSniGsKNHPdISCdhLXahqls06jpFvl5uWP6h6sSpCZpq5QUkL4P/4znbZ7R uKC9hPCpgD6Cl/ToKjOUG4VTDEXqYBGo4JMis= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=hZZvKVhWJ/jdAPTuxQWdvTcf8EqKq26RIu9CCARmgG8GxD/FH1Xo72ktoB76HSzXYs kfhbL6aB19TAM/k6qts4+iL7kOy1s1pWMXiJsjP/ImRoL8wXSpjWrf4NT5xnjCJ92fmk XKce28bcBgyZYfLDHRf9Imdomuti2qGMFtQg4= MIME-Version: 1.0 Received: by 10.223.81.70 with SMTP id w6mr306045fak.62.1297373626325; Thu, 10 Feb 2011 13:33:46 -0800 (PST) Received: by 10.223.83.15 with HTTP; Thu, 10 Feb 2011 13:33:46 -0800 (PST) In-Reply-To: References: Date: Thu, 10 Feb 2011 16:33:46 -0500 Message-ID: From: "illoai@gmail.com" To: c0re Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Subject: Re: Portupgrade and "Updating the portsdb" 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, 12 Feb 2011 02:00:04 -0000 On 10 February 2011 08:33, c0re wrote: > Hello all! > > I've got set of servers that uses NFS mounted /usr/ports. When I use > "portupgrade samba" on 1st server it says > [/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid > argument] [Updating the portsdb in /usr/ports ... - > 22601 port entries found =A0error] Remove and try again. > [Updating the portsdb in /usr/ports ... - 22601 port > entries found ..... > ..... done] > > Okay. It took 10-15 mins to rebuild. > > Then I say "portupgrade samba" on 2nd server it says again > [/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid > argument] [Updating the portsdb in /usr/ports ... - > 22601 port entries found =A0error] Remove and try again. > and rebuild portsdb. > > Why is it so? > > Ports are updated via "portsnap fetch update". > > /etc/portsnap.conf has > INDEX INDEX-5 DESCRIBE.5 > INDEX INDEX-6 DESCRIBE.6 > INDEX INDEX-7 DESCRIBE.7 > INDEX INDEX-8 DESCRIBE.8 > > So while portupgrade rebuilds portsdb it's not possible use > portupgrade on 2nd server because later build process will fail on 1st > or second server. > > What can I do with it? Why portupgrade always thinks that > [/usr/ports/INDEX-7.db: unexpected file type or format -- Invalid > argument]? > The INDEX-n.db is a locally generated portupgrade thing. Edit your /usr/local/etc/pkgtools.conf for each machine to include a line such as: ENV['PORTS_INDEX'] ||=3D ENV['PORTSDIR'] + '/INDEX.local' Only instead of '/INDEX.local' use '/INDEX.your_hostname_here'. You might also look at changing the part ENV['PORTSDIR'] to something local (speed, etc), like adding a line up from that: ENV['LOCALINDICES'] ||=3D '/var/db' then ENV['PORTS_INDEX'] ||=3D ENV['LOCALINDICES'] + '/INDEX.thy_hostname_here' Also, if you have local space, settin' WRKDIRPREFIX=3D in /etc/make.conf will speed things up & allow multiple machines to build at the same time. HTH --=20 --