[25935] branches/dp2mp-move/base/src/port
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jun 6 18:18:34 PDT 2007
Revision: 25935
http://trac.macosforge.org/projects/macports/changeset/25935
Author: jmpp at macports.org
Date: 2007-06-06 18:18:33 -0700 (Wed, 06 Jun 2007)
Log Message:
-----------
Merge jberry's r25795: Add support for decoding of obscured maintainer addresses.
Modified Paths:
--------------
branches/dp2mp-move/base/src/port/port.tcl
branches/dp2mp-move/base/src/port1.0/portsubmit.tcl
branches/dp2mp-move/base/src/port1.0/portutil.tcl
Modified: branches/dp2mp-move/base/src/port/port.tcl
===================================================================
--- branches/dp2mp-move/base/src/port/port.tcl 2007-06-07 01:16:28 UTC (rev 25934)
+++ branches/dp2mp-move/base/src/port/port.tcl 2007-06-07 01:18:33 UTC (rev 25935)
@@ -432,6 +432,22 @@
}
+proc unobscure_maintainers { list } {
+ set result {}
+ foreach m $list {
+ if {[string first "@" $m] < 0} {
+ if {[string first ":" $m] >= 0} {
+ set m [regsub -- "(.*):(.*)" $m "\\2@\\1"]
+ } else {
+ set m "$m at macports.org"
+ }
+ }
+ lappend result $m
+ }
+ return $result
+}
+
+
##########################################
# Port selection
##########################################
@@ -1241,6 +1257,9 @@
# Format the data
set inf $portinfo($ropt)
+ if { $ropt eq "maintainers" } {
+ set inf [unobscure_maintainers $inf]
+ }
if [info exists list_map($ropt)] {
set field [join $inf $subfield_sep]
} else {
@@ -1294,7 +1313,9 @@
}
if {[info exists portinfo(platforms)]} { puts "Platforms: $portinfo(platforms)"}
- if {[info exists portinfo(maintainers)]} { puts "Maintainers: $portinfo(maintainers)"}
+ if {[info exists portinfo(maintainers)]} {
+ puts "Maintainers: [unobscure_maintainers $portinfo(maintainers)]"
+ }
}
}
Modified: branches/dp2mp-move/base/src/port1.0/portsubmit.tcl
===================================================================
--- branches/dp2mp-move/base/src/port1.0/portsubmit.tcl 2007-06-07 01:16:28 UTC (rev 25934)
+++ branches/dp2mp-move/base/src/port1.0/portsubmit.tcl 2007-06-07 01:18:33 UTC (rev 25935)
@@ -107,6 +107,9 @@
foreach var $vars {
if {![info exists $var]} { set $var {} }
}
+
+ # Unobscure the maintainer addresses
+ set maintainers [unobscure_maintainers $maintainers]
# Make sure our workpath is clean
file delete -force $dirpath $metapath $pkgpath
@@ -182,6 +185,9 @@
global mp_remote_submit_url portname portversion portverbose prefix UI_PREFIX workpath portpath
set submiturl $mp_remote_submit_url
+
+ # Make sure we have a work directory
+ file mkdir ${workpath}
# Create portpkg.xar in the work directory
set pkgpath [create_portpkg]
@@ -201,7 +207,8 @@
if {[tbool portverbose]} {
ui_msg "Submitting portpkg $pkgpath for $portname to $submiturl"
}
-
+
+ # Invoke curl to do the submit
ui_debug $cmd
if {[system $cmd] != ""} {
return -code error [format [msgcat::mc "Failure during submit of port %s"] $portname]
Modified: branches/dp2mp-move/base/src/port1.0/portutil.tcl
===================================================================
--- branches/dp2mp-move/base/src/port1.0/portutil.tcl 2007-06-07 01:16:28 UTC (rev 25934)
+++ branches/dp2mp-move/base/src/port1.0/portutil.tcl 2007-06-07 01:18:33 UTC (rev 25935)
@@ -1005,6 +1005,32 @@
}
}
+
+# unobscure maintainer addresses as used in Portfiles
+# We allow two obscured forms:
+# (1) User name only with no domain:
+# foo implies foo at macports.org
+# (2) Mangled name:
+# subdomain.tld:username implies username at subdomain.tld
+#
+proc unobscure_maintainers { list } {
+ set result {}
+ foreach m $list {
+ if {[string first "@" $m] < 0} {
+ if {[string first ":" $m] >= 0} {
+ set m [regsub -- "(.*):(.*)" $m "\\2@\\1"]
+ } else {
+ set m "$m at macports.org"
+ }
+ }
+ lappend result $m
+ }
+ return $result
+}
+
+
+
+
########### Internal Dependency Manipulation Procedures ###########
proc target_run {ditem} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070606/c4c350d8/attachment.html
More information about the macports-changes
mailing list