Changeset 154451


Ignore:
Timestamp:
Oct 29, 2016, 11:01:06 PM (7 years ago)
Author:
raimue@…
Message:

sync: warn on obsolete Subversion repository

File:
1 edited

Legend:

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

    r151037 r154451  
    23402340}
    23412341
     2342##
     2343# Checks whether a local source directory is a checkout of the obsolete Subversion repository
     2344#
     2345# @param source_dir local directory check
     2346proc _source_is_obsolete_svn_repo {source_dir} {
     2347    if {![catch {macports::findBinary svn} svn] &&
     2348        ([file exists ${source_dir}/.svn] ||
     2349         ![catch {exec $svn info ${source_dir} >/dev/null 2>@1}])
     2350    } then {
     2351        if {![catch {exec $svn info ${source_dir}} svninfo]} {
     2352            if {[regexp -line {^Repository Root: https://svn\.macports\.org/repository/macports} $svninfo] ||
     2353                    [regexp -line {^Repository UUID: d073be05-634f-4543-b044-5fe20cf6d1d6$} $svninfo]} {
     2354                return 1
     2355            }
     2356        }
     2357    }
     2358    return 0
     2359}
     2360
    23422361proc macports::getportbuildpath {id {portname {}}} {
    23432362    global macports::portdbpath
     
    24602479
    24612480    set numfailed 0
     2481    set obsoletesvn 0
    24622482
    24632483    ui_msg "$macports::ui_prefix Updating the ports tree"
     
    24742494            {^file$} {
    24752495                set portdir [macports::getportdir $source]
     2496                if {[_source_is_obsolete_svn_repo $portdir]} {
     2497                    set obsoletesvn 1
     2498                }
    24762499                try -pass_signal {
    24772500                    set repoInfo [macports::GetVCSUpdateCmd $portdir]
     
    27382761        return -code error "Synchronization of $numfailed sources failed"
    27392762    }
     2763
     2764    if {$obsoletesvn != 0} {
     2765        ui_warn "The Subversion repository at svn.macports.org is no longer updated."
     2766        ui_warn "Please switch to Git: https://trac.macports.org/wiki/howto/SyncingWithGit"
     2767    }
    27402768}
    27412769
Note: See TracChangeset for help on using the changeset viewer.