svn commit: r470451 - in head/ports-mgmt/portmaster: . files
Stefan Esser
se at FreeBSD.org
Sun May 20 10:56:15 UTC 2018
Author: se
Date: Sun May 20 10:56:13 2018
New Revision: 470451
URL: https://svnweb.freebsd.org/changeset/ports/470451
Log:
Fix recursive building of ports (-r option). The match_flavor function was
called before being defined.
The issue and cause has been reported by Herbert J. Skuhra. (Thanks!)
PR: 227882
Reported by: Herbert J. Skuhra <herbert at gojira.at>
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 Sun May 20 10:46:23 2018 (r470450)
+++ head/ports-mgmt/portmaster/Makefile Sun May 20 10:56:13 2018 (r470451)
@@ -2,7 +2,7 @@
PORTNAME= portmaster
PORTVERSION= 3.19
-PORTREVISION= 10
+PORTREVISION= 11
CATEGORIES= ports-mgmt
MAINTAINER= se at FreeBSD.org
Modified: head/ports-mgmt/portmaster/files/patch-portmaster
==============================================================================
--- head/ports-mgmt/portmaster/files/patch-portmaster Sun May 20 10:46:23 2018 (r470450)
+++ head/ports-mgmt/portmaster/files/patch-portmaster Sun May 20 10:56:13 2018 (r470451)
@@ -77,9 +77,31 @@
# Superuser versions for commands that need root privileges
-@@ -563,11 +562,15 @@ find_glob_dirs () {
+@@ -562,12 +561,37 @@ find_glob_dirs () {
+ return 1
}
++match_flavor () {
++ local origin=$(dir_part $1)
++ local flavor # =$(flavor_part $1)
++ local iport="$2"
++ local dir="$pd/$origin"
++
++ if [ -d "$dir" ]; then
++ local IFS=' '
++ local pkgname=${iport%-*}
++ local flavors=$(pm_make -C "$dir" -V FLAVORS)
++ for flavor in $flavors; do
++ local p=$(pm_make -C "$dir" FLAVOR=$flavor -V PKGNAME)
++ if [ -n "$p" -a "${p%-*}" = "$pkgname" ]; then
++ echo "$origin@$flavor"
++ return
++ fi
++ done
++ fi
++ echo "$1" # should not be reached!
++}
++
origin_from_pdb () {
- local flavor pkgname
+ local flavor pkgname origin_flavor
@@ -95,7 +117,7 @@
case "$pkgname" in bsdpan-*) return 3 ;; esac
-@@ -789,6 +792,7 @@ if [ -n "$ALWAYS_SCRUB_DISTFILES" -a -n "$DONT_SCRUB_D
+@@ -789,6 +813,7 @@ if [ -n "$ALWAYS_SCRUB_DISTFILES" -a -n "$DONT_SCRUB_D
fail "The -d and -D options are mutually exclusive"
fi
@@ -103,7 +125,7 @@
[ -n "$PM_NO_MAKE_CONFIG" -a -n "$PM_FORCE_CONFIG" ] && unset PM_NO_MAKE_CONFIG
if [ -n "$LIST" -o -n "$LIST_PLUS" ]; then
-@@ -927,6 +931,9 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
+@@ -927,6 +952,9 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
fi
fi # [ "$$" -eq "$PM_PARENT_PID" ]
@@ -113,34 +135,32 @@
#=============== Begin functions relevant to --features and main ===============
# find installed port for given origin (with optional @flavor) in the pkg DB
-@@ -1004,21 +1011,23 @@ get_answer_yn () {
+@@ -1002,25 +1030,6 @@ get_answer_yn () {
+ fi
+ }
- match_flavor () {
- local origin=$(dir_part $1)
+-match_flavor () {
+- local origin=$(dir_part $1)
- local flavor=$(flavor_part $1)
-+ local flavor # =$(flavor_part $1)
- local iport="$2"
- local dir="$pd/$origin"
-
+- local iport="$2"
+- local dir="$pd/$origin"
+-
- [ -n "$flavor" -a -d "$dir" ] || return
-+ if [ -d "$dir" ]; then
- local IFS=' '
- local pkgname=${iport%-*}
- local flavors=$(pm_make -C "$dir" -V FLAVORS)
- for flavor in $flavors; do
- local p=$(pm_make -C "$dir" FLAVOR=$flavor -V PKGNAME)
- if [ -n "$p" -a "${p%-*}" = "$pkgname" ]; then
+- local IFS=' '
+- local pkgname=${iport%-*}
+- local flavors=$(pm_make -C "$dir" -V FLAVORS)
+- for flavor in $flavors; do
+- local p=$(pm_make -C "$dir" FLAVOR=$flavor -V PKGNAME)
+- if [ -n "$p" -a "${p%-*}" = "$pkgname" ]; then
- moved_npd="$origin@$flavor"
- break
-+ echo "$origin@$flavor"
-+ return
- fi
- done
-+ fi
-+ echo "$1" # should not be reached!
- }
-
+- fi
+- done
+-}
+-
# Find the new origin for moved ports
+ # Set global variable moved_npd on success
+ # Return values:
@@ -1056,7 +1065,8 @@ find_moved_port () {
fi ;;
${sf}\|*) moved_npd=${moved#*\|} # New port directory
More information about the svn-ports-head
mailing list