Opened 6 years ago
Closed 5 years ago
#57718 closed defect (fixed)
Unexpected behavior when archive_site_local contains more than 1 URL
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.6.0 |
Component: | base | Version: | 2.5.99 |
Keywords: | haspatch | Cc: | |
Port: |
Description
After fixing archive_site_local
(see #57717), I set it as follows in macports.conf:
archive_site_local http://SITE1/:tbz2 http://SITE2/:tbz2
Specifying the tag :tbz2
on each URL appears to be mandatory; without that, the URLs are not used.
This had the following unexpected behavior:
$ sudo port -bu upgr smpeg2 ---> Computing dependencies for smpeg2 ---> Fetching archive for smpeg2 ---> Attempting to fetch smpeg2-2.0.0_2.darwin_18.x86_64.tbz2 from http://SITE1/:tbz2 http://SITE2/smpeg2 ---> Attempting to fetch smpeg2-2.0.0_2.darwin_18.x86_64.tbz2 from http://SITE1/smpeg2 ---> Attempting to fetch smpeg2-2.0.0_2.darwin_18.x86_64.tbz2.rmd160 from http://SITE1/smpeg2 ---> Installing smpeg2 @2.0.0_2 [snip]
Why did it first try to access the archive_site_local
value as a complete URL?
It looks like the problem is in portfetch::checksites
—it adds archive_site_local
("$env($senv)
") to the list of sites twice—first correctly, as individual items, when adding URLs for use with any tag:
# add the specified global and user-defined mirrors
if {[info exists env($senv)]} { set full_list [concat $env($senv) $full_list] }
and then incorrectly, as a single item, when adding URLs for use with a specific tag:
# add in the global and user-defined mirrors for each tag
if {[info exists env($senv)]} { set site_list [concat [list $env($senv)] $site_list] }
It looks like this problem goes all the way back to [462cb467be6d98fde9bd0539597c440cb7237a73/macports-base] when #15485 was implemented.
I'll submit a PR to fix this.
Change History (4)
comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added |
---|
comment:2 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)
comment:3 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)
I've manually applied this fix to the buildbot workers too.
comment:4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to ryandesign |
---|---|
Resolution: | → fixed |
Status: | new → closed |
https://github.com/macports/macports-base/pull/111