Skip to content

Commit

Permalink
_upgrade: only run destroot if there's no archive
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Oct 30, 2023
1 parent 4fdb948 commit a9597dc
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/macports1.0/macports.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -4404,26 +4404,26 @@ proc macports::_upgrade {portname dspec variationslist optionslist {depscachenam
# but we don't know if we want to do this at that point.
$workername eval {set force_archive_refresh yes}

# run archivefetch and destroot for version_in_tree
# run archivefetch and (if needed) destroot for version_in_tree
# doing this instead of just running install ensures that we have the
# new copy ready but not yet installed, so we can safely uninstall the
# existing one.
set archivefetch_failed 0
if {[catch {mportexec $mport archivefetch} result]} {
ui_debug $::errorInfo
_upgrade_cleanup
return 1
set archivefetch_failed 1
} elseif {$result != 0} {
_upgrade_cleanup
return 1
set archivefetch_failed 1
}
# the following is a noop if archivefetch found an archive
if {[catch {mportexec $mport destroot} result]} {
ui_debug $::errorInfo
_upgrade_cleanup
return 1
} elseif {$result != 0} {
_upgrade_cleanup
return 1
if {$archivefetch_failed || [$workername eval [list find_portarchive_path]] eq ""} {
if {[catch {mportexec $mport destroot} result]} {
ui_debug $::errorInfo
_upgrade_cleanup
return 1
} elseif {$result != 0} {
_upgrade_cleanup
return 1
}
}
} else {
# Normal non-forced case
Expand Down

0 comments on commit a9597dc

Please sign in to comment.