You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Deprecate port selfupdate --nosync, add --no-sync
Closes: https://trac.macports.org/ticket/56434
This commit is contained in:
@@ -145,7 +145,7 @@ proc selfupdate::main {{optionslist {}} {updatestatusvar {}}} {
|
||||
set comp [vercmp $macports_version_new $macports::autoconf::macports_version]
|
||||
|
||||
# syncing ports tree.
|
||||
if {![info exists options(ports_selfupdate_nosync)] || !$options(ports_selfupdate_nosync)} {
|
||||
if {![info exists options(ports_selfupdate_no-sync)] || !$options(ports_selfupdate_no-sync)} {
|
||||
if {$comp > 0} {
|
||||
# updated portfiles potentially need new base to parse - tell sync to try to
|
||||
# use prefabricated PortIndex files and signal if it couldn't
|
||||
@@ -218,7 +218,7 @@ proc selfupdate::main {{optionslist {}} {updatestatusvar {}}} {
|
||||
return -code error "Couldn't change permissions of the MacPorts sources at $mp_source_path to ${sources_owner}: $eMessage"
|
||||
}
|
||||
|
||||
if {![info exists options(ports_selfupdate_nosync)] || !$options(ports_selfupdate_nosync)} {
|
||||
if {![info exists options(ports_selfupdate_no-sync)] || !$options(ports_selfupdate_no-sync)} {
|
||||
if {[info exists needed_portindex]} {
|
||||
ui_msg "Not all sources could be fully synced using the old version of MacPorts."
|
||||
ui_msg "Please run selfupdate again now that MacPorts base has been updated."
|
||||
|
||||
+7
-2
@@ -2701,7 +2701,12 @@ proc action_selfupdate { action portlist opts } {
|
||||
if {[prefix_unwritable]} {
|
||||
return 1
|
||||
}
|
||||
if { [catch {macports::selfupdate [array get global_options] base_updated} result ] } {
|
||||
array set options [array get global_options]
|
||||
if {[info exists options(ports_${action}_nosync)] && $options(ports_${action}_nosync) eq "yes"} {
|
||||
ui_warn "port selfupdate --nosync is deprecated, use --no-sync instead"
|
||||
set options(ports_${action}_no-sync) $options(ports_${action}_nosync)
|
||||
}
|
||||
if { [catch {macports::selfupdate [array get options] base_updated} result ] } {
|
||||
ui_debug $::errorInfo
|
||||
ui_error $result
|
||||
if {![macports::ui_isset ports_verbose]} {
|
||||
@@ -4394,7 +4399,7 @@ array set cmd_opts_array {
|
||||
depends description epoch exact glob homepage line
|
||||
long_description maintainer maintainers name platform
|
||||
platforms portdir regex revision variant variants version}
|
||||
selfupdate {nosync}
|
||||
selfupdate {no-sync nosync}
|
||||
space {{units 1} total}
|
||||
activate {no-exec}
|
||||
deactivate {no-exec}
|
||||
|
||||
Reference in New Issue
Block a user