tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Providing an easy additional way of avoiding uploading non-redistributable packages



On Thu, May 21, 2020 at 12:40:27PM -0400, Greg Troxel wrote:
> coypu%sdf.org@localhost writes:
> 
> > I'm tempted to use
> > SKIP_LICENSE_CHECK=redistributable
> >
> > It wins on "user friendliness", but possibly looks a bit ugly make-wise,
> > to have the tunable appear in two disconnected phases.
> 
> Fine with me.

Patch for this attached (went with 'distributable', does that mean
something else? ...)

Using PKG_SKIP_REASON instead of FAIL.
Index: package/package.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/package/package.mk,v
retrieving revision 1.27
diff -u -r1.27 package.mk
--- package/package.mk	7 May 2019 19:36:44 -0000	1.27
+++ package/package.mk	22 May 2020 20:56:38 -0000
@@ -111,6 +111,10 @@
 .if defined(NO_BIN_ON_FTP)
 	@${WARNING_MSG} "${PKGNAME} may not be made available through FTP:"
 	@${WARNING_MSG} ${NO_BIN_ON_FTP:Q}
+.if !empty(SKIP_LICENSE_CHECK:tl:Mdistributable)
+PKG_SKIP_REASON+=	"${PKGNAME} can't be distributed, skipping"
+.endif
+
 .endif
 .if defined(ABI_DEPENDS) && !empty(USE_ABI_DEPENDS:M[Nn][Oo])
 	@${WARNING_MSG} "ABI dependency recommendations are being ignored!"
Index: license.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/license.mk,v
retrieving revision 1.105
diff -u -r1.105 license.mk
--- license.mk	30 Apr 2020 08:43:25 -0000	1.105
+++ license.mk	22 May 2020 20:56:38 -0000
@@ -214,7 +214,8 @@
 
 SKIP_LICENSE_CHECK?=	no
 
-.if !empty(SKIP_LICENSE_CHECK:M[Yy][Ee][Ss])
+.if !empty(SKIP_LICENSE_CHECK:tl:Myes) || \
+    !empty(SKIP_LICENSE_CHECK:tl:Mdistributable)
 _ACCEPTABLE_LICENSE=	skipped
 .else
 _ACCEPTABLE_LICENSE!=	\


Home | Main Index | Thread Index | Old Index