Opened 19 years ago

Closed 18 years ago

#7484 closed defect (fixed)

When a SourceForge mirror doesn't work, DP should try another one.

Reported by: vincent-opdarw@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc: bxf4@…, yesthatjwz (Jamie Zawinski), lucas@…, singh.mayank@…, markd@…
Port:

Description

I've tried a local Portfile for Liferea, using:

master_sites sourceforge

as with other ports using SourceForge. When I wanted to upgrade:

prunille:~> sudo port -v upgrade liferea Password: ---> Fetching liferea ---> liferea-1.0.6.tar.gz doesn't seem to exist in /opt/local/var/db/dports/distfiles/liferea ---> Attempting to fetch liferea-1.0.6.tar.gz from http://puzzle.dl.sourceforge.net/liferea

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

4333 390 4333 13008 0 0 7136 0 --:--:-- 0:00:01 --:--:-- 15475 ---> Verifying checksum(s) for liferea ---> Checksumming liferea-1.0.6.tar.gz Error: Checksum (md5) mismatch for liferea-1.0.6.tar.gz Portfile checksum: liferea-1.0.6.tar.gz md5 e8200bdd9a6a33468687cc8fb144e809 Distfile checksum: liferea-1.0.6.tar.gz md5 275dc7750bff94d77aab79be692d7948 [...]

I've looked at the downloaded file

/opt/local/var/db/dports/distfiles/liferea/liferea-1.0.6.tar.gz

and it contains a HTML file saying:

You are requesting file: /liferea/liferea-1.0.6.tar.gz There was a problem downloading the file from puzzle.dl.sourceforge.net. Please try a different mirror.

DP should have detected this and used a different mirror.

Change History (11)

comment:1 Changed 19 years ago by vincent-opdarw@…

And this problem is worse than expected since DP always uses the same mirror by default.

comment:2 Changed 19 years ago by blb@…

DP actually does switch to the next mirror, when the current one returns an error. The problem is that sourceforge mirrors return a success status and HTML page redirecting a browser back to the main SF download page for the given project.

comment:3 Changed 19 years ago by vincent-opdarw@…

(In reply to comment #2)

The problem is that sourceforge mirrors return a success status and HTML page redirecting a browser back to the main SF download page for the given project.

Yes, therefore there should be a special check for SourceForge mirrors (IMHO, it is sufficient to look at the content type, e.g. if it is text/html or something equivalent, this means a failure).

In the meantime, I think that http://puzzle.dl.sourceforge.net/ should be removed from the mirrors since it is still down and I wonder how long it will be.

comment:4 Changed 19 years ago by blb@…

(In reply to comment #3)

Yes, therefore there should be a special check for SourceForge mirrors (IMHO, it is sufficient to look at the content type, e.g. if it is text/html or something equivalent, this means a failure).

That could be an interesting fix; I doubt there are many (if any) ports which specifically try to download text/html files. I wonder if libcurl can return MIME type info, or another method would be needed to do this ('system "file ..."' maybe)?

In the meantime, I think that http://puzzle.dl.sourceforge.net/ should be removed from the mirrors since it is still down and I wonder how long it will be.

I recently downloaded something from puzzle without issues, it could be that it was a temporary situation...

comment:5 Changed 19 years ago by vincent-opdarw@…

(In reply to comment #4)

I wonder if libcurl can return MIME type info

The curl command can (see --dump-header option), so I suppose that libcurl can too.

I recently downloaded something from puzzle without issues, it could be that it was a temporary situation...

Yes, probably. Also, I think that a random mirror should be chosen to balance the bandwidth between all of them, and/or use location information to avoid wasting transcontinental bandwidth.

comment:6 Changed 19 years ago by blb@…

Cc: jwz@… added

* Bug 7472 has been marked as a duplicate of this bug. *

comment:7 Changed 19 years ago by blb@…

Cc: bxf4@… added

* Bug 7807 has been marked as a duplicate of this bug. *

comment:8 Changed 19 years ago by lucas@…

Cc: tuqueelukee@… added

comment:9 Changed 18 years ago by cssdev@…

Cc: singh.mayank@… added

* Bug 7986 has been marked as a duplicate of this bug. *

comment:10 Changed 18 years ago by markd@…

Cc: markd@… added

Various enhancements have been added, including removal of the puzzle mirror. I think this can be closed, correct?

comment:11 Changed 18 years ago by markd@…

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.