pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk If a package is already installed, the PKG_OPTIONS ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/93174374fdc4
branches: trunk
changeset: 528542:93174374fdc4
user: rillig <rillig%pkgsrc.org@localhost>
date: Mon May 07 09:26:40 2007 +0000
description:
If a package is already installed, the PKG_OPTIONS of the installed
package is returned rather than querying the source package. First, this
is more correct, and second, it greatly speeds up pkgsrc, especially
when many packages are already installed.
diffstat:
mk/pkg-build-options.mk | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r 6495d49981cd -r 93174374fdc4 mk/pkg-build-options.mk
--- a/mk/pkg-build-options.mk Mon May 07 08:19:35 2007 +0000
+++ b/mk/pkg-build-options.mk Mon May 07 09:26:40 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pkg-build-options.mk,v 1.2 2007/04/10 03:45:36 rillig Exp $
+# $NetBSD: pkg-build-options.mk,v 1.3 2007/05/07 09:26:40 rillig Exp $
#
# This procedure determines the PKG_OPTIONS that have been in effect
# when the package ${pkgbase} has been built. When the package is not
@@ -16,16 +16,16 @@
# pkgbase := wine
# .include "../../mk/pkg-build-options.mk"
#
-# TODO: Query the installed package if it exists.
-#
+
+.include "${.PARSEDIR}/bsd.fast.prefs.mk"
.if defined(BUILDLINK_DEPTH) && !empty(BUILDLINK_DEPTH)
. for b in ${pkgbase}
. if !defined(PKG_BUILD_OPTIONS.${b})
PKG_BUILD_OPTIONS.${b} != \
- cd ${BUILDLINK_PKGSRCDIR.${b}} \
- && ${MAKE} ${MAKEFLAGS} \
- show-var VARNAME=PKG_OPTIONS
+ ${PKG_INFO} -Q PKG_OPTIONS ${pkgbase} 2>/dev/null \
+ || { cd ${BUILDLINK_PKGSRCDIR.${b}} \
+ && ${MAKE} ${MAKEFLAGS} show-var VARNAME=PKG_OPTIONS; }
MAKEFLAGS+= PKG_BUILD_OPTIONS.${b}=${PKG_BUILD_OPTIONS.${b}:Q}
. endif
Home |
Main Index |
Thread Index |
Old Index