Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Feb 2018 13:12:04 +0000 (UTC)
From:      Stefan Esser <se@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r461041 - in head/ports-mgmt/portmaster: . files
Message-ID:  <201802061312.w16DC4GB063842@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: se
Date: Tue Feb  6 13:12:04 2018
New Revision: 461041
URL: https://svnweb.freebsd.org/changeset/ports/461041

Log:
  Fix build for ports that have a LICENSE if DISABLE_LICENSES is defined.
  
  The behavior of the ask-license target should be to silently succeed instead
  of returning an error, IMHO, but I can test for this condition and skip the
  ask-license phase in portmaster, too.
  
  While here, I'm slightly simplifying the fix implemented in r460294.
  
  PR:		225699
  Submitted by:	dewayne@heuristicsystems.com.au
  Approved by:	antoine (implicit)

Modified:
  head/ports-mgmt/portmaster/Makefile
  head/ports-mgmt/portmaster/files/patch-portmaster

Modified: head/ports-mgmt/portmaster/Makefile
==============================================================================
--- head/ports-mgmt/portmaster/Makefile	Tue Feb  6 13:09:41 2018	(r461040)
+++ head/ports-mgmt/portmaster/Makefile	Tue Feb  6 13:12:04 2018	(r461041)
@@ -2,7 +2,7 @@
 
 PORTNAME=	portmaster
 PORTVERSION=	3.19
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	ports-mgmt
 
 MAINTAINER=	se@FreeBSD.org

Modified: head/ports-mgmt/portmaster/files/patch-portmaster
==============================================================================
--- head/ports-mgmt/portmaster/files/patch-portmaster	Tue Feb  6 13:09:41 2018	(r461040)
+++ head/ports-mgmt/portmaster/files/patch-portmaster	Tue Feb  6 13:12:04 2018	(r461041)
@@ -177,23 +177,16 @@
  else
  	portdir="${1#$pd/}" ; portdir="${portdir%/}"
  	export_flavor=$(flavor_part $portdir)
-@@ -3138,12 +3155,13 @@ if [ -z "$PM_INDEX_ONLY" ] && ! pm_isdir_pd "$portdir"
- fi
- 
- iport_from_pkgname () {
--	local dir flavor pkgname
-+	local dir flavor pkgname pattern
- 
+@@ -3143,7 +3160,7 @@ iport_from_pkgname () {
  	dir=$(dir_part $1)
  	flavor=$(flavor_part $1)
  	pkgname=$(FLAVOR=$flavor make -C "$pd/$dir" -V PKGNAME) || return 1
 -	pkg info -x "^${pkgname%-*}"'-[^-]*' 2>/dev/null
-+	pattern="^${pkgname%-*}"'-[^-]*$'
-+	pkg info -x "$pattern" 2>/dev/null | egrep -- "$pattern"
++	pkg info -xC "^${pkgname%-*}\$" 2>/dev/null
  }
  
  if [ -z "$upg_port" -a -z "$REPLACE_ORIGIN" ]; then
-@@ -3229,11 +3247,14 @@ if [ -n "$PM_FIRST_PASS" -a -z "$FETCH_ONLY" ]; then
+@@ -3229,11 +3246,14 @@ if [ -n "$PM_FIRST_PASS" -a -z "$FETCH_ONLY" ]; then
  		fi
  	fi
  
@@ -209,8 +202,12 @@
  # Do these things first time through
  if [ -z "$PM_INDEX_ONLY" -a -z "$PM_BUILDING" -a -z "$SHOW_WORK" -a -z "$NO_ACTION" ]; then
  	# Do not start this in the background until we are sure we are going to proceed
-@@ -3639,12 +3660,18 @@ pkg_flavor () {
- 	if [ -n "$HIDE_BUILD" ] && [ -n "$(pm_make -V LICENSE)" ]; then
+@@ -3636,15 +3656,21 @@ pkg_flavor () {
+ 	pm_make pretty-flavors-package-names | sed -ne 's!^\([A-Za-z0-9_]*\): *'$pkg'$!\1!p';
+ }
+ 	export_flavor=$(pkg_flavor $new_port)
+-	if [ -n "$HIDE_BUILD" ] && [ -n "$(pm_make -V LICENSE)" ]; then
++	if [ -n "$HIDE_BUILD" ] && [ -n "$(pm_make -V LICENSE)" ] && [ -z "$(pm_make -V DISABLE_LICENSES)" ]; then
  		pm_make extract ask-license || fail "make extract ask-license failed for $portdir"
  	fi
 +	if [ "$make_target" = "extract" -o "$make_target" = "patch" ]; then
@@ -228,7 +225,7 @@
  else
  	[ -z "$local_package" ] && {
  		fetch_package $latest_pv || fail "Fetch for ${latest_pv}.txz failed"; }
-@@ -3876,9 +3903,12 @@ if [ -n "$MAKE_PACKAGE" ]; then
+@@ -3876,9 +3902,12 @@ if [ -n "$MAKE_PACKAGE" ]; then
  fi
  
  if [ -z "$use_package" -a -z "$DONT_POST_CLEAN" ]; then



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802061312.w16DC4GB063842>