Date: Fri, 20 Aug 2004 12:31:51 +0300 From: Ion-Mihai Tetcu <itetcu@apropo.ro> To: "Charles Ulrich" <charles@idealso.com> Cc: freebsd-questions@freebsd.org Subject: Re: portindex and INDEX.db Message-ID: <20040820123151.482d7a1d@it.buh.tecnik93.com> In-Reply-To: <49225.207.179.91.96.1092966516.squirrel@freedombi.com> References: <49225.207.179.91.96.1092966516.squirrel@freedombi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Aug 2004 21:48:36 -0400 (EDT)
"Charles Ulrich" <charles@idealso.com> wrote:
>
> Is there any downside to generating INDEX.db with the sysutils/portindex
> program rather than portsdb -Uu?
It's not the canonical way and it is not so much tested.
I'm using it with no problems since portidex appeared.
Note that portindex generates INDEX(-5) and you still have to run
portsdb -u. If you like the idea of having you index rebuilt in a few
minutes, you might want to petition kris@ to run it on pointyhat on
regular builds and compare the results with `make index` output.
I'm using something like :
do_build_new_index() {
echo
if [ ! -e ${LOG_DIR}/need_new_index ]
then
echo "No need to rebuild INDEX-5"
return 0
fi
cd /usr/ports || return 1
cp INDEX-5 INDEX-5.bak || return 1
if /usr/local/bin/portindex
then
rm ${LOG_DIR}/need_new_index
cp INDEX.db INDEX.db.bak || return 1
sort < /usr/ports/INDEX-5 > /tmp/INDEX-5.sorted
mv /tmp/INDEX-5.sorted /usr/ports/INDEX-5
echo '--- Done with INDEX building'
echo
echo '--- Begining building portsdb'
/usr/local/sbin/portsdb -u || cp INDEX.db.bak INDEX.db && return 1
echo '--- Done bulding portsdb'
echo
cd /var/db/pkg || return 1
cp pkgdb.db pkgdb.db.bak || return 1
/usr/local/sbin/pkgdb -u || cp pkgdb.db.bak pkgdb.db && return 1
echo
else
echo "ports_upd-ERROR: Index build FAILLED, restoring old INDEX-5"
cp INDEX-5.bak INDEX-5
return 1
fi
}
--
IOnut
Unregistered ;) FreeBSD "user"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040820123151.482d7a1d>
