Tue Jun 17 14:58:14 2008 UTC ()
Pullup ticket #2421 - requested by he
Fix old-style bulk builds

Revisions pulled up:
- mk/bulk/build			1.104
- pkgtools/pkg_install/Makefile	1.154
---
    Module Name:	pkgsrc
    Committed By:	he
    Date:		Sun Jun  8 21:04:30 UTC 2008

    Modified Files:
    	pkgsrc/mk/bulk: build
    	pkgsrc/pkgtools/pkg_install: Makefile

    Log Message:
    Commit two fixes which at least for me appear to be required when
    doing an old-style bulk build on 4.0 or older systems:

     - in mk/bulk/build, do "make update" instead of "make install + clean"
       when installing a new pkg_install
     - in pkgtools/pkg_install/Makefile, don't try to use our own
       executables (${WORKDIR}/pkg_add/pkg_add etc.) if they don't exist

    Discussed with joerg, and even though he's not entirely happy
    with the latter change, he didn't appear to have a better suggestion.

    This, and putting /usr/pkg/sbin earlier than /usr/sbin in the $PATH
    appears to be required to get an old-style bulk build going.


(tron)
diff -r1.103 -r1.103.2.1 pkgsrc/mk/bulk/build
diff -r1.149 -r1.149.2.1 pkgsrc/pkgtools/pkg_install/Makefile

cvs diff -r1.103 -r1.103.2.1 pkgsrc/mk/bulk/Attic/build (expand / switch to unified diff)

--- pkgsrc/mk/bulk/Attic/build 2008/01/04 15:49:07 1.103
+++ pkgsrc/mk/bulk/Attic/build 2008/06/17 14:58:14 1.103.2.1
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1#!/bin/sh 1#!/bin/sh
2# $NetBSD: build,v 1.103 2008/01/04 15:49:07 rillig Exp $ 2# $NetBSD: build,v 1.103.2.1 2008/06/17 14:58:14 tron Exp $
3 3
4# 4#
5# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org> 5# Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@NetBSD.org>
6# All rights reserved. 6# All rights reserved.
7# 7#
8# Redistribution and use in source and binary forms, with or without 8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions 9# modification, are permitted provided that the following conditions
10# are met: 10# are met:
11# 1. Redistributions of source code must retain the above copyright 11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer. 12# notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright 13# 2. Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the 14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution. 15# documentation and/or other materials provided with the distribution.
@@ -222,28 +222,27 @@ do_common_setup () { @@ -222,28 +222,27 @@ do_common_setup () {
222 # confuses the printindex script. 222 # confuses the printindex script.
223 unset DISPLAY || true # allow sane failure for gimp, xlispstat 223 unset DISPLAY || true # allow sane failure for gimp, xlispstat
224} 224}
225 225
226# Check that the package tools are up to date. 226# Check that the package tools are up to date.
227check_tools () { 227check_tools () {
228 echo "build> Checking if the pkgtools are up-to-date" 228 echo "build> Checking if the pkgtools are up-to-date"
229 ( cd "${lintpkgsrc_dir}" \ 229 ( cd "${lintpkgsrc_dir}" \
230 && ${BMAKE} fetch >/dev/null 2>&1 230 && ${BMAKE} fetch >/dev/null 2>&1
231 ) || { 231 ) || {
232 echo "build> Updating pkgtools" 232 echo "build> Updating pkgtools"
233 ( cd "${pkgsrc_dir}/pkgtools/pkg_install" \ 233 ( cd "${pkgsrc_dir}/pkgtools/pkg_install" \
234 && ${BMAKE} clean \ 234 && ${BMAKE} clean \
235 && ${BMAKE} install \ 235 && ${BMAKE} update
236 && ${BMAKE} clean 
237 ) || die "Could not update the package tools." 236 ) || die "Could not update the package tools."
238 } 237 }
239} 238}
240 239
241# Run the pre-build script if necessary. 240# Run the pre-build script if necessary.
242run_pre_build () { 241run_pre_build () {
243 case $resume in 242 case $resume in
244 yes) echo "build> Resuming -- skipping pre-build script";; 243 yes) echo "build> Resuming -- skipping pre-build script";;
245 *) # make veryveryclean :) 244 *) # make veryveryclean :)
246 ( cd "${pkgsrc_dir}" \ 245 ( cd "${pkgsrc_dir}" \
247 && /bin/sh mk/bulk/pre-build 246 && /bin/sh mk/bulk/pre-build
248 ) || die "Error during bulk-build preparations, aborting.";; 247 ) || die "Error during bulk-build preparations, aborting.";;
249 esac 248 esac

