Re: 'sort' tool is eating my system ressources

From: Ion-Mihai Tetcu <itetcu_at_people.tecnik93.com>
Date: Wed, 28 Jul 2004 18:01:26 +0300
On Wed, 28 Jul 2004 08:22:36 -0600
Tillman Hodgson <tillman_at_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"
Received on Wed Jul 28 2004 - 13:01:34 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:03 UTC