Date: Thu, 10 Feb 2011 16:33:46 -0500 From: "illoai@gmail.com" <illoai@gmail.com> To: c0re <nr1c0re@gmail.com> Cc: FreeBSD <freebsd-questions@freebsd.org> Subject: Re: Portupgrade and "Updating the portsdb" Message-ID: <AANLkTik_qh1DK65n_0N7EkvpjesKOLXRgRMPZ%2BizyiTe@mail.gmail.com> In-Reply-To: <AANLkTi=amTTpG=RTJ=P-m5JbypMoS=vtfN%2BuS8Qc4p92@mail.gmail.com> References: <AANLkTi=amTTpG=RTJ=P-m5JbypMoS=vtfN%2BuS8Qc4p92@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10 February 2011 08:33, c0re <nr1c0re@gmail.com> 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 <format:bdb_btree> in /usr/ports ... - > 22601 port entries found =A0error] Remove and try again. > [Updating the portsdb <format:dbm_hash> 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 <format:bdb_btree> 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 --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik_qh1DK65n_0N7EkvpjesKOLXRgRMPZ%2BizyiTe>