<pre style='margin:0'>
Clemens Lang (neverpanic) pushed a commit to branch release-2.3
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/4023b79fd8b55c61ba396aaa81d1e70867f82840">https://github.com/macports/macports-base/commit/4023b79fd8b55c61ba396aaa81d1e70867f82840</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 4023b79fd8b55c61ba396aaa81d1e70867f82840
</span>Author: Clemens Lang <cal@macports.org>
AuthorDate: Sun Nov 6 18:11:49 2016 +0100
<span style='display:block; white-space:pre;color:#404040;'> Support multi-valued maintainers
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Since our move to GitHub it is sometimes hard to find out whether a pull
</span><span style='display:block; white-space:pre;color:#404040;'> request was sent by a maintainer or what a maintainer's Trac or GitHub
</span><span style='display:block; white-space:pre;color:#404040;'> account is. This can be solved by allowing GitHub usernames as
</span><span style='display:block; white-space:pre;color:#404040;'> maintainers, but puts us in the situation of not having an email address
</span><span style='display:block; white-space:pre;color:#404040;'> on file for a maintainer.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Solve this by supporting multi-valued maintainer fields using Tcl lists,
</span><span style='display:block; white-space:pre;color:#404040;'> so that
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> maintainers {@github-username macports-handle example.com:localpart}
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> works and is displayed as beloging to a single person.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> While we're at it, drop the two implementations of unobscure_maintainers
</span><span style='display:block; white-space:pre;color:#404040;'> and provide a public API in macports1.0 to be used.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Additionally, add tests that verify the behavior of
</span><span style='display:block; white-space:pre;color:#404040;'> macports::unobscure_maintainers.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit 30c27d5d3ad169ffa5f55465cf9663dbd1ff7537)
</span>---
src/macports1.0/macports.tcl | 13 +++++
src/macports1.0/macports_util.tcl | 50 ++++++++++++++++++++
src/macports1.0/tests/macports_util.test | 43 +++++++++++++++++
src/port/port.tcl | 81 +++++++++++++++++++-------------
src/port1.0/portutil.tcl | 26 ----------
src/port1.0/tests/portutil.test | 20 --------
6 files changed, 154 insertions(+), 79 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/macports.tcl b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index b345e3f..ca6b675 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/macports.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -4977,3 +4977,16 @@ proc macports::shellescape {arg} {
</span> # Add a single quote at the start, escape all single quotes in the argument, and add a single quote at the end
return "'[string map $mapping $arg]'"
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+##
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Given a list of maintainers as recorded in a Portfile, return a list of lists
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# in [key value ...] format describing all maintainers. Valid keys are 'email'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# which denotes a maintainer's email address, 'github', which preceeds the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# GitHub username of the maintainer and 'keyword', which contains a special
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# maintainer keyword such as 'openmaintainer' or 'nomaintainer'.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# @param list A list of obscured maintainers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# @return A list of associative arrays in serialized list format
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc macports::unobscure_maintainers {list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [macports_util::unobscure_maintainers $list]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/macports_util.tcl b/src/macports1.0/macports_util.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 72e2518..65b6520 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/macports_util.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/macports_util.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -37,6 +37,56 @@ namespace eval macports_util {
</span> ###################
# Private methods #
###################
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ##
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Given a list of maintainers as recorded in a Portfile, return a list of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # lists in [key value ...] format describing all maintainers. Valid keys
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # are 'email' which denotes a maintainer's email address, 'github', which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # preceeds the GitHub username of the maintainer and 'keyword', which
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # contains a special maintainer keyword such as 'openmaintainer' or
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # 'nomaintainer'.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # @param list A list of obscured maintainers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # @return A list of associative arrays in serialized list format
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ proc unobscure_maintainers {list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set result {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach sublist $list {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set maintainer {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach token $sublist {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[string index $token 0] eq "@"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Strings starting with @ are GitHub usernames
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set maintainer(github) [string range $token 1 end]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[string first "@" $token] >= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Other strings that contain @ are plain email addresses
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set maintainer(email) $token
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ continue
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[string first ":" $token] >= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Strings that contain a colon are obfuscated email
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # addresses
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Split at :, assign the first part to $domain, re-assemble
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the rest and assign it to $localpart
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set localpart [join [lassign [split $token ":"] domain] ":"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set maintainer(email) "${localpart}@${domain}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {$token in {"openmaintainer" "nomaintainer"}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Filter openmaintainer and nomaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set maintainer(keyword) $token
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # All other entries must be MacPorts handles
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set maintainer(email) "${token}@macports.org"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set serialized [array get maintainer]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array unset maintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[llength $serialized]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Filter empty maintainers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend result $serialized
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return $result
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> proc method_wrap {name} {
variable argdefault
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/tests/macports_util.test b/src/macports1.0/tests/macports_util.test
</span><span style='display:block; white-space:pre;color:#808080;'>index 53aa7c8..dd8dd75 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/tests/macports_util.test
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/tests/macports_util.test
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -30,6 +30,49 @@ test method_wrap {
</span> } -result "Method wrap successful."
<span style='display:block; white-space:pre;background:#e0ffe0;'>+test unobscure_maintainers_github {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Test macports::unobscure_maintainers with a GitHub handle
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -body {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [macports::unobscure_maintainers {@github-user}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -result {{github github-user}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test unobscure_maintainers_email {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Test macports::unobscure_maintainers with unobfuscated email addresses
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -body {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [macports::unobscure_maintainers {localpart@example.com}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -result {{email localpart@example.com}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test unobscure_maintainers_obfuscated_email {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Test macports::unobscure_maintainers with obfuscated email addresses
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -body {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [macports::unobscure_maintainers {example.com:localpart}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -result {{email localpart@example.com}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test unobscure_maintainers_handle {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Test macports::unobscure_maintainers with MacPorts handles
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -body {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [macports::unobscure_maintainers {handle}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -result {{email handle@macports.org}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test unobscure_maintainers_keywords {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Test macports::unobscure_maintainers with nomaintainer and openmaintainer keywords
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -body {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [macports::unobscure_maintainers {nomaintainer openmaintainer}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -result {{keyword nomaintainer} {keyword openmaintainer}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test unobscure_maintainers_multiple {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Test macports::unobscure_maintainers with multiple maintainers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -body {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [macports::unobscure_maintainers {@github-user example.com:localpart}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -result {{github github-user} {email localpart@example.com}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+test unobscure_maintainers_multivalue {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Test macports::unobscure_maintainers with multi-value maintainers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -body {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [macports::unobscure_maintainers {{handle @github-user}}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} -result {{email handle@macports.org github github-user}}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> test ldindex {
Ldindex unit test.
} -body {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port/port.tcl b/src/port/port.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 1c19c7d..1df03d6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port/port.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -689,22 +689,6 @@ proc wraplabel {label string maxlen {indent ""}} {
</span> return "$label[wrap $string $maxlen $indent 0]"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-proc unobscure_maintainers { list } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set result {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach m $list {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string first "@" $m] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string first ":" $m] >= 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set m [regsub -- "(.*):(.*)" $m "\\2@\\1"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set m "$m@macports.org"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend result $m
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return $result
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> ##########################################
# Port selection
##########################################
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2025,19 +2009,19 @@ proc action_info { action portlist opts } {
</span> # Understand which info items are actually lists
# (this could be overloaded to provide a generic formatting code to
# allow us to, say, split off the prefix on libs)
<span style='display:block; white-space:pre;background:#ffe0e0;'>- array set list_map "
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- categories 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_fetch 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_extract 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_run 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- maintainers 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- platforms 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- variants 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- conflicts 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- subports 1
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set list_map {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ categories ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_fetch ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_extract ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ maintainers "\n"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ platforms ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ variants ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ conflicts ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ subports ", "
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span>
# Label map for pretty printing
array set pretty_label {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2172,7 +2156,7 @@ proc action_info { action portlist opts } {
</span> if {![info exists portinfo($ropt)]} {
set inf ""
} else {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set inf [join $portinfo($ropt)]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set inf $portinfo($ropt)
</span> }
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2187,10 +2171,41 @@ proc action_info { action portlist opts } {
</span> } elseif {$show_label} {
set label "$opt: "
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$ropt in {"description" "long_description"}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # These fields support newlines, we need to [join ...] to make
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # them newlines
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set inf [join $inf]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # Format the data
if { $ropt eq "maintainers" } {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set inf [unobscure_maintainers $inf]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set infresult {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach serialized [macports::unobscure_maintainers $inf] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set parts {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array set maintainer $serialized
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists maintainer(email)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend parts "Email: $maintainer(email)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists maintainer(github)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend parts "GitHub: $maintainer(github)"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[info exists maintainer(keyword)]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ switch $maintainer(keyword) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ nomaintainer {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend parts "none"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ openmaintainer {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend parts "Policy: openmaintainer"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ array unset maintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lappend infresult [join $parts ", "]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set inf $infresult
</span> }
# ... special formatting for certain fields when prettyprinting
if {$pretty_print} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -2234,7 +2249,7 @@ proc action_info { action portlist opts } {
</span> }
#End of special pretty-print formatting for certain fields
if {[info exists list_map($ropt)]} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set field [join $inf $subfield_sep]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set field [join $inf $list_map($ropt)]
</span> } else {
set field $inf
}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/portutil.tcl b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index b16f0db..f5e43ce 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/portutil.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1313,32 +1313,6 @@ proc lipo {} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# unobscure maintainer addresses as used in Portfiles
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# We allow two obscured forms:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# (1) User name only with no domain:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# foo implies foo@macports.org
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# (2) Mangled name:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# subdomain.tld:username implies username@subdomain.tld
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-proc unobscure_maintainers { list } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set result {}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- foreach m $list {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string first "@" $m] < 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string first ":" $m] >= 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set m [regsub -- "(.*):(.*)" $m "\\2@\\1"]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set m "$m@macports.org"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- lappend result $m
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return $result
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> ########### Internal Dependency Manipulation Procedures ###########
global ports_dry_last_skipped
set ports_dry_last_skipped ""
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/port1.0/tests/portutil.test b/src/port1.0/tests/portutil.test
</span><span style='display:block; white-space:pre;color:#808080;'>index 56fc6b0..50e4611 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/port1.0/tests/portutil.test
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/port1.0/tests/portutil.test
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -470,26 +470,6 @@ test makeuserproc {
</span> # test lipo -
<span style='display:block; white-space:pre;background:#ffe0e0;'>-test unobscure_maintainers {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- Unobscure maintainers unit test.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} -body {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set list { port }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [unobscure_maintainers $list] != "port@macports.org" } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return "FAIL: invalid maintainer name"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set list { google.com:port }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [unobscure_maintainers $list] != "port@google.com" } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return "FAIL: invalid maintainer name"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set list { port@google.com }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if { [unobscure_maintainers $list] != "port@google.com" } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return "FAIL: invalid maintainer name"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return "unobscure_maintainers successful."
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} -result "unobscure_maintainers successful."
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # test target_run
# test recursive_collect_deps
</pre><pre style='margin:0'>
</pre>