Changeset 138480


Ignore:
Timestamp:
Jul 9, 2015, 7:12:04 PM (5 years ago)
Author:
ksammons@…
Message:

Added basic diagnose functionality.

Location:
branches/gsoc15-pallet
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.h

    r72806 r138480  
    9191
    9292/*!
     93 @brief Runs the diagnose command.
     94 */
     95- (id)diagnose:(NSError**)sError;
     96
     97/*!
    9398 @brief Synchronizes the ports tree without checking for upgrades to the MacPorts base.
    9499 */
  • branches/gsoc15-pallet/MacPorts_Framework/MPMacPorts.m

    r138196 r138480  
    132132#pragma MacPorts API
    133133
    134 
     134- (id)diagnose:(NSError**)sError
     135{
     136    NSString * result = nil;
     137   
     138    [[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPorts_diagnose_Started" object:nil];
     139    [[MPNotifications sharedListener] setPerformingTclCommand:@"sync"];
     140   
     141    //FIXME
     142    /*
     143    if ([self authorizationMode])
     144    {
     145        result = [interpreter evaluateStringWithMPHelperTool:@"mportdiagnose" error:sError];
     146    }
     147    else
     148    {
     149        result = [interpreter evaluateStringWithPossiblePrivileges:@"mportdiagnose" error:sError];
     150    }*/
     151   
     152    result = [interpreter evaluateStringAsString:@"diagnose::main \"--quiet\"" error:sError];
     153   
     154    [[MPNotifications sharedListener] setPerformingTclCommand:@""];
     155    [[NSDistributedNotificationCenter defaultCenter] postNotificationName:@"MacPorts_diagnose_Finished" object:nil];
     156   
     157    return result;
     158}
    135159
    136160- (id)sync:(NSError**)sError {
  • branches/gsoc15-pallet/MacPorts_Framework/interpInit.tcl

    r138196 r138480  
    4040set mp_empty_list [list]
    4141proc mportuninstall {portname {version ""} {revision ""} {variants 0} {optionslist ""} } {
    42     puts "HERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR"
    4342        if {[catch {registry_uninstall::uninstall $portname $version $revision $variants [array get options]} result]} {
    4443               
     
    5049}
    5150proc mportuninstall_composite {portname {v ""} {optionslist ""} } {
    52     puts "HETTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT"
    53     exit
    54 
    5551        if {[catch {registry_uninstall::uninstall_composite $portname $v [array get options]} result]} {
    5652               
     
    115111# evaluated by dportinit.
    116112
    117 puts "I eat puppies for dinner."
    118 
    119113if {[catch {mportinit ui_options global_options global_variations} result]} {
    120114        global errorInfo
  • branches/gsoc15-pallet/Pallet/MPActionLauncher.h

    r138196 r138480  
    8181
    8282/*!
     83 @brief Runs the diagnose command.
     84 */
     85- (void)diagnose;
     86
     87/*!
    8388 @brief Syncs the MacPorts installation in another thread
    8489 */
Note: See TracChangeset for help on using the changeset viewer.