[70053] branches/gsoc10-gui/Pallet/MPActionsController.m

tzikis at macports.org tzikis at macports.org
Wed Jul 28 11:26:51 PDT 2010


Revision: 70053
          http://trac.macports.org/changeset/70053
Author:   tzikis at macports.org
Date:     2010-07-28 11:26:49 -0700 (Wed, 28 Jul 2010)
Log Message:
-----------
Fetching of conflicts now no longer copies data to the clipboard

Modified Paths:
--------------
    branches/gsoc10-gui/Pallet/MPActionsController.m

Modified: branches/gsoc10-gui/Pallet/MPActionsController.m
===================================================================
--- branches/gsoc10-gui/Pallet/MPActionsController.m	2010-07-28 18:12:50 UTC (rev 70052)
+++ branches/gsoc10-gui/Pallet/MPActionsController.m	2010-07-28 18:26:49 UTC (rev 70053)
@@ -307,18 +307,16 @@
 -(void)checkConflicts: (NSString *) portName
 {
 	
-	char *script= "pbpaste | python -c \"import re,sys;lines=sys.stdin.readlines();print '\\n'.join('%s,%s' % (re.sub(r'[\\W]','',lines[i-1].split()[0].rstrip(':')),','.join(l.strip().split()[3:])) for i, l in enumerate(lines) if l.strip().startswith('* conflicts'))\" >> mpfw_conflict";
-	//char *script="'''";
-	char command[256];
+	char *script= " | python -c \"import re,sys;lines=sys.stdin.readlines();print '\\n'.join('%s,%s' % (re.sub(r'[\\W]','',lines[i-1].split()[0].rstrip(':')),','.join(l.strip().split()[3:])) for i, l in enumerate(lines) if l.strip().startswith('* conflicts'))\" >> /tmp/mpfw_conflict";
+	char command[512];
 	strcpy(command,"port variants ");
 	strcat(command, [portName UTF8String]);
-	strcat(command, "| pbcopy");
-	printf("\n%s\n%s\n", command, script);
+	strcat(command, script);
+	printf("\n%s\n", command);
 	system(command);
-	system(script);
 	
 	//Open the output file
-	FILE * file = fopen("mpfw_conflict", "r");
+	FILE * file = fopen("/tmp/mpfw_conflict", "r");
 	
 	//Read all default_variants
 	char buffer[256];
@@ -359,7 +357,7 @@
 	}
 	//Close and delete
 	fclose(file);
-	unlink("mpfw_conflict");
+	unlink("/tmp/mpfw_conflict");
 
 	
 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100728/5305f9fe/attachment.html>


More information about the macports-changes mailing list