mirror of
https://github.com/macports/pallet.git
synced 2026-07-12 18:18:47 -07:00
Added basic diagnose functionality.
git-svn-id: https://svn.macports.org/repository/macports/branches/gsoc15-pallet@138480 d073be05-634f-4543-b044-5fe20cf6d1d6
This commit is contained in:
@@ -89,6 +89,11 @@
|
||||
- (id) initWithPkgPath:(NSString *)path portOptions:(NSArray *)options;
|
||||
- (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.
|
||||
*/
|
||||
|
||||
@@ -131,7 +131,31 @@
|
||||
|
||||
#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;
|
||||
|
||||
@@ -39,7 +39,6 @@ proc ui_init {priority prefix channels message} {
|
||||
#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 {portname {version ""} {revision ""} {variants 0} {optionsli
|
||||
}
|
||||
}
|
||||
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 @@ proc mportupgrade {portname} {
|
||||
# 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"
|
||||
|
||||
@@ -79,6 +79,11 @@
|
||||
*/
|
||||
- (void)upgradePort:(MPPort *)port;
|
||||
|
||||
/*!
|
||||
@brief Runs the diagnose command.
|
||||
*/
|
||||
- (void)diagnose;
|
||||
|
||||
/*!
|
||||
@brief Syncs the MacPorts installation in another thread
|
||||
*/
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user