[138480] branches/gsoc15-pallet
ksammons at macports.org
ksammons at macports.org
Thu Jul 9 12:12:04 PDT 2015
Revision: 138480
https://trac.macports.org/changeset/138480
Author: ksammons at macports.org
Date: 2015-07-09 12:12:04 -0700 (Thu, 09 Jul 2015)
Log Message:
-----------
Added basic diagnose functionality.
Modified Paths:
--------------
branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.h
branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.m
branches/gsoc15-pallet/MacPorts_Framework/interpInit.tcl
branches/gsoc15-pallet/Pallet/MPActionLauncher.h
branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.xcworkspace/xcuserdata/mrappleseed.xcuserdatad/UserInterfaceState.xcuserstate
Modified: branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.h
===================================================================
--- branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.h 2015-07-09 18:53:06 UTC (rev 138479)
+++ branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.h 2015-07-09 19:12:04 UTC (rev 138480)
@@ -90,6 +90,11 @@
- (BOOL) setPortOptions:(NSArray *)options;
/*!
+ @brief Runs the diagnose command.
+ */
+- (id)diagnose:(NSError**)sError;
+
+/*!
@brief Synchronizes the ports tree without checking for upgrades to the MacPorts base.
*/
- (id)sync:(NSError **)sError;
Modified: branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.m
===================================================================
--- branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.m 2015-07-09 18:53:06 UTC (rev 138479)
+++ branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.m 2015-07-09 19:12:04 UTC (rev 138480)
@@ -131,8 +131,32 @@
#pragma MacPorts API
+- (id)diagnose:(NSError**)sError
+{
+ NSString * result = nil;
+
+ [[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPorts_diagnose_Started" object:nil];
+ [[MPNotifications sharedListener] setPerformingTclCommand:@"sync"];
+
+ //FIXME
+ /*
+ if ([self authorizationMode])
+ {
+ result = [interpreter evaluateStringWithMPHelperTool:@"mportdiagnose" error:sError];
+ }
+ else
+ {
+ result = [interpreter evaluateStringWithPossiblePrivileges:@"mportdiagnose" error:sError];
+ }*/
+
+ result = [interpreter evaluateStringAsString:@"diagnose::main \"--quiet\"" error:sError];
+
+ [[MPNotifications sharedListener] setPerformingTclCommand:@""];
+ [[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPorts_diagnose_Finished" object:nil];
+
+ return result;
+}
-
- (id)sync:(NSError**)sError {
NSString * result = nil;
Modified: branches/gsoc15-pallet/MacPorts_Framework/interpInit.tcl
===================================================================
--- branches/gsoc15-pallet/MacPorts_Framework/interpInit.tcl 2015-07-09 18:53:06 UTC (rev 138479)
+++ branches/gsoc15-pallet/MacPorts_Framework/interpInit.tcl 2015-07-09 19:12:04 UTC (rev 138480)
@@ -39,7 +39,6 @@
#in macports.tcl. Note optionslist is not being used for now
set mp_empty_list [list]
proc mportuninstall {portname {version ""} {revision ""} {variants 0} {optionslist ""} } {
- puts "HERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"
if {[catch {registry_uninstall::uninstall $portname $version $revision $variants [array get options]} result]} {
global errorInfo
@@ -49,9 +48,6 @@
}
}
proc mportuninstall_composite {portname {v ""} {optionslist ""} } {
- puts "HETTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT"
- exit
-
if {[catch {registry_uninstall::uninstall_composite $portname $v [array get options]} result]} {
global errorInfo
@@ -114,8 +110,6 @@
# This must be done following parse of global options, as some options are
# evaluated by dportinit.
-puts "I eat puppies for dinner."
-
if {[catch {mportinit ui_options global_options global_variations} result]} {
global errorInfo
puts "$errorInfo"
Modified: branches/gsoc15-pallet/Pallet/MPActionLauncher.h
===================================================================
--- branches/gsoc15-pallet/Pallet/MPActionLauncher.h 2015-07-09 18:53:06 UTC (rev 138479)
+++ branches/gsoc15-pallet/Pallet/MPActionLauncher.h 2015-07-09 19:12:04 UTC (rev 138480)
@@ -80,6 +80,11 @@
- (void)upgradePort:(MPPort *)port;
/*!
+ @brief Runs the diagnose command.
+ */
+- (void)diagnose;
+
+/*!
@brief Syncs the MacPorts installation in another thread
*/
- (void)sync;
Modified: branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.xcworkspace/xcuserdata/mrappleseed.xcuserdatad/UserInterfaceState.xcuserstate
===================================================================
(Binary files differ)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150709/f5353f32/attachment.html>
More information about the macports-changes
mailing list