[69979] branches/gsoc10-gui/MacPorts_Framework/MPPort.m

tzikis at macports.org tzikis at macports.org
Sat Jul 24 17:28:27 PDT 2010


Revision: 69979
          http://trac.macports.org/changeset/69979
Author:   tzikis at macports.org
Date:     2010-07-24 17:28:26 -0700 (Sat, 24 Jul 2010)
Log Message:
-----------
Removed the default_variants code, since it is very slow and makes the program load for ~10 minutes.

Modified Paths:
--------------
    branches/gsoc10-gui/MacPorts_Framework/MPPort.m

Modified: branches/gsoc10-gui/MacPorts_Framework/MPPort.m
===================================================================
--- branches/gsoc10-gui/MacPorts_Framework/MPPort.m	2010-07-25 00:27:16 UTC (rev 69978)
+++ branches/gsoc10-gui/MacPorts_Framework/MPPort.m	2010-07-25 00:28:26 UTC (rev 69979)
@@ -131,27 +131,7 @@
 		[self setObject:[interpreter arrayFromTclListAsString:[self objectForKey:@"default_variants"]] forKey:@"default_variants"];
 	}
 	 
-	NSMutableArray *default_variants= [NSMutableArray arrayWithCapacity:10];
-	char port_command[256];
-	strcpy(port_command, "port variants ");
-	strcat(port_command, [[self objectForKey:@"name"] cStringUsingEncoding: NSASCIIStringEncoding]);
-	strcat(port_command, " | grep \"\\[+]\" | sed 's/.*\\]//; s/:.*//' >> mpfw_default_variants");
 	
-	system(port_command);
-	FILE * file = fopen("mpfw_default_variants", "r");
-	char buffer[256];
-	while(!feof(file))
-	{
-		char * temp = fgets(buffer,256,file);
-		if(temp == NULL) continue;
-		buffer[strlen(buffer)-1]='\0';
-		//printf("default variants: %s\n", buffer);
-		[default_variants addObject:[NSString stringWithCString:buffer]];
-    }
-	[self setObject:default_variants forKey: @"default_variants"];
-	fclose(file);
-	//unlink("mpfw_default_variants");
-	
 	@try {
 		if ([[self valueForKey:@"description"] characterAtIndex:0] == '{') {
 			[self setValue:[self valueForKey:@"description"] forKey:@"description"];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100724/0afa8198/attachment.html>


More information about the macports-changes mailing list