Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#32018 closed defect (fixed)

mirror_sites.tcl fails to handle :port in URLs

Reported by: bettybronner@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.1.1
Component: base Version: 2.0.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), someuser12
Port:

Description

'http://apache.mirror.rafal.cahttpd' is an invalid URL. Perhaps this is supposed to be 'http://apache.mirror.rafal.ca/httpd'? It seems to work better.

bash-3.2# port clean --dist apache2
--->  Cleaning apache2
bash-3.2# port upgrade apache2
--->  Computing dependencies for apache2
--->  Fetching archive for apache2
--->  Attempting to fetch apache2-2.2.21_2+preforkmpm.darwin_9.i386.tbz2 from http://packages.macports.org/apache2
--->  Fetching apache2
--->  Attempting to fetch httpd-2.2.21.tar.bz2 from http://apache.mirror.rafal.cahttpd
--->  Verifying checksum(s) for apache2
Error: Checksum (rmd160) mismatch for httpd-2.2.21.tar.bz2
Error: Checksum (sha256) mismatch for httpd-2.2.21.tar.bz2
***
The non-matching file appears to be HTML. See this page for possible reasons
for the checksum mismatch:
<https://trac.macports.org/wiki/MisbehavingServers>
***
Error: Target org.macports.checksum returned: Unable to verify file checksums
Log for apache2 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_apache2/apache2/main.log
Error: Unable to upgrade port: 1
To report a bug, see <http://guide.macports.org/#project.tickets>

Attachments (1)

patch-port1.0-fetch_common.tcl.diff (1.0 KB) - added by someuser12 12 years ago.
Patch to /opt/local/share/macports/Tcl/port1.0/fetch_common.tcl

Download all attachments as: .zip

Change History (9)

comment:1 Changed 12 years ago by blb@…

Component: portsbase
Port: apache2 removed
Summary: apache2 bad fetch URLmirror_sites.tcl fails to handle :port in URLs

Looks like the code to handle the mirror groups doesn't understand the :port nomenclature. I've removed that entry for now in r87119.

comment:2 Changed 12 years ago by blb@…

Milestone: MacPorts Future

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

Sorry, I broke that in r87040. I was trying to avoid redirects but didn't realize that MacPorts base wouldn't like port numbers in the URL. In r87120 I put it back the way it originally was.

comment:4 Changed 12 years ago by someuser12

I attached a patch to /opt/local/share/macports/Tcl/port1.0/fetch_common.tcl (patch to Macports 2.1.0).

I don't know if this solves this issue (likely yes), but it solves the issue I raised on the mailing list on May, 15th 2012 about urls with port numbers in archive_sites.conf .

The problem was that the function portfetch::mirror_sites assumed that urls would contain one single colon (e.g. http://mysite/). With the patch, a URL may now contain any number of colons.

Thanks for your kind consideration!

Changed 12 years ago by someuser12

Patch to /opt/local/share/macports/Tcl/port1.0/fetch_common.tcl

comment:5 Changed 12 years ago by someuser12

My first patch was breaking the case where there is a mirror_tag and a single colon in the URL. This second version improves the situation.

comment:6 Changed 12 years ago by someuser12

Cc: macosx12345@… added

Cc Me!

comment:7 Changed 12 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

comment:8 Changed 12 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 2.1.1
Note: See TracTickets for help on using tickets.