[MacPorts] #57719: archive_site_local URLs are attempted twice
MacPorts
noreply at macports.org
Thu May 27 19:03:13 UTC 2021
#57719: archive_site_local URLs are attempted twice
-------------------------+-----------------------------
Reporter: ryandesign | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone: MacPorts Future
Component: base | Version: 2.5.99
Resolution: | Keywords:
Port: |
-------------------------+-----------------------------
Comment (by ryandesign):
Replying to [ticket:57719 ryandesign]:
> `portfetch::checksites` adds each URL twice: once for use with any tag,
and then again for the specific tag. Does it need to do that?
After some debugging, I think I now understand that the local sites are
added without a tag at the top of checksites (for distfiles that don't
specify a tag) and then, at the end, are added again for every tag
specified in any URL added up to that point (for distfiles that do specify
a tag). The problem is that archive_site_local URLs must end with `:tbz2`
(or similar), which looks like a tag, so MacPorts adds the local URLs a
second time for that tag. So I'm trying to find a way to restructure
things to fix that.
checksites is confusing because of the number of different things it does;
because it does not return anything but sets global variables; and because
its preceding comment block is hard to parse.
I need to see if we already have tests for checksites. If not, I should
write some to cover existing functionality and to verify the fix for this
issue.
> If so, could the list be deduplicated, so that only one copy of each URL
remains? Would the end of `portfetch::checksites` be a good place to do
that deduplication, or is it better done elsewhere?
Aside from any fix for the preceding, deduplication might be a good idea
anyway. I'm investigating doing this as part of this fix, perhaps using a
[https://www.tcl.tk/man/tcl8.5/TclCmd/dict.htm dict]; this code was
probably written back when we still had to be compatible with earlier
versions of Tcl that didn't have dict.
--
Ticket URL: <https://trac.macports.org/ticket/57719#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list