Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jan 2018 22:44:39 +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: r457932 - in head/ports-mgmt/portmaster: . files
Message-ID:  <201801022244.w02MidXD004869@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: se
Date: Tue Jan  2 22:44:39 2018
New Revision: 457932
URL: https://svnweb.freebsd.org/changeset/ports/457932

Log:
  Add undocumented option --package-format=<fmt>. I'm not sure, that this is
  a useful feature, and the txz-format is currently hard-wired in a lot of
  places in portmaster, but there has been a request to allow creation of
  packages in a non-standard archive format.
  
  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 Jan  2 22:12:14 2018	(r457931)
+++ head/ports-mgmt/portmaster/Makefile	Tue Jan  2 22:44:39 2018	(r457932)
@@ -2,7 +2,7 @@
 
 PORTNAME=	portmaster
 PORTVERSION=	3.18
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	ports-mgmt
 
 MAINTAINER=	se@FreeBSD.org

Modified: head/ports-mgmt/portmaster/files/patch-portmaster
==============================================================================
--- head/ports-mgmt/portmaster/files/patch-portmaster	Tue Jan  2 22:12:14 2018	(r457931)
+++ head/ports-mgmt/portmaster/files/patch-portmaster	Tue Jan  2 22:44:39 2018	(r457932)
@@ -1,6 +1,17 @@
 --- portmaster.orig	2017-12-21 09:02:44 UTC
 +++ portmaster
