[MacPorts] #64235: MacPorts base: patch_sites.mirror_subdir not getting appended to patch_sites URL

MacPorts noreply at macports.org
Fri Dec 17 17:18:23 UTC 2021


#64235: MacPorts base: patch_sites.mirror_subdir not getting appended to
patch_sites URL
------------------------+--------------------
 Reporter:  jasonliu--  |      Owner:  (none)
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  base        |    Version:  2.7.1
 Keywords:              |       Port:
------------------------+--------------------
 I'm working on a portfile where I would like to download a patch from
 GitHub. When I have the following code:

 {{{
 github.setup              Secretchronicles TSC 2.1.0 v
 ...
 patch_sites               ${github.homepage}
 patch_sites.mirror_subdir commit
 patchfiles-append         48f981f3ff459f742d5f30596e7866ae4b9005f7.patch
 }}}

 MacPorts doesn't seem to be able to find the file, because the assembled
 URL is incorrect:

 {{{
 :info:fetch --->  48f981f3ff459f742d5f30596e7866ae4b9005f7.patch does not
 exist in
                   /opt/local/var/macports/distfiles/secretchronicles
 :notice:fetch --->  Attempting to fetch
 48f981f3ff459f742d5f30596e7866ae4b9005f7.patch
                     from http://distfiles.macports.org/secretchronicles
 :debug:fetch Fetching distfile failed: The requested URL returned error:
 404 Not Found
 :notice:fetch --->  Attempting to fetch
 48f981f3ff459f742d5f30596e7866ae4b9005f7.patch
                     from https://github.com/Secretchronicles/TSC
 :debug:fetch Fetching distfile failed: The requested URL returned error:
 404 Not Found
 ...
 :error:fetch Failed to fetch secretchronicles:
              The requested URL returned error: 404 Not Found
 :debug:fetch Error code: NONE
 :debug:fetch Backtrace: The requested URL returned error: 404 Not Found
 }}}

 However, when I change the code to be

 {{{
 github.setup              Secretchronicles TSC 2.1.0 v
 ...
 patch_sites.mirror_subdir commit
 patch_sites               ${github.homepage}/${patch_sites.mirror_subdir}
 patchfiles-append         48f981f3ff459f742d5f30596e7866ae4b9005f7.patch
 }}}

 it seems to download the patch file fine:

 {{{
 :info:fetch --->  48f981f3ff459f742d5f30596e7866ae4b9005f7.patch does not
 exist in
                   /opt/local/var/macports/distfiles/secretchronicles
 :notice:fetch --->  Attempting to fetch
 48f981f3ff459f742d5f30596e7866ae4b9005f7.patch
                     from http://distfiles.macports.org/secretchronicles
 :debug:fetch Fetching distfile failed: The requested URL returned error:
 404 Not Found
 :notice:fetch --->  Attempting to fetch
 48f981f3ff459f742d5f30596e7866ae4b9005f7.patch
                     from https://github.com/Secretchronicles/TSC/commit
 :debug:fetch Executing proc-post-org.macports.fetch-fetch-0
 }}}

 I grepped through all of the portfiles in {{{macports-ports}}}, and it
 seems that no portfiles are currently using
 {{{patch_sites.mirror_subdir}}}.

-- 
Ticket URL: <https://trac.macports.org/ticket/64235>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list