[40216] contrib/MacPorts_Framework

armahg at macports.org armahg at macports.org
Thu Sep 25 20:02:31 PDT 2008


Revision: 40216
          http://trac.macports.org/changeset/40216
Author:   armahg at macports.org
Date:     2008-09-25 20:02:30 -0700 (Thu, 25 Sep 2008)
Log Message:
-----------
Updtated ToDo.txt with list of things that needed to be done. Added macros for MacPorts options (one letter flags like -dvc etc.) to MPInterpreter.h file

Modified Paths:
--------------
    contrib/MacPorts_Framework/MPInterpreter.h
    contrib/MacPorts_Framework/MPInterpreter.m
    contrib/MacPorts_Framework/MPPort.m
    contrib/MacPorts_Framework/ToDo.txt

Modified: contrib/MacPorts_Framework/MPInterpreter.h
===================================================================
--- contrib/MacPorts_Framework/MPInterpreter.h	2008-09-26 02:25:49 UTC (rev 40215)
+++ contrib/MacPorts_Framework/MPInterpreter.h	2008-09-26 03:02:30 UTC (rev 40216)
@@ -69,7 +69,25 @@
 #define MPHELPUSERCANCELLED 1 /*User cancelled privileged operation.*/
 
 
+#pragma mark MacPort Options
+#define MPVERBOSE				@"ports_verbose"
+#define MPDEBUGOPTION			@"ports_debug"
+#define MPQUIET					@"ports_quiet"
+#define MPPROCESSALL			@"ports_processall"
+#define MPEXIT					@"ports_exit"
+#define MPFORCE					@"ports_force"
+#define MPIGNOREOLDER			@"ports_ignore_older"
+#define MPNODEPS				@"ports_nodeps"
+#define MPDODEPS				@"ports_do_dependents"
+#define MPSOURCEONLY			@"ports_source_only"
+#define MPBINARYONLY			@"ports_binary_only"
+#define MPAUTOCLEAN				@"ports_autoclean"
+#define MPTRACE					@"ports_trace"
 
+
+
+
+
 /*!
  @class MPInterpreter
  @abstract Tcl interpreter object

Modified: contrib/MacPorts_Framework/MPInterpreter.m
===================================================================
--- contrib/MacPorts_Framework/MPInterpreter.m	2008-09-26 02:25:49 UTC (rev 40215)
+++ contrib/MacPorts_Framework/MPInterpreter.m	2008-09-26 03:02:30 UTC (rev 40216)
@@ -278,7 +278,7 @@
 			[array addObject:[NSString stringWithUTF8String:tclElements[i]]];
 		}
 	} else {
-		array = [[NSMutableArray alloc] init];
+		array = [[[NSMutableArray alloc] init] autorelease];
 	}
 	Tcl_Free((char *)tclElements);
 	return [NSArray arrayWithArray:array];
@@ -294,7 +294,9 @@
 	int i;
 	array = [self arrayFromTclListAsString:list];
 	dictionary = [[NSMutableDictionary alloc] initWithCapacity:[array count]];
-	for (i = 0; i < [array count]; i += 2) {
+	unsigned int array_count = [array count];
+	
+	for (i = 0; i < array_count; i += 2) {
 		[dictionary setObject:[array objectAtIndex:(i + 1)] forKey:[array objectAtIndex:i]];
 	}
 	return dictionary;

Modified: contrib/MacPorts_Framework/MPPort.m
===================================================================
--- contrib/MacPorts_Framework/MPPort.m	2008-09-26 02:25:49 UTC (rev 40215)
+++ contrib/MacPorts_Framework/MPPort.m	2008-09-26 03:02:30 UTC (rev 40216)
@@ -304,15 +304,31 @@
 #pragma mark -
 # pragma mark Exec methods 
 - (void)uninstallWithVersion:(NSString *)version error:(NSError **)mError {
-	[self execPortProc:@"mportuninstall" withOptions:nil version:version error:mError];
+	if (version == nil) {
+		[self execPortProc:@"mportuninstall" withOptions:nil version:@"" error:mError];
+	}
+	else {
+		[self execPortProc:@"mportuninstall" withOptions:nil version:version error:mError];
+	}
 }
 
 - (void)activateWithVersion:(NSString *)version error:(NSError **)mError {
-	[self execPortProc:@"mportactivate" withOptions:nil version:version error:mError];
+	if (version == nil) {
+		[self execPortProc:@"mportactivate" withOptions:nil version:@"" error:mError];
+	}
+	else {
+		[self execPortProc:@"mportactivate" withOptions:nil version:version error:mError];
+	}
+		
 }
 
 - (void)deactivateWithVersion:(NSString *)version error:(NSError **)mError {
-	[self execPortProc:@"mportdeactivate" withOptions:nil version:version error:mError];
+	if (version == nil) {
+		[self execPortProc:@"mportdeactivate" withOptions:nil version:@"" error:mError];
+	}
+	else {
+		[self execPortProc:@"mportdeactivate" withOptions:nil version:version error:mError];
+	}
 }
 
 -(void)configureWithOptions:(NSArray *)options variants:(NSArray *)variants error:(NSError **)mError {

Modified: contrib/MacPorts_Framework/ToDo.txt
===================================================================
--- contrib/MacPorts_Framework/ToDo.txt	2008-09-26 02:25:49 UTC (rev 40215)
+++ contrib/MacPorts_Framework/ToDo.txt	2008-09-26 03:02:30 UTC (rev 40216)
@@ -1,31 +1,17 @@
 TO DO LIST (because there seems to be too much to get done haha)
 
-Guide like documentation
+-	Add Port option #define macros to MPInterpreter
 
-Scrub Code
+-	Modify MPInterpreter so that its init process is modularized into sub routines.
+	The main goal of this modification is to allow implementation of the method below.
+	MPInterpreter will be able to conveniently create and delete its internal Tcl_interp object
+	
+-	Modify MPMacPorts to have a setOptions:(NSArray *) method of various port options
 
-Ask Randall to look at perform exec methods
+-	Move Authorizations functionality into a new MPAuthorization(s) class
 
-Implement IPC Notifications mechanism between the Helper Tool and Framework
+-	Modify MPNotifications to allow for possible hooks for Bindings
 
-Modify evaluateStringAsString to try evaluating, try evaluating with privileges
-if there is an error, then return if there is still an error for the special
-privileged methods: sync, selfupdate, exec methods etc.
+-	Do an alternate GC compatible build?
 
-
-Reimplement notifications so that, as Randall said, all threads should receive
-all notifications that they have registered for
-
-... in coming ... rant ...
-I am thinking of another scheme instead of notifications ... I don't think
-Objective-C has high order functions ... but something cool would be for
-us to just call some user defined method when a $ui_priority 
-call is made. So if say they wanted to update a progress bar during
--sync, we would just be calling whatever method they had to update the GUI.
-
-I should read up some on Threading cause that might make things dicey ...
-
-Also, we could throw in bindings support. How would this work? Don't know
-yet ...
-
-Fix bug in uninstall
+-	Move major port functionality from MPPort to MPMacPorts?
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080925/a5d7d590/attachment.html 


More information about the macports-changes mailing list