Subject: pkg/17376: conflict between pkg_install/Makefile.inc and pkgsrc on older systems
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 06/24/2002 13:59:57
>Number:         17376
>Category:       pkg
>Synopsis:       conflict between pkg_install/Makefile.inc and pkgsrc on older systems
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 24 11:00:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        NetBSD-1.3.2
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
System: NetBSD 1.3.2 sparc

>Description:

	as of rev 1.14 of usr.sbin/pkg_install/Makefile.inc a dependency
	was introduced on a more modern share/mk/bsd.own.mk (1.145 and
	1.136.4.6)

	strictly this makes all systems older than NetBSD-1.6, with the
	current sole exceptions of NetBSD-1.5.2 or later, incompatible
	with pkgsrc.

	this is bad.

>How-To-Repeat:

	try to build pkgtools/pkg_install as required on older NetBSD

>Fix:

	here is a simple naive fix that works best for building pkg_install
	from a -current or release-branch source tree:

13:44 [1178] $ cvs diff Makefile.inc
Index: Makefile.inc
===================================================================
RCS file: /cvs/NetBSD/src/usr.sbin/pkg_install/Makefile.inc,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 Makefile.inc
*** Makefile.inc        12 Jun 2001 21:27:05 -0000      1.1.1.5
--- Makefile.inc        24 Jun 2002 17:41:39 -0000
***************
*** 3,8 ****
--- 3,12 ----
  
  .include <bsd.own.mk>
  
+ .if !defined(PRINTOBJDIR) || empty(PRINTOBJDIR)
+ PRINTOBJDIR=	printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -B -s -f-
+ .endif
+ 
  LIBINSTALL != cd ${.CURDIR}/../lib && ${PRINTOBJDIR}
  CPPFLAGS+=-I${.CURDIR}/../lib ${DEBUG} -DBINDIR='"${BINDIR}"'
  
>Release-Note:
>Audit-Trail:
>Unformatted: