[MacPorts] #62143: Document master_site_local, patch_site_local, archive_site_local in guide

MacPorts noreply at macports.org
Fri Jan 29 12:25:25 UTC 2021


#62143: Document master_site_local, patch_site_local, archive_site_local in guide
--------------------------+--------------------
  Reporter:  snowflake    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  guide        |    Version:
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------

Comment (by snowflake):

 I have looked at the code in fetch_common.tcl and portfetch.tcl.  I have
 put lots of debugging prints in the code.  I see that my local site is
 listed in various lists, then it disappears and I do not know why.

 I have devised a crude yet effective fix.  The idea is to append my site
 to the macports_distfiles list in fetch_common.tcl proc
 portfetch::mirrorsites

 Here is the first part of the proc
 {{{
 # For a given mirror site type, e.g. "gnu" or "x11", check to see if
 there's a
 # pre-registered set of sites, and if so, return them.
 proc portfetch::mirror_sites {mirrors tag subdir mirrorfile} {
     global name dist_subdir global_mirror_site env
     ui_notice "dje: get mirror sites mirrors: $mirrors, tag: $tag, subdir:
 $subdir\n"
     if {[file exists $mirrorfile]} {
         source $mirrorfile
     }

     if {![info exists portfetch::mirror_sites::sites($mirrors)]} {
         if {$mirrors ne $global_mirror_site} {
             ui_warn "[format [msgcat::mc "No mirror sites on file for
 class %s"] $mirrors]"
         }
         return {}
     }
 # new code starts here
     if {$mirrors eq "macports_distfiles"} {
         if {  [ array names env MASTER_SITE_LOCAL ] != ""  } {
             lappend portfetch::mirror_sites::sites($mirrors)
 $env(MASTER_SITE_LOCAL)
         }
     }
 # new code ends here
 }}}

 My knowledge of Tcl is not great and this patch will probably offend the
 Tcl purists.

-- 
Ticket URL: <https://trac.macports.org/ticket/62143#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list