Subject: pkg/34207: /usr/pkgsrc/Makefile -- "make index" deletes INDEX's dependency PKGDB
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 08/15/2006 22:35:00
>Number:         34207
>Category:       pkg
>Synopsis:       /usr/pkgsrc/Makefile  -- "make index" deletes INDEX's dependency PKGDB
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 15 22:35:00 +0000 2006
>Originator:     David Vanecek
>Release:        3.0.1
NetBSD jezebel.chuck 3.0.1 NetBSD 3.0.1 (GENERIC) #0: Thu Jul 13 23:43:47 UTC 2006 i386
The subject Makefile contains a line causing the removal of PKGDB whenever INDEX is made.  When "make search key=something" is then executed, INDEX is out of date, since its predecessor is removed.  Then the tedious (many, many hour) process of making PKGDB from scratch is executed, recreating INDEX.  Then, paradoxically, PKGDB is removed.  "make search ..." repeats the process ad nauseam.  The solution should be not to remove PKGDB after making it (and INDEX) at such high cost.  The offending lines in the Makefile are these:

        @${RM} -f ${.CURDIR}/INDEX
        @${AWK} -f ./mk/scripts/genindex.awk PKGSRCDIR=${.CURDIR} SORT=${SORT} $
        @${RM} -f ${.CURDIR}/PKGDB

Deleting the last line might cure the problem; I believe it is the bug.

An alternative solution is to remove dependencies on INDEX.

The pkgsrc was extracted from the 2006Q2 release, obtained a day or two ago.


cd /usr/pkgsrc ; make INDEX; make search key=wget 
Delete indicated line.  I have not tried this; I do not yet know what the PKGDB file is *for*.  (I am an OpenBSD user, mostly, so am not intimately acquainted with the NetBSD pkg tools.)