cvs diff -r1.149 -r1.149.2.1 pkgsrc/pkgtools/pkg_install/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/pkg_install/Makefile 2008/04/03 14:22:26 1.149
+++ pkgsrc/pkgtools/pkg_install/Makefile 2008/06/17 14:58:14 1.149.2.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.149 2008/04/03 14:22:26 jlam Exp $ 1# $NetBSD: Makefile,v 1.149.2.1 2008/06/17 14:58:14 tron Exp $
2 2
3# Notes to package maintainers: 3# Notes to package maintainers:
4# 4#
5# Updating this package does not automatically necessitate bumping 5# Updating this package does not automatically necessitate bumping
6# PKGTOOLS_REQD in bsd.pkg.mk. Do so if and only if there is a critical 6# PKGTOOLS_REQD in bsd.pkg.mk. Do so if and only if there is a critical
7# change in the pkg_* tools that pkgsrc relies on for proper operation. 7# change in the pkg_* tools that pkgsrc relies on for proper operation.
8 8
9DISTNAME= pkg_install-${VERSION} 9DISTNAME= pkg_install-${VERSION}
10CATEGORIES= pkgtools 10CATEGORIES= pkgtools
11MASTER_SITES= # empty 11MASTER_SITES= # empty
12DISTFILES= # empty 12DISTFILES= # empty
13 13
14MAINTAINER= joerg@NetBSD.org 14MAINTAINER= joerg@NetBSD.org
@@ -43,30 +43,32 @@ NO_MTREE= yes @@ -43,30 +43,32 @@ NO_MTREE= yes
43PKG_PRESERVE= yes 43PKG_PRESERVE= yes
44CHECK_PERMS= no 44CHECK_PERMS= no
45 45
46# These are needed to solve a chicken-and-egg problem where pkgsrc uses 46# These are needed to solve a chicken-and-egg problem where pkgsrc uses
47# newer features of pkg_install, but older NetBSD installations won't 47# newer features of pkg_install, but older NetBSD installations won't
48# support them. In this case, we explicitly use the native GCC 48# support them. In this case, we explicitly use the native GCC
49# compiler to avoid problems with depending on pkgsrc GCC for building 49# compiler to avoid problems with depending on pkgsrc GCC for building
50# pkg_install. 50# pkg_install.
51# 51#
52# We also use the newly built pkg_{add,create,delete} since upgrading 52# We also use the newly built pkg_{add,create,delete} since upgrading
53# from an older pkg_install might required features of the new program.  53# from an older pkg_install might required features of the new program.
54# 54#
55USE_NATIVE_GCC= yes 55USE_NATIVE_GCC= yes
 56.if exists(${WRKSRC}/add/pkg_add)
56PKG_ADD_CMD= ${WRKSRC}/add/pkg_add 57PKG_ADD_CMD= ${WRKSRC}/add/pkg_add
57PKG_CREATE_CMD= ${WRKSRC}/create/pkg_create 58PKG_CREATE_CMD= ${WRKSRC}/create/pkg_create
58PKG_DELETE_CMD= ${WRKSRC}/delete/pkg_delete 59PKG_DELETE_CMD= ${WRKSRC}/delete/pkg_delete
59PKG_INFO_CMD= ${WRKSRC}/info/pkg_info 60PKG_INFO_CMD= ${WRKSRC}/info/pkg_info
 61.endif
60 62
61CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES 63CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES
62CPPFLAGS+= -D_FILE_OFFSET_BITS=64 64CPPFLAGS+= -D_FILE_OFFSET_BITS=64
63 65
64CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK} 66CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK}
65 67
66MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH:Q} 68MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH:Q}
67MAKE_ENV+= OPSYS=${OPSYS:Q} 69MAKE_ENV+= OPSYS=${OPSYS:Q}
68 70
69PKG_DBDIR?= /var/db/pkg 71PKG_DBDIR?= /var/db/pkg
70EGDIR= ${PREFIX}/share/examples/pkg_install 72EGDIR= ${PREFIX}/share/examples/pkg_install
71 73
72PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q} 74PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q}