[MacPorts] #62143: Make master_site_local and patch_site_local able to be suffixed with dist_subdir (was: Document master_site_local, patch_site_local, archive_site_local in guide)

MacPorts noreply at macports.org
Sat May 22 07:28:46 UTC 2021


#62143: Make master_site_local and patch_site_local able to be suffixed with
dist_subdir
--------------------------+--------------------
  Reporter:  snowflake    |      Owner:  (none)
      Type:  enhancement  |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:  2.6.99
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------
Changes (by ryandesign):

 * cc: ryandesign (added)
 * version:   => 2.6.99
 * component:  guide => base


Comment:

 Replying to [comment:3 snowflake]:
 > I've tried setting master_site_local and patch_site_local and they do
 not work. I tried them as upper-case environment variables and that does
 not work.

 They "work", but not in a way that seems useful to me. Since it was never
 documented how they were intended to work, it's unclear to me if it
 "works" correctly or not.

 If you set `master_site_local http://distfiles.local/` or
 `patch_site_local http://distfiles.local/` then MacPorts will looks for
 distfiles or patchfiles there ''without adding `dist_subdir` to the end''.
 For example, it would try to download the distfile for the zlib port from
 !http://distfiles.local/zlib-1.2.11.tar.xz when you might actually want it
 to try to download from !http://distfiles.local/zlib/zlib-1.2.11.tar.xz if
 your web server is serving the contents of
 /opt/local/var/macports/distfiles for example.

 If you specify `master_site_local http://distfiles.local/:mirror` or
 `patch_site_local http://distfiles.local/:mirror` as I [comment:1
 suggested earlier], then MacPorts interprets `mirror` as the name of a tag
 and only considers that URL when fetching distfiles that have that tag
 assigned (and probably no ports have a distfile with that tag which is why
 it doesn't end up being used). That's not what I expected or what I
 intended when I made that suggestion and probably nobody ever uses this
 behavior intentionally. Rather, I had intended for `:mirror` to be
 interpreted as the directive to treat this URL as a mirror and thus add
 `dist_subdir` to the end.

 [comment:4 Your proposal] adds master_site_local a second time and
 processes it in the way I intended, but that doesn't handle
 patch_site_local and it doesn't deal with the fact that an incorrectly-
 processed entry has already been added.

 I think I can refactor the code so that the code that interprets the
 `:mirror` and `:nosubdir` directives can be reused when handling
 master_site_local and patch_site_local. The way MacPorts currently handles
 them is the same way it handles entries in mirror_sites.tcl that have the
 `:nosubdir` directive, but we might want to change it so that URLs that
 don't specify a behavior default to the `:mirror` behavior since that's
 probably what people want.

 Moved documentation request to #62952.

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


More information about the macports-tickets mailing list