Ignore:
Timestamp:
May 1, 2009, 5:41:02 PM (11 years ago)
Author:
jmr@…
Message:

Rewrite logic for skipping install and activate targets when the port is
already installed or active. Fixes #16260. Also removes the need to use -f
when explicitly running a target prior to install for an installed port.

File:
1 edited

Legend:

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

    r50475 r50490  
    23682368    }
    23692369
     2370    set epoch_override 0
    23702371    # check installed version against version in ports
    23712372    if { ( [rpm-vercomp $version_installed $version_in_tree] > 0
     
    23992400            return 0
    24002401        } else {
     2402            set epoch_override 1
    24012403            ui_debug "epoch override ... upgrading!"
    24022404        }
     
    24042406
    24052407
    2406     # install version_in_tree
     2408    # build or unarchive version_in_tree
    24072409    if {0 == [string compare "yes" ${macports::portarchivemode}]} {
    24082410        set upgrade_action "archive"
     
    24112413    }
    24122414
    2413     if {[catch {set result [mportexec $workername $upgrade_action]} result] || $result != 0} {
    2414         global errorInfo
    2415         ui_debug "$errorInfo"
    2416         ui_error "Unable to upgrade port: $result"
    2417         return 1
     2415    # avoid building again unnecessarily
     2416    if {[info exists options(ports_force)] || $epoch_override == 1
     2417        || ![registry::entry_exists $portname $version_in_tree $revision_in_tree $portinfo(canonical_active_variants)]} {
     2418        if {[catch {set result [mportexec $workername $upgrade_action]} result] || $result != 0} {
     2419            global errorInfo
     2420            ui_debug "$errorInfo"
     2421            ui_error "Unable to upgrade port: $result"
     2422            return 1
     2423        }
    24182424    }
    24192425
Note: See TracChangeset for help on using the changeset viewer.