[134513] branches/release_2_3/base
cal at macports.org
cal at macports.org
Fri Mar 27 14:27:54 PDT 2015
Revision: 134513
https://trac.macports.org/changeset/134513
Author: cal at macports.org
Date: 2015-03-27 14:27:54 -0700 (Fri, 27 Mar 2015)
Log Message:
-----------
merge r134511 from trunk:
base: provide macports::version as pure Tcl, and macports_version in Portfile ctxt
This allows us to distingish a potential 2.3.4 from 2.3.3.
Revision Links:
--------------
https://trac.macports.org/changeset/134511
Modified Paths:
--------------
branches/release_2_3/base/src/macports1.0/macports.c
branches/release_2_3/base/src/macports1.0/macports.tcl
Property Changed:
----------------
branches/release_2_3/base/
Property changes on: branches/release_2_3/base
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
+ /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118085,118161,118559,118562-118569,118598-118599,118602-118603,118606-118607,118640,118735,119034,119169,119171,119175,119204,119297,119987,119992,120036,120038,120059-120060,120064,120067-120069,120074,120076,120127,120132,120142,120345,120382,120637,121311,121364,121451,121485,123652,124145-124146,124150,124216,125578,125621,125859,126475,126866,126868,126895,126900,128113,128274,128276,128422,134501-134502,134511
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
Modified: branches/release_2_3/base/src/macports1.0/macports.c
===================================================================
--- branches/release_2_3/base/src/macports1.0/macports.c 2015-03-27 21:17:28 UTC (rev 134512)
+++ branches/release_2_3/base/src/macports1.0/macports.c 2015-03-27 21:27:54 UTC (rev 134513)
@@ -40,23 +40,11 @@
#include "get_systemconfiguration_proxies.h"
#include "sysctl.h"
-static int
-macports__version(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Obj * CONST objv[])
-{
- if (objc != 1) {
- Tcl_WrongNumArgs(interp, 1, objv, NULL);
- return TCL_ERROR;
- }
- Tcl_SetObjResult(interp, Tcl_GetVar2Ex(interp, "macports::autoconf::macports_version", NULL, 0));
- return TCL_OK;
-}
-
int
Macports_Init(Tcl_Interp *interp)
{
if (Tcl_InitStubs(interp, "8.4", 0) == NULL)
return TCL_ERROR;
- Tcl_CreateObjCommand(interp, "macports::version", macports__version, NULL, NULL);
Tcl_CreateObjCommand(interp, "get_systemconfiguration_proxies", GetSystemConfigurationProxiesCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "sysctl", SysctlCmd, NULL, NULL);
if (Tcl_PkgProvide(interp, "macports", "1.0") != TCL_OK)
Modified: branches/release_2_3/base/src/macports1.0/macports.tcl
===================================================================
--- branches/release_2_3/base/src/macports1.0/macports.tcl 2015-03-27 21:17:28 UTC (rev 134512)
+++ branches/release_2_3/base/src/macports1.0/macports.tcl 2015-03-27 21:27:54 UTC (rev 134513)
@@ -77,6 +77,19 @@
variable ui_prefix "---> "
}
+##
+# Return the version of MacPorts you are running
+#
+# This proc never fails and always returns the current version in the format
+# major.minor.patch. Note that the value of patch will not be meaningful for
+# trunk releases, but we guarantee that it will compare to be greater than any
+# released versions from the same major.minor.x series. You should use the
+# MacPorts-provided Tcl extension "vercmp" to do version number comparisons on
+# the return value of this function.
+proc macports::version {} {
+ return ${macports::autoconf::macports_version}
+}
+
# Provided UI instantiations
# For standard messages, the following priorities are defined
# debug, info, msg, warn, error
@@ -1278,6 +1291,7 @@
$workername alias ui_warn_once ui_warn_once
# Export some utility functions defined here.
+ $workername alias macports_version macports::version
$workername alias macports_create_thread macports::create_thread
$workername alias getportworkpath_from_buildpath macports::getportworkpath_from_buildpath
$workername alias getportresourcepath macports::getportresourcepath
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150327/f21a50bd/attachment.html>
More information about the macports-changes
mailing list