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.diff -r1.103 -r1.103.2.1 pkgsrc/mk/bulk/build
(tron)
@@ -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. | |
227 | check_tools () { | 227 | check_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. | |
242 | run_pre_build () { | 241 | run_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 |
@@ -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 | |||
9 | DISTNAME= pkg_install-${VERSION} | 9 | DISTNAME= pkg_install-${VERSION} | |
10 | CATEGORIES= pkgtools | 10 | CATEGORIES= pkgtools | |
11 | MASTER_SITES= # empty | 11 | MASTER_SITES= # empty | |
12 | DISTFILES= # empty | 12 | DISTFILES= # empty | |
13 | 13 | |||
14 | MAINTAINER= joerg@NetBSD.org | 14 | MAINTAINER= joerg@NetBSD.org | |
@@ -43,30 +43,32 @@ NO_MTREE= yes | @@ -43,30 +43,32 @@ NO_MTREE= yes | |||
43 | PKG_PRESERVE= yes | 43 | PKG_PRESERVE= yes | |
44 | CHECK_PERMS= no | 44 | CHECK_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 | # | |
55 | USE_NATIVE_GCC= yes | 55 | USE_NATIVE_GCC= yes | |
56 | .if exists(${WRKSRC}/add/pkg_add) | |||
56 | PKG_ADD_CMD= ${WRKSRC}/add/pkg_add | 57 | PKG_ADD_CMD= ${WRKSRC}/add/pkg_add | |
57 | PKG_CREATE_CMD= ${WRKSRC}/create/pkg_create | 58 | PKG_CREATE_CMD= ${WRKSRC}/create/pkg_create | |
58 | PKG_DELETE_CMD= ${WRKSRC}/delete/pkg_delete | 59 | PKG_DELETE_CMD= ${WRKSRC}/delete/pkg_delete | |
59 | PKG_INFO_CMD= ${WRKSRC}/info/pkg_info | 60 | PKG_INFO_CMD= ${WRKSRC}/info/pkg_info | |
61 | .endif | |||
60 | 62 | |||
61 | CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES | 63 | CPPFLAGS+= -D_LARGEFILE_SOURCE -D_LARGE_FILES | |
62 | CPPFLAGS+= -D_FILE_OFFSET_BITS=64 | 64 | CPPFLAGS+= -D_FILE_OFFSET_BITS=64 | |
63 | 65 | |||
64 | CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK} | 66 | CPPFLAGS+= -DDEF_UMASK=${DEF_UMASK} | |
65 | 67 | |||
66 | MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH:Q} | 68 | MAKE_ENV+= MACHINE_ARCH=${MACHINE_ARCH:Q} | |
67 | MAKE_ENV+= OPSYS=${OPSYS:Q} | 69 | MAKE_ENV+= OPSYS=${OPSYS:Q} | |
68 | 70 | |||
69 | PKG_DBDIR?= /var/db/pkg | 71 | PKG_DBDIR?= /var/db/pkg | |
70 | EGDIR= ${PREFIX}/share/examples/pkg_install | 72 | EGDIR= ${PREFIX}/share/examples/pkg_install | |
71 | 73 | |||
72 | PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q} | 74 | PLIST_SUBST+= PKG_DBDIR=${PKG_DBDIR:Q} |