New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 79172


Ignore:
Timestamp:
06/03/11 22:49:29 (4 years ago)
Author:
jmr@…
Message:

MacPorts_Framework: adapt to registry changes

Location:
contrib/MacPorts_Framework
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • contrib/MacPorts_Framework/MPPort.m

    r72222 r79172  
    356356 
    357357 
     358/* XXX  uninstallWithVersion, activateWithVersion, deactivateWithVersion all need 
     359   to accept separate version,revision,variants args rather than a (possibly ambiguous) 
     360   composite version spec */ 
     361 
    358362#pragma mark - 
    359 # pragma mark Exec methods  
     363# pragma mark Exec methods 
    360364- (void)uninstallWithVersion:(NSString *)version error:(NSError **)mError { 
    361365        if (version == nil) { 
    362                 [self execPortProc:@"mportuninstall" withOptions:nil version:@"" error:mError]; 
     366                [self execPortProc:@"mportuninstall_composite" withOptions:nil version:@"" error:mError]; 
    363367        } 
    364368        else { 
    365                 [self execPortProc:@"mportuninstall" withOptions:nil version:version error:mError]; 
     369                [self execPortProc:@"mportuninstall_composite" withOptions:nil version:version error:mError]; 
    366370        } 
    367371} 
     
    369373- (void)activateWithVersion:(NSString *)version error:(NSError **)mError { 
    370374        if (version == nil) { 
    371                 [self execPortProc:@"mportactivate" withOptions:nil version:@"" error:mError]; 
     375                [self execPortProc:@"mportactivate_composite" withOptions:nil version:@"" error:mError]; 
    372376        } 
    373377        else { 
    374                 [self execPortProc:@"mportactivate" withOptions:nil version:version error:mError]; 
     378                [self execPortProc:@"mportactivate_composite" withOptions:nil version:version error:mError]; 
    375379        } 
    376380                 
     
    379383- (void)deactivateWithVersion:(NSString *)version error:(NSError **)mError { 
    380384        if (version == nil) { 
    381                 [self execPortProc:@"mportdeactivate" withOptions:nil version:@"" error:mError]; 
     385                [self execPortProc:@"mportdeactivate_composite" withOptions:nil version:@"" error:mError]; 
    382386        } 
    383387        else { 
    384                 [self execPortProc:@"mportdeactivate" withOptions:nil version:version error:mError]; 
     388                [self execPortProc:@"mportdeactivate_composite" withOptions:nil version:version error:mError]; 
    385389        } 
    386390} 
  • contrib/MacPorts_Framework/init.tcl

    r72222 r79172  
    3838#and log error Information in a similar fashion to code 
    3939#in macports.tcl. 
    40 proc mportuninstall {portname {v ""} {optionslist ""}} { 
    41         if {[catch {registry_uninstall::uninstall $portname $v $optionslist} result]} { 
     40proc mportuninstall {portname {version ""} {revision ""} {variants 0} {optionslist ""}} { 
     41        if {[catch {registry_uninstall::uninstall $portname $version $revision $variants $optionslist} result]} { 
     42                 
     43                        global errorInfo 
     44                        ui_debug "$errorInfo" 
     45                        ui_error "Uninstall $portname ${version}_${revision}${variants} failed: $result" 
     46                        return 1 
     47        } 
     48} 
     49proc mportuninstall_composite {portname {v ""} {optionslist ""}} { 
     50        if {[catch {registry_uninstall::uninstall_composite $portname $v $optionslist} result]} { 
    4251                 
    4352                        global errorInfo 
     
    4857} 
    4958 
    50 proc mportactivate {portname v optionslist} { 
    51         if {[catch {portimage::activate $portname $v $optionslist} result]} { 
     59proc mportactivate {portname {version ""} {revision ""} {variants 0} {optionslist ""}} { 
     60        if {[catch {portimage::activate $portname $version $revision $variants $optionslist} result]} { 
     61                         
     62                        global errorInfo 
     63                        ui_debug "$errorInfo" 
     64                        ui_error "Activate $portname ${version}_${revision}${variants} failed: $result" 
     65                        return 1 
     66        } 
     67} 
     68proc mportactivate_composite {portname {v ""} {optionslist ""}} { 
     69        if {[catch {portimage::activate_composite $portname $v $optionslist} result]} { 
    5270                         
    5371                        global errorInfo 
     
    5876} 
    5977 
    60 proc mportdeactivate {portname v optionslist} { 
    61         if {[catch {portimage::deactivate $portname $v $optionslist} result]} { 
     78proc mportdeactivate {portname {version ""} {revision ""} {variants 0} {optionslist ""}} { 
     79        if {[catch {portimage::deactivate $portname $version $revision $variants $optionslist} result]} { 
     80                         
     81                        global errorInfo 
     82                        ui_debug "$errorInfo" 
     83                        ui_error "Deactivate $portname ${version}_${revision}${variants} failed: $result" 
     84                        return 1 
     85        } 
     86} 
     87proc mportdeactivate_composite {portname {v ""} {optionslist ""}} { 
     88        if {[catch {portimage::deactivate_composite $portname $v $optionslist} result]} { 
    6289                         
    6390                        global errorInfo 
  • contrib/MacPorts_Framework/interpInit.tcl

    r72222 r79172  
    3939#in macports.tcl. Note optionslist is not being used for now 
    4040set mp_empty_list [list] 
    41 proc mportuninstall {portname {v ""} {optionslist ""} } { 
    42         if {[catch {registry_uninstall::uninstall $portname $v [array get options]} result]} { 
     41proc mportuninstall {portname {version ""} {revision ""} {variants 0} {optionslist ""} } { 
     42        if {[catch {registry_uninstall::uninstall $portname $version $revision $variants [array get options]} result]} { 
     43                 
     44                        global errorInfo 
     45                        ui_debug "$errorInfo" 
     46                        ui_error "Uninstall $portname ${version}_${revision}${variants} failed: $result" 
     47                        return 1 
     48        } 
     49} 
     50proc mportuninstall_composite {portname {v ""} {optionslist ""} } { 
     51        if {[catch {registry_uninstall::uninstall_composite $portname $v [array get options]} result]} { 
    4352                 
    4453                        global errorInfo 
     
    4958} 
    5059 
    51 proc mportactivate {portname {v ""} {optionslist ""}} { 
    52         if {[catch {portimage::activate $portname $v $optionslist} result]} { 
     60proc mportactivate {portname {version ""} {revision ""} {variants 0} {optionslist ""}} { 
     61        if {[catch {portimage::activate $portname $version $revision $variants $optionslist} result]} { 
     62                         
     63                        global errorInfo 
     64                        ui_debug "$errorInfo" 
     65                        ui_error "Activate $portname ${version}_${revision}${variants} failed: $result" 
     66                        return 1 
     67        } 
     68} 
     69proc mportactivate_composite {portname {v ""} {optionslist ""}} { 
     70        if {[catch {portimage::activate_composite $portname $v $optionslist} result]} { 
    5371                         
    5472                        global errorInfo 
     
    5977} 
    6078 
    61 proc mportdeactivate {portname {v ""} {optionslist ""} } { 
    62         if {[catch {portimage::deactivate $portname $v $optionslist} result]} { 
     79proc mportdeactivate {portname {version ""} {revision ""} {variants 0} {optionslist ""} } { 
     80        if {[catch {portimage::deactivate $portname $version $revision $variants $optionslist} result]} { 
     81                         
     82                        global errorInfo 
     83                        ui_debug "$errorInfo" 
     84                        ui_error "Deactivate $portname ${version}_${revision}${variants} failed: $result" 
     85                        return 1 
     86        } 
     87} 
     88proc mportdeactivate_composite {portname {v ""} {optionslist ""} } { 
     89        if {[catch {portimage::deactivate_composite $portname $v $optionslist} result]} { 
    6390                         
    6491                        global errorInfo 
  • contrib/MacPorts_Framework/portProcessInit.tcl

    r72222 r79172  
    3939#in macports.tcl. Note optionslist is not being used for now 
    4040set mp_empty_list [list] 
    41 proc mportuninstall {portname {v ""} {optionslist ""} } { 
    42         if {[catch {registry_uninstall::uninstall $portname $v [array get options]} result]} { 
     41proc mportuninstall {portname {version ""} {revision ""} {variants 0} {optionslist ""} } { 
     42        if {[catch {registry_uninstall::uninstall $portname $version $revision $variants [array get options]} result]} { 
     43                 
     44                        global errorInfo 
     45                        ui_debug "$errorInfo" 
     46                        ui_error "Uninstall $portname ${version}_${revision}${variants} failed: $result" 
     47                        return 1 
     48        } 
     49} 
     50proc mportuninstall_composite {portname {v ""} {optionslist ""} } { 
     51        if {[catch {registry_uninstall::uninstall_composite $portname $v [array get options]} result]} { 
    4352                 
    4453                        global errorInfo 
     
    4958} 
    5059 
    51 proc mportactivate {portname {v ""} {optionslist ""}} { 
    52         if {[catch {portimage::activate $portname $v $optionslist} result]} { 
     60proc mportactivate {portname {version ""} {revision ""} {variants 0} {optionslist ""}} { 
     61        if {[catch {portimage::activate $portname $version $revision $variants $optionslist} result]} { 
     62                         
     63                        global errorInfo 
     64                        ui_debug "$errorInfo" 
     65                        ui_error "Activate $portname ${version}_${revision}${variants} failed: $result" 
     66                        return 1 
     67        } 
     68} 
     69proc mportactivate_composite {portname {v ""} {optionslist ""}} { 
     70        if {[catch {portimage::activate_composite $portname $v $optionslist} result]} { 
    5371                         
    5472                        global errorInfo 
     
    5977} 
    6078 
    61 proc mportdeactivate {portname {v ""} {optionslist ""} } { 
    62         if {[catch {portimage::deactivate $portname $v $optionslist} result]} { 
     79proc mportdeactivate {portname {version ""} {revision ""} {variants 0} {optionslist ""} } { 
     80        if {[catch {portimage::deactivate $portname $version $revision $variants $optionslist} result]} { 
     81                         
     82                        global errorInfo 
     83                        ui_debug "$errorInfo" 
     84                        ui_error "Deactivate $portname ${version}_${revision}${variants} failed: $result" 
     85                        return 1 
     86        } 
     87} 
     88proc mportdeactivate_composite {portname {v ""} {optionslist ""} } { 
     89        if {[catch {portimage::deactivate_composite $portname $v $optionslist} result]} { 
    6390                         
    6491                        global errorInfo 
Note: See TracChangeset for help on using the changeset viewer.