Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 2004 18:01:26 +0300
From:      Ion-Mihai Tetcu <itetcu@people.tecnik93.com>
To:        Tillman Hodgson <tillman@seekingfire.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: 'sort' tool is eating my system ressources
Message-ID:  <20040728180126.3ad59f1a@it.buh.tecnik93.com>
In-Reply-To: <20040728142236.GI52250@seekingfire.com>
References:  <20040728081719.GA17127@nebula.wanadoo.fr> <20040728083252.GA72137@happy-idiot-talk.infracaninophile.co.uk> <c21e92e2040728022655bdfae8@mail.gmail.com> <20040728142236.GI52250@seekingfire.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 28 Jul 2004 08:22:36 -0600
Tillman Hodgson <tillman@seekingfire.com> wrote:

> On Wed, Jul 28, 2004 at 05:26:08PM +0800, Jiawei Ye wrote:
> > I recommend highly sysutils/portindex, which does incremental builds
> > and takes very little time to build new INDEX, INDEX-5.
> 
> I hadn't played with the port yet so I thought I'd take a poke at it.
> 
> It's an odd port ... no pkg-plist,

Look in the Makefile for PLIST_*

> no man pages. The web page that
> pkg-descr points to has little more than what pkg-descr itself says.
> There's a README.TXT that gives a few one-liners on what the various
> python scripts do,

Agree here ;)

> and there's a DBSETUP.TXT that mentions a postgres database (?!).

The db is used for pkghistory

> Do you have an example of how you use it in your cvsup script? Any links
> that discuss how it works in a bit more detail? It looks interesting,
> but unfriendly ;-)

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
                /usr/local/sbin/portsdb -u  || cp INDEX.db.bak INDEX.db && return 1
                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
        else
                echo "ports_upd-ERROR: Index build FAILLED, restoring old INDEX-5"
                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?20040728180126.3ad59f1a>