[152647] contrib/mp-buildbot

ryandesign at macports.org ryandesign at macports.org
Wed Sep 14 05:09:07 PDT 2016


Revision: 152647
          https://trac.macports.org/changeset/152647
Author:   ryandesign at macports.org
Date:     2016-09-14 05:09:06 -0700 (Wed, 14 Sep 2016)
Log Message:
-----------
mp-buildbot: rename canonical_variants.tcl

Rename canonical_variants.tcl to canonical-variants.tcl to match the other
filenames.

Modified Paths:
--------------
    contrib/mp-buildbot/functions

Added Paths:
-----------
    contrib/mp-buildbot/tools/canonical-variants.tcl

Removed Paths:
-------------
    contrib/mp-buildbot/tools/canonical_variants.tcl

Modified: contrib/mp-buildbot/functions
===================================================================
--- contrib/mp-buildbot/functions	2016-09-14 12:05:29 UTC (rev 152646)
+++ contrib/mp-buildbot/functions	2016-09-14 12:09:06 UTC (rev 152647)
@@ -139,9 +139,9 @@
     fi
 
     local canonical_variants
-    canonical_variants=$("${option_prefix}/bin/port-tclsh" "${thisdir}/tools/canonical_variants.tcl" "$@")
+    canonical_variants=$("${option_prefix}/bin/port-tclsh" "${thisdir}/tools/canonical-variants.tcl" "$@")
     if [ $? -ne 0 ]; then
-        err "tools/canonical_variants.tcl" "$@" "failed"
+        err "tools/canonical-variants.tcl" "$@" "failed"
         return 4
     fi
 

Copied: contrib/mp-buildbot/tools/canonical-variants.tcl (from rev 152646, contrib/mp-buildbot/tools/canonical_variants.tcl)
===================================================================
--- contrib/mp-buildbot/tools/canonical-variants.tcl	                        (rev 0)
+++ contrib/mp-buildbot/tools/canonical-variants.tcl	2016-09-14 12:09:06 UTC (rev 152647)
@@ -0,0 +1,98 @@
+#!/usr/bin/env port-tclsh
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+#
+# Writes the canonical list of variants as it appears in binary archive names
+# to stdout.
+#
+# Copyright (c) 2016 The MacPorts Project.
+# Copyright (c) 2016 Clemens Lang <cal at macports.org>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in
+#    the documentation and/or other materials provided with the
+#    distribution.
+# 3. Neither the name of the MacPorts project, nor the names of any contributors
+#    may be used to endorse or promote products derived from this software
+#    without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package require macports
+
+if {[llength $::argv] == 0} {
+    puts stderr "Usage: $argv0 <portname> \[(+|-)variant...\]"
+    exit 1
+}
+
+# initialize macports
+if {[catch {mportinit "" "" ""} result]} {
+   ui_error "$errorInfo"
+   ui_error "Failed to initialize ports sytem: $result"
+   exit 1
+}
+
+# look up the path of the Portfile for the given port
+set portname [lindex $::argv 0]
+#try -pass_signal {...}
+try {
+    set result [mportlookup $portname]
+    if {[llength $result] < 2} {
+        ui_error "No such port: $portname"
+        exit 1
+    }
+} catch {{*} eCode eMessage} {
+    ui_error "mportlookup $portname failed: $eMessage"
+    exit 1
+}
+
+# parse the given variants from the command line
+array set variants {}
+foreach item [lrange $::argv 1 end] {
+    foreach {_ sign variant} [regexp -all -inline -- {([-+])([[:alpha:]_]+[\w\.]*)} $item] {
+        set variants($variant) $sign
+    }
+}
+
+# open the port to get its active variants
+array set portinfo [lindex $result 1]
+#try -pass_signal {...}
+try {
+    set mport [mportopen $portinfo(porturl) [list subport $portname] [array get variants]]
+} catch {{*} eCode eMessage} {
+    ui_error "mportopen ${portinfo(porturl)} failed: $eMessage"
+    exit 1
+}
+
+array set info [mportinfo $mport]
+puts $info(canonical_active_variants)
+
+#try -pass_signal {...}
+try {
+    mportclose $mport
+} catch {{*} eCode eMessage} {
+    ui_warn "mportclose $portname failed: $eMessage"
+}
+
+# shut down MacPorts
+#try -pass_signal {...}
+try {
+    mportshutdown
+} catch {{*} eCode eMessage} {
+    ui_error "mportshutdown failed: $eMessage"
+    exit 1
+}

Deleted: contrib/mp-buildbot/tools/canonical_variants.tcl
===================================================================
--- contrib/mp-buildbot/tools/canonical_variants.tcl	2016-09-14 12:05:29 UTC (rev 152646)
+++ contrib/mp-buildbot/tools/canonical_variants.tcl	2016-09-14 12:09:06 UTC (rev 152647)
@@ -1,98 +0,0 @@
-#!/usr/bin/env port-tclsh
-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
-#
-# Writes the canonical list of variants as it appears in binary archive names
-# to stdout.
-#
-# Copyright (c) 2016 The MacPorts Project.
-# Copyright (c) 2016 Clemens Lang <cal at macports.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in
-#    the documentation and/or other materials provided with the
-#    distribution.
-# 3. Neither the name of the MacPorts project, nor the names of any contributors
-#    may be used to endorse or promote products derived from this software
-#    without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
-# AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
-# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package require macports
-
-if {[llength $::argv] == 0} {
-    puts stderr "Usage: $argv0 <portname> \[(+|-)variant...\]"
-    exit 1
-}
-
-# initialize macports
-if {[catch {mportinit "" "" ""} result]} {
-   ui_error "$errorInfo"
-   ui_error "Failed to initialize ports sytem: $result"
-   exit 1
-}
-
-# look up the path of the Portfile for the given port
-set portname [lindex $::argv 0]
-#try -pass_signal {...}
-try {
-    set result [mportlookup $portname]
-    if {[llength $result] < 2} {
-        ui_error "No such port: $portname"
-        exit 1
-    }
-} catch {{*} eCode eMessage} {
-    ui_error "mportlookup $portname failed: $eMessage"
-    exit 1
-}
-
-# parse the given variants from the command line
-array set variants {}
-foreach item [lrange $::argv 1 end] {
-    foreach {_ sign variant} [regexp -all -inline -- {([-+])([[:alpha:]_]+[\w\.]*)} $item] {
-        set variants($variant) $sign
-    }
-}
-
-# open the port to get its active variants
-array set portinfo [lindex $result 1]
-#try -pass_signal {...}
-try {
-    set mport [mportopen $portinfo(porturl) [list subport $portname] [array get variants]]
-} catch {{*} eCode eMessage} {
-    ui_error "mportopen ${portinfo(porturl)} failed: $eMessage"
-    exit 1
-}
-
-array set info [mportinfo $mport]
-puts $info(canonical_active_variants)
-
-#try -pass_signal {...}
-try {
-    mportclose $mport
-} catch {{*} eCode eMessage} {
-    ui_warn "mportclose $portname failed: $eMessage"
-}
-
-# shut down MacPorts
-#try -pass_signal {...}
-try {
-    mportshutdown
-} catch {{*} eCode eMessage} {
-    ui_error "mportshutdown failed: $eMessage"
-    exit 1
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160914/48507723/attachment-0001.html>


More information about the macports-changes mailing list