You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Ignore installed archive when appropriate
See: https://trac.macports.org/ticket/73659
This commit is contained in:
@@ -5894,7 +5894,7 @@ proc macports::_exec_upgrade {oplist upgrade_count} {
|
||||
if {!$source_only} {
|
||||
if {[catch {mportexec $mport archivefetch} result]} {
|
||||
ui_debug $::errorInfo
|
||||
} elseif {$result == 0 && [$workername eval [list find_portarchive_path]] ne ""} {
|
||||
} elseif {$result == 0 && [$workername eval [list find_portarchive_path 0]] ne ""} {
|
||||
set destroot_needed 0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,8 +312,9 @@ proc portarchivefetch::fetchfiles {{async no} args} {
|
||||
}
|
||||
set sorted no
|
||||
|
||||
set existing_archive [find_portarchive_path]
|
||||
if {$existing_archive eq "" && ![tbool force_archive_refresh]
|
||||
set include_installed [expr {![tbool force_archive_refresh]}]
|
||||
set existing_archive [find_portarchive_path $include_installed]
|
||||
if {$existing_archive eq "" && $include_installed
|
||||
&& [file isdirectory [file rootname [get_portimage_path]]]} {
|
||||
set existing_archive yes
|
||||
}
|
||||
@@ -496,8 +497,9 @@ proc portarchivefetch::archives_present {} {
|
||||
global archivefetch.fulldestpath force_archive_refresh
|
||||
variable archivefetch_urls
|
||||
|
||||
set existing_archive [find_portarchive_path]
|
||||
if {$existing_archive eq "" && ![tbool force_archive_refresh]
|
||||
set include_installed [expr {![tbool force_archive_refresh]}]
|
||||
set existing_archive [find_portarchive_path $include_installed]
|
||||
if {$existing_archive eq "" && $include_installed
|
||||
&& [file isdirectory [file rootname [get_portimage_path]]]} {
|
||||
set existing_archive yes
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ proc portinstall::install_main {args} {
|
||||
variable installPlist
|
||||
|
||||
set location [get_portimage_path]
|
||||
set archive_path [find_portarchive_path]
|
||||
set archive_path [find_portarchive_path 0]
|
||||
if {$archive_path ne ""} {
|
||||
set install_dir [file dirname $location]
|
||||
file mkdir $install_dir
|
||||
|
||||
@@ -2727,16 +2727,13 @@ proc supportedArchiveTypes {} {
|
||||
}
|
||||
|
||||
# return path to a downloaded or installed archive for this port
|
||||
proc find_portarchive_path {} {
|
||||
global portdbpath subport version revision portvariants force_archive_refresh
|
||||
set installed 0
|
||||
if {[registry_exists $subport $version $revision $portvariants]} {
|
||||
set installed 1
|
||||
}
|
||||
proc find_portarchive_path {{include_installed 1}} {
|
||||
global portdbpath subport version revision portvariants
|
||||
set installed [expr {$include_installed && [registry_exists $subport $version $revision $portvariants]}]
|
||||
set archiverootname [file rootname [get_portimage_name]]
|
||||
foreach unarchive.type [supportedArchiveTypes] {
|
||||
set fullarchivename "${archiverootname}.${unarchive.type}"
|
||||
if {$installed && ![tbool force_archive_refresh]} {
|
||||
if {$installed} {
|
||||
set fullarchivepath [file join $portdbpath software $subport $fullarchivename]
|
||||
} else {
|
||||
set fullarchivepath [file join $portdbpath incoming/verified $fullarchivename]
|
||||
@@ -3529,7 +3526,7 @@ proc portutil::_eval_archive_available {{async no}} {
|
||||
return
|
||||
}
|
||||
|
||||
if {[find_portarchive_path] ne ""} {
|
||||
if {[find_portarchive_path 0] ne ""} {
|
||||
set archive_available_result 1
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user