[26392] trunk/base/src/macports1.0/macports.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jun 20 16:10:13 PDT 2007
Revision: 26392
http://trac.macosforge.org/projects/macports/changeset/26392
Author: jmpp at macports.org
Date: 2007-06-20 16:10:13 -0700 (Wed, 20 Jun 2007)
Log Message:
-----------
Adding backwards compatibility glue for clients of the public (darwin|mac)ports API that use now deprecated procs naming (DarwinPorts namespace),
per Eridius' suggestion. All dportinit/dportsearch/dportinfo/dportopen/dportexec/dportclose/dportsync do is warn API clients that they are deprecated
and then call their new equivalents with the appropriate args.
Do warn me if I should be adding glue for other procs/functions.
Modified Paths:
--------------
trunk/base/src/macports1.0/macports.tcl
Modified: trunk/base/src/macports1.0/macports.tcl
===================================================================
--- trunk/base/src/macports1.0/macports.tcl 2007-06-20 23:06:25 UTC (rev 26391)
+++ trunk/base/src/macports1.0/macports.tcl 2007-06-20 23:10:13 UTC (rev 26392)
@@ -237,6 +237,13 @@
}
}
+# dportinit
+# Deprecated version of the new mportinit proc, listed here as backwards
+# compatibility glue for API clients that haven't updated to the new naming
+proc dportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
+ ui_warn "The dportinit proc is deprecated and will be going away soon, please use mportinit in the future"
+ mportinit $up_ui_options $up_options $up_variations
+}
proc mportinit {{up_ui_options {}} {up_options {}} {up_variations {}}} {
if {$up_ui_options eq ""} {
@@ -792,6 +799,14 @@
}
}
+# dportopen
+# Deprecated version of the new mportopen proc, listed here as backwards
+# compatibility glue for API clients that haven't updated to the new naming
+proc dportopen {porturl {options ""} {variations ""} {nocache ""}} {
+ ui_warn "The dportopen proc is deprecated and will be going away soon, please use mportopen in the future"
+ mportopen $porturl $options $variations $nocache
+}
+
# mportopen
# Opens a MacPorts portfile specified by a URL. The Portfile is
# opened with the given list of options and variations. The result
@@ -1091,9 +1106,16 @@
}
}
+# dportexec
+# Deprecated version of the new mportexec proc, listed here as backwards
+# compatibility glue for API clients that haven't updated to the new naming
+proc dportexec {mport target} {
+ ui_warn "The dportexec proc is deprecated and will be going away soon, please use mportexec in the future"
+ mportexec $mport $target
+}
+
# mportexec
# Execute the specified target of the given mport.
-
proc mportexec {mport target} {
global macports::registry.installtype
@@ -1208,6 +1230,14 @@
return [file join [macports::getsourcepath $source] PortIndex]
}
+# dportsync
+# Deprecated version of the new mportsync proc, listed here as backwards
+# compatibility glue for API clients that haven't updated to the new naming
+proc dportsync {} {
+ ui_warn "The dportsync proc is deprecated and will be going away soon, please use mportsync in the future"
+ mportsync
+}
+
proc mportsync {} {
global macports::sources macports::portdbpath macports::rsync_options tcl_platform
global macports::autoconf::rsync_path
@@ -1278,6 +1308,14 @@
}
}
+# dportsearch
+# Deprecated version of the new mportsearch proc, listed here as backwards
+# compatibility glue for API clients that haven't updated to the new naming
+proc dportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}} {
+ ui_warn "The dportsearch proc is deprecated and will be going away soon, please use mportsearch in the future"
+ mportsearch $pattern $case_sensitive $matchstyle $field
+}
+
proc mportsearch {pattern {case_sensitive yes} {matchstyle regexp} {field name}} {
global macports::portdbpath macports::sources
set matches [list]
@@ -1362,11 +1400,27 @@
return $matches
}
+# dportinfo
+# Deprecated version of the new mportinfo proc, listed here as backwards
+# compatibility glue for API clients that haven't updated to the new naming
+proc dportinfo {mport} {
+ ui_warn "The dportinfo proc is deprecated and will be going away soon, please use mportinfo in the future"
+ mport info $mport
+}
+
proc mportinfo {mport} {
set workername [ditem_key $mport workername]
return [$workername eval array get PortInfo]
}
+# dportclose
+# Deprecated version of the new mportclose proc, listed here as backwards
+# compatibility glue for API clients that haven't updated to the new naming
+proc dportclose {mport} {
+ ui_warn "The dportclose proc is deprecated and will be going away soon, please use mportclose in the future"
+ mportclose $mport
+}
+
proc mportclose {mport} {
global macports::open_mports
set refcnt [ditem_key $mport refcnt]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070620/c3677213/attachment.html
More information about the macports-changes
mailing list