Subject: pkg/35178: PKG_FAIL_REASON failure with 2.0.1_STABLE
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 12/04/2006 00:05:00
>Number:         35178
>Category:       pkg
>Synopsis:       PKG_FAIL_REASON failure with 2.0.1_STABLE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 04 00:05:00 +0000 2006
>Originator:     David A. Holland <>
>Release:        2.1.0_STABLE (-20061201) (pkgsrc 20061130)
    Harvard EECS
System: NetBSD bantha 2.1.0_STABLE NetBSD 2.1.0_STABLE (GENERIC) #3: Fri Dec  1 14:58:15 EST 2006  root@bantha:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386

While updating the system today, something, possibly operator error,
removed the contents of pkg_install from /usr/pkg. (Though not the
entry in /var/db/pkg. Go figure.) Haven't finished tracking that down
yet, but it triggers the following behavior:

	# cd /usr/pkgsrc/any/package
	# make fetch
	=> Required installed package digest>=20010302: digest-20060826 found
	Syntax error: "(" unexpected
	*** Error code 2

This turns out to be because it's trying to say that the package tools
are out of date, but failing.


Erase pkg_install and try to build something.


This patch makes it behave. I haven't tracked down why it's necessary,
but it's presumably connected to the new can-be-built-here logic.

(It might be better to figure out why and sort that out than to apply
this patch, but this is at least a workaround.)

Index: mk/
RCS file: /cvsroot/pkgsrc/mk/,v
retrieving revision 1.1899
diff -u -r1.1899
--- mk/	26 Nov 2006 08:37:03 -0000	1.1899
+++ mk/	4 Dec 2006 00:01:43 -0000
@@ -134,7 +134,7 @@
 PKG_FAIL_REASON+='The package tools installed on this system are out of date.'
 PKG_FAIL_REASON+='The installed package tools are dated ${PKGTOOLS_VERSION:C|(....)(..)(..)|\1/\2/\3|} and you must'
 PKG_FAIL_REASON+='update them to at least ${PKGTOOLS_REQD:C|(....)(..)(..)|\1/\2/\3|} using the following command:'
 PKG_FAIL_REASON+='    (cd ${PKGSRCDIR}/pkgtools/pkg_install && ${MAKE} clean && ${MAKE} update)'
 .  endif