Changeset 68872


Ignore:
Timestamp:
Jun 16, 2010, 4:08:57 PM (10 years ago)
Author:
jmr@…
Message:

bring back deactivation of replaced ports during upgrade (#25270)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/macports1.0/macports.tcl

    r68813 r68872  
    32173217            }
    32183218        }
     3219        if {$anyactive && $portname != $newname} {
     3220            # replaced_by in effect, deactivate the old port
     3221            # we have to force the deactivate in case of dependents
     3222            set force_cur [info exists options(ports_force)]
     3223            set options(ports_force) yes
     3224            if {$is_dryrun eq "yes"} {
     3225                ui_msg "Skipping deactivate $portname @${version_active}_${revision_active}${variant_active} (dry run)"
     3226            } elseif {!(${registry.format} == "receipt_sqlite" && [registry::run_target $regref deactivate [array get options]])
     3227                      && [catch {portimage::deactivate $portname ${version_active}_${revision_active}${variant_active} [array get options]} result]} {
     3228                global errorInfo
     3229                ui_debug "$errorInfo"
     3230                ui_error "Deactivating $portname @${version_active}_${revision_active}${variant_active} failed: $result"
     3231                catch {mportclose $workername}
     3232                return 1
     3233            }
     3234            if {!$force_cur} {
     3235                unset options(ports_force)
     3236            }
     3237            set anyactive no
     3238        }
    32193239        if {[info exists options(port_uninstall_old)]} {
    32203240            # uninstalling now could fail due to dependents when not forced,
Note: See TracChangeset for help on using the changeset viewer.