-@@ -113,13 +113,13 @@ kill_bad_children () {
+@@ -51,9 +51,8 @@ fi
+ #=============== Begin functions we always want to have ===============
+ 
+ version () {
+-	local pkgname="%%PKGNAME%%"
++	local pkgname="portmaster-3.18_6"
+ 	echo '' ; echo "===>>> Version ${pkgname##*-}"
+-	#svn='$FreeBSD: user/dougb/portmaster/portmaster 241090 2012-10-01 08:32:05Z dougb $'
+ }
+ 
+ fail () {
+@@ -113,13 +112,13 @@ kill_bad_children () {
  		[ "$pid" -gt 25 ] || continue
  		case "$ppid" in
  		1)	case "$command" in
@@ -16,7 +27,7 @@
  			*'make -DBATCH checksum'*|*'/fetch '*|\[sh\]) pm_kill $pid ;;
  			esac ;;
  		esac
-@@ -412,7 +412,7 @@ usage () {
+@@ -412,7 +411,7 @@ usage () {
  	echo "    [[[--packages|-P]|[--packages-only|-PP]] | [--packages-build]]"
  	echo "    [--packages-if-newer] [--delete-build-only] [--always-fetch]"
  	echo "    [--local-packagedir=<path>] [--packages-local] [--delete-packages]"
@@ -25,16 +36,18 @@
  	echo "    [--index|--index-first|--index-only] [-m <arguments for make>]"
  	echo "    [-x <glob pattern to exclude from building>]"
  	echo "$progname [Common flags] <full name of port directory in $pdb>"
-@@ -653,6 +653,8 @@ for var in "$@" ; do
+@@ -653,6 +652,10 @@ for var in "$@" ; do
  				export LOCAL_PACKAGEDIR ;;
  	--delete-packages)	PM_DELETE_PACKAGES=pm_delete_packages
  				export PM_DELETE_PACKAGES ;;
 +	--backup-format=*)	BACKUP_FORMAT=${var#--backup-format=}
 +				export BACKUP_FORMAT ;;
++	--package-format=*)	PACKAGE_FORMAT=${var#--package-format=}
++				export PACKAGE_FORMAT ;;
  #	--flavor=*)		PM_FLAVOR=${var#--flavor=} ;;
  	--update-if-newer)	PM_UPDATE_IF_NEWER=pm_update_if_newer
  				export PM_UPDATE_IF_NEWER ;;
-@@ -1589,7 +1591,7 @@ init_packages () {
+@@ -1589,25 +1592,30 @@ init_packages () {
  }
  
  pm_pkg_create () {
@@ -43,7 +56,14 @@
  
  	init_packages
  
-@@ -1602,12 +1604,13 @@ pm_pkg_create () {
++	[ -z "$BACKUP_FORMAT" -a -n "$PACKAGE_FORMAT" ] && export BACKUP_FORMAT=$PACKAGE_FORMAT
+ 	if [ "$1" = "$PACKAGES" ]; then
+ 		for pkgdir in All Latest ${portdir%/*}; do
+ 			pm_mkdir_s ${PACKAGES}/${pkgdir} ||
+ 				fail "Cannot mkdir -p ${PACKAGES}/${pkgdir}"
+ 		done
+ 		pkgdir=${PACKAGES}/All
++		format_option=${PACKAGE_FORMAT:+-f $PACKAGE_FORMAT}
  		echo "===>>> Creating a package for new version $2"
  	else
  		pkgdir=$1 ; echo ''
@@ -54,11 +74,13 @@
  
  	pm_cd $pkgdir || fail "Cannot cd into $pkgdir to create a package"
 -	if $PM_SU_CMD pkg create $2; then
++set -x
 +	if $PM_SU_CMD pkg create $format_option $2; then
++set +x
  		if [ "$1" = "$pbu" ]; then
  			if [ -n "$BACKUP" ]; then
  				echo "	===>>> Package saved to $1" ; echo ''
-@@ -1616,15 +1619,14 @@ pm_pkg_create () {
+@@ -1616,15 +1624,14 @@ pm_pkg_create () {
  				NB_DELETE="${NB_DELETE}${pkg} "
  			fi
  		elif [ "$1" = "$PACKAGES" ]; then
@@ -78,7 +100,7 @@
  			fi
  
  			cd ${1}/${portdir%/*}
-@@ -1665,7 +1667,7 @@ find_dl_distfiles () {
+@@ -1665,7 +1672,7 @@ find_dl_distfiles () {
  	else
  		# Old method, for now
  		if pm_cd $pd/$1; then
@@ -87,7 +109,7 @@
  			dist_list="${dist_list%options}distfiles"
  		else
  			# The port might have moved, etc.; so take a stab at it,
-@@ -1803,6 +1805,7 @@ set_distfiles_and_subdir () {
+@@ -1803,6 +1810,7 @@ set_distfiles_and_subdir () {
  }
  
  delete_stale_distfiles () {
@@ -95,7 +117,7 @@
  	# Global: distfiles_checked
  	local file answer
  
-@@ -1849,6 +1852,7 @@ delete_stale_distfiles () {
+@@ -1849,6 +1857,7 @@ delete_stale_distfiles () {
  }
  
  delete_all_distfiles () {
@@ -103,7 +125,7 @@
  	# Global: delete_all DISTDIR
  	local origin rc delete_current
  
-@@ -2264,12 +2268,14 @@ make_dep_list () {
+@@ -2264,12 +2273,14 @@ make_dep_list () {
  
  	for dep_type in $*; do
  		case $dep_type in
@@ -123,7 +145,7 @@
  		*)
  			fail "make_dep_list: Unsupported option '$dep_type'"
  		esac
-@@ -3302,7 +3308,7 @@ pm_cd_pd $portdir
+@@ -3302,7 +3313,7 @@ pm_cd_pd $portdir
  
  if [ -n "$PM_BUILD_ONLY_LIST" ]; then
  	case "$build_only_dl_g" in
@@ -132,7 +154,7 @@
  		[ -n "$PM_PACKAGES_BUILD" ] && PM_PACKAGES_BUILD=doing_build_only_dep
  		[ -n "$PM_DEL_BUILD_ONLY" ] && PM_DEL_BUILD_ONLY=doing_build_only_dep ;;
  	*)	[ -n "$PM_PACKAGES_BUILD" ] && PM_PACKAGES_BUILD=pmp_build
-@@ -3402,31 +3408,19 @@ fetch_package () {
+@@ -3402,31 +3413,19 @@ fetch_package () {
  }
  	if [ -z "$PACKAGESITE" -a -z "$PM_PACKAGES_LOCAL" ]; then
  		release=`uname -r`
@@ -169,7 +191,7 @@
  
  	echo "===>>> Checking package repository for latest available version"
  
-@@ -3437,11 +3431,12 @@ fetch_package () {
+@@ -3437,11 +3436,12 @@ fetch_package () {
  			latest_pv=${local_package##*/}
  		fi
  		if [ -z "$latest_pv" -a -z "$PM_INDEX_ONLY" ]; then
@@ -187,3 +209,12 @@
  				latest_pv=${latest_pv##*/}
  			else
  				pm_v "===>>> No local package for ${new_port}, attempting fetch"
+@@ -3850,7 +3850,7 @@ fi
+ if [ -n "$MAKE_PACKAGE" ]; then
+ 	if [ -z "$use_package" ]; then
+ 		echo "===>>> Creating a package for new version $new_port"
+-		pm_make_s -D_OPTIONS_OK package >/dev/null || fail "Package creation of $new_port failed"
++		pm_make_s -D_OPTIONS_OK ${PACKAGE_FORMAT:+PKG_SUFX=.$PACKAGE_FORMAT} package >/dev/null || fail "Package creation of $new_port failed"
+ 		echo "	===>>> Package saved to $PACKAGES/All" ; echo ''
+ 	else
+ 		pm_pkg_create $PACKAGES $new_port



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