Discussion:
[MacPorts] #57719: archive_site_local URLs are attempted twice
MacPorts
2018-12-04 10:20:13 UTC
Permalink
#57719: archive_site_local URLs are attempted twice
------------------------+----------------------------
Reporter: ryandesign | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone: MacPorts 2.6.0
Component: base | Version: 2.5.99
Keywords: | Port:
------------------------+----------------------------
With `archive_site_local`'s basic functionality fixed (#57717), we now see
that the specified site is tried twice. With macports.conf containing:

{{{
archive_site_local https://packages-private.macports.org/:tbz2
}}}

We see:

{{{
---> Fetching archive for libpng
DEBUG: Executing org.macports.archivefetch (libpng)
DEBUG: euid/egid changed to: 0/0
DEBUG: chowned /opt/local/var/macports/incoming to macports
DEBUG: euid/egid changed to: 502/501
---> libpng-1.6.36_0.darwin_15.x86_64.tbz2 doesn't seem to exist in
/opt/local/var/macports/incoming/verified
---> Attempting to fetch libpng-1.6.36_0.darwin_15.x86_64.tbz2 from https
://packages-private.macports.org/libpng
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0DEBUG: Fetching archive failed: The requested URL returned error: 404 Not
Found
---> Attempting to fetch libpng-1.6.36_0.darwin_15.x86_64.tbz2 from https
://packages-private.macports.org/libpng
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0DEBUG: Fetching archive failed: The requested URL returned error: 404 Not
Found
---> Attempting to fetch libpng-1.6.36_0.darwin_15.x86_64.tbz2 from
https://packages.macports.org/libpng
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left
Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0DEBUG: Fetching archive failed: The requested URL returned error: 404 Not
Found
}}}

`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? 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?
--
Ticket URL: <https://trac.macports.org/ticket/57719>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...