pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg_comp - asking for setup tips
On Mon, Jul 13, 2009 at 06:40:35PM -0400, Martin S. Weber wrote:
> On Mon, Jul 13, 2009 at 09:50:29PM +0700, Robert Elz wrote:
> > | Actually the only two thing that annoys me about
> > | pkg_comp is that PKG_DEVELOPER is set inside the chroot's etc/mk.conf
Oh, forgot in previous mail, PKG_DEVELOPER is also one of these mischievious
and hideous variables that are initialized with a "yes" but aren't checked
for a yes or no, but instead defining them already pulls in the whole machinery,
even if that definition is "no". So you cannot even, with pkg_comp, say
"makeroot please and don't set PKG_DEVELOPER inside" because it'll always
end up being defined. Attached patch might help (not thoroughly tested but
hey I'm just a user not a developer ;)
-Martin
Index: mk/bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1957
diff -w -u -i -t -r1.1957 bsd.pkg.mk
--- mk/bsd.pkg.mk 26 May 2009 06:03:02 -0000 1.1957
+++ mk/bsd.pkg.mk 13 Jul 2009 22:55:18 -0000
@@ -793,7 +793,7 @@
.include "pbulk/pbulk-index.mk"
.endif
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
. include "misc/developer.mk"
.endif
.include "misc/show.mk"
Index: mk/bsd.prefs.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.prefs.mk,v
retrieving revision 1.294
diff -w -u -i -t -r1.294 bsd.prefs.mk
--- mk/bsd.prefs.mk 23 May 2009 23:48:44 -0000 1.294
+++ mk/bsd.prefs.mk 13 Jul 2009 22:55:18 -0000
@@ -399,7 +399,7 @@
PKG_FAIL_REASON+= "PKG_DESTDIR_SUPPORT must be \`\`destdir'' or
\`\`user-destdir''."
.endif
-.if defined(PKG_DEVELOPER) && empty(PKG_DESTDIR_SUPPORT)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss]) &&
empty(PKG_DESTDIR_SUPPORT)
WARNINGS+= "[bsd.prefs.mk] The package ${PKGNAME} misses DESTDIR support."
.endif
Index: mk/license.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/license.mk,v
retrieving revision 1.25
diff -w -u -i -t -r1.25 license.mk
--- mk/license.mk 29 Jun 2009 14:49:57 -0000 1.25
+++ mk/license.mk 13 Jul 2009 22:55:18 -0000
@@ -111,7 +111,7 @@
.endif
.if !defined(LICENSE)
-. if defined(PKG_DEVELOPER)
+. if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
WARNINGS+= "[license.mk] Every package should define a LICENSE."
. endif
Index: mk/check/check-fakehome.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/check/check-fakehome.mk,v
retrieving revision 1.2
diff -w -u -i -t -r1.2 check-fakehome.mk
--- mk/check/check-fakehome.mk 5 Feb 2008 11:17:00 -0000 1.2
+++ mk/check/check-fakehome.mk 13 Jul 2009 22:55:18 -0000
@@ -19,7 +19,7 @@
_PKG_VARS.check-fakehome= # None for now. One might be added to override
# the test if the fakehome test is made fatal.
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
CHECK_FAKEHOME?= yes
.else
CHECK_FAKEHOME?= no
Index: mk/check/check-files.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/check/check-files.mk,v
retrieving revision 1.24
diff -w -u -i -t -r1.24 check-files.mk
--- mk/check/check-files.mk 8 May 2009 20:46:29 -0000 1.24
+++ mk/check/check-files.mk 13 Jul 2009 22:55:18 -0000
@@ -29,7 +29,7 @@
_USER_VARS.check-files= CHECK_FILES CHECK_FILES_STRICT
_PKG_VARS.check-files= CHECK_FILES_SKIP
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
CHECK_FILES?= yes
.endif
CHECK_FILES?= no
Index: mk/check/check-headers.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/check/check-headers.mk,v
retrieving revision 1.5
diff -w -u -i -t -r1.5 check-headers.mk
--- mk/check/check-headers.mk 20 Feb 2008 10:43:55 -0000 1.5
+++ mk/check/check-headers.mk 13 Jul 2009 22:55:18 -0000
@@ -19,7 +19,7 @@
_USER_VARS.check-headers= CHECK_HEADERS
_PKG_VARS.check-headers= CHECK_HEADERS_SKIP
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
# still experimental
#CHECK_HEADERS?= yes
.endif
Index: mk/check/check-interpreter.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/check/check-interpreter.mk,v
retrieving revision 1.23
diff -w -u -i -t -r1.23 check-interpreter.mk
--- mk/check/check-interpreter.mk 13 Feb 2008 08:33:08 -0000 1.23
+++ mk/check/check-interpreter.mk 13 Jul 2009 22:55:18 -0000
@@ -23,7 +23,7 @@
# Example: share/package1/* share/package2/somefile
#
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
CHECK_INTERPRETER?= yes
.else
CHECK_INTERPRETER?= no
Index: mk/check/check-perms.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/check/check-perms.mk,v
retrieving revision 1.12
diff -w -u -i -t -r1.12 check-perms.mk
--- mk/check/check-perms.mk 22 Jun 2008 22:05:19 -0000 1.12
+++ mk/check/check-perms.mk 13 Jul 2009 22:55:18 -0000
@@ -35,7 +35,7 @@
_USER_VARS.check-perms= CHECK_PERMS
_PKG_VARS.check-perms= CHECK_PERMS_SKIP CHECK_PERMS_AUTOSKIP
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
CHECK_PERMS?= yes
.else
CHECK_PERMS?= no
Index: mk/check/check-portability.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/check/check-portability.mk,v
retrieving revision 1.6
diff -w -u -i -t -r1.6 check-portability.mk
--- mk/check/check-portability.mk 20 Feb 2008 10:43:55 -0000 1.6
+++ mk/check/check-portability.mk 13 Jul 2009 22:55:18 -0000
@@ -33,7 +33,7 @@
_USER_VARS.check-portability= CHECK_PORTABILITY
_PKG_VARS.check-portability= CHECK_PORTABILITY_SKIP
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
CHECK_PORTABILITY?= yes
.endif
CHECK_PORTABILITY?= no
Index: mk/check/check-shlibs.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/check/check-shlibs.mk,v
retrieving revision 1.16
diff -w -u -i -t -r1.16 check-shlibs.mk
--- mk/check/check-shlibs.mk 18 Jun 2009 14:51:55 -0000 1.16
+++ mk/check/check-shlibs.mk 13 Jul 2009 22:55:18 -0000
@@ -22,7 +22,7 @@
_USER_VARS.check-shlibs= CHECK_SHLIBS
_PKG_VARS.check-shlibs= CHECK_SHLIBS_SUPPORTED
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
CHECK_SHLIBS?= yes
.endif
CHECK_SHLIBS?= no
Index: mk/check/check-stripped.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/check/check-stripped.mk,v
retrieving revision 1.3
diff -w -u -i -t -r1.3 check-stripped.mk
--- mk/check/check-stripped.mk 15 Dec 2008 12:28:49 -0000 1.3
+++ mk/check/check-stripped.mk 13 Jul 2009 22:55:18 -0000
@@ -20,7 +20,7 @@
# Example: bin/* sbin/foo
#
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
CHECK_STRIPPED?= no # XXX: change to "yes" later
.else
CHECK_STRIPPED?= no
Index: mk/check/check-wrkref.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/check/check-wrkref.mk,v
retrieving revision 1.19
diff -w -u -i -t -r1.19 check-wrkref.mk
--- mk/check/check-wrkref.mk 12 Jan 2009 13:11:22 -0000 1.19
+++ mk/check/check-wrkref.mk 13 Jul 2009 22:55:18 -0000
@@ -37,7 +37,7 @@
_USER_VARS.check-wrkref= CHECK_WRKREF
_PKG_VARS.check-wrkref= CHECK_WRKREF_SKIP
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
CHECK_WRKREF?= tools home
.endif
CHECK_WRKREF?= no
Index: mk/defaults/mk.conf
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defaults/mk.conf,v
retrieving revision 1.184
diff -w -u -i -t -r1.184 mk.conf
--- mk/defaults/mk.conf 20 Mar 2009 19:25:01 -0000 1.184
+++ mk/defaults/mk.conf 13 Jul 2009 22:55:19 -0000
@@ -138,14 +138,14 @@
#
# Default: undefined, but see above.
-#PKG_DEVELOPER= yes
+PKG_DEVELOPER= no
#
# Enables some sanity checks to raise the quality of the installed
# packages. See the files pkgsrc/mk/check/check-*.mk for details and
# further configuration options.
#
-# Possible: defined, not defined
-# Default: not defined
+# Possible: yes, no
+# Default: no
USE_ABI_DEPENDS?= yes
# Honor package prerequisite ABI recommendations. If this is set
@@ -181,14 +181,14 @@
# Possible: "yes", not "yes"
# Default: "yes"
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
PKGSRC_SHOW_PATCH_ERRORMSG?=no
.else
PKGSRC_SHOW_PATCH_ERRORMSG?=yes
.endif
# Print a potentially helpful error message when the "patch" stage fails
# Possible: "yes", not "yes"
-# Default: "no" if PKG_DEVELOPER is defined, "yes" otherwise
+# Default: "no" if PKG_DEVELOPER is "yes", "no" otherwise
PKGSRC_RUN_TEST?= no
#
@@ -487,7 +487,7 @@
# Possible: Regexps as in awk(1)
# Default: none
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
MASTER_SORT_RANDOM?= NO
.else
MASTER_SORT_RANDOM?= YES
@@ -495,7 +495,7 @@
# If set to YES or yes, a list of master sites will be randomly intermixed.
# Also, both MASTER_SORT and MASTER_SORT_REGEX may be applied later.
# Possible: yes, no / not defined
-# Default: NO if PKG_DEVELOPER is defined, YES otherwise
+# Default: NO if PKG_DEVELOPER is "yes", YES otherwise
#PATCH_DEBUG=
# Used to debug patches as they are applied
Index: mk/pkginstall/bsd.pkginstall.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/pkginstall/bsd.pkginstall.mk,v
retrieving revision 1.46
diff -w -u -i -t -r1.46 bsd.pkginstall.mk
--- mk/pkginstall/bsd.pkginstall.mk 4 Mar 2008 06:51:41 -0000 1.46
+++ mk/pkginstall/bsd.pkginstall.mk 13 Jul 2009 22:55:19 -0000
@@ -959,7 +959,7 @@
FILES_SUBST+= PKG_REGISTER_SHELLS=${PKG_REGISTER_SHELLS:Q}
FILES_SUBST+= PKG_UPDATE_FONTS_DB=${PKG_UPDATE_FONTS_DB:Q}
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
PKGINSTALL_VERBOSE?= all
.else
PKGINSTALL_VERBOSE?= # empty
Index: mk/tools/pkg-config.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/pkg-config.mk,v
retrieving revision 1.9
diff -w -u -i -t -r1.9 pkg-config.mk
--- mk/tools/pkg-config.mk 20 Apr 2008 19:32:31 -0000 1.9
+++ mk/tools/pkg-config.mk 13 Jul 2009 22:55:19 -0000
@@ -54,7 +54,7 @@
MAKE_ENV+= PKG_CONFIG_LOG=${_PKG_CONFIG_LOG:Q}
MAKE_ENV+= PKG_CONFIG_PATH=
-.if defined(PKG_DEVELOPER)
+.if defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
post-build: pkgconfig-post-build
pkgconfig-post-build:
Home |
Main Index |
Thread Index |
Old Index