[MacPorts] #60756: Tell the user when fetching a binary failed and a build from source will occur

MacPorts noreply at macports.org
Fri Jul 3 03:09:55 UTC 2020


#60756: Tell the user when fetching a binary failed and a build from source will
occur
-------------------------+--------------------
 Reporter:  ryandesign   |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  base         |    Version:  2.6.2
 Keywords:               |       Port:
-------------------------+--------------------
 We constantly get bug reports from users who misunderstand how MacPorts
 works with regard to binaries and building from source. For example, users
 often report that a port cannot be installed "because the file is not on
 the servers". The file they are referring to is the binary archive, and
 this confusion is understandable since MacPorts prints messages about
 trying to download the binary archive and the log contains 404 not found
 errors. The user doesn't understand that this is not the real problem;
 that MacPorts is then building from source, perhaps using a source tarball
 that was already on their system; that the build from source is failing;
 and that that is the real problem that needs to be addressed. See #60731
 for a recent instance of this.

 While I am conscious of the need to streamline MacPorts output and not
 overwhelm the user with irrelevancies, I think it would improve user
 understanding and reduce the amount of reeducation that we have to do in
 each ticket if MacPorts would print a message if it failed to find a
 binary archive on the server and will then build from source. We might
 also be more explicit and refer to archives specifically as binary
 archives, to differentiate them from source code archives.

 Here's what we currently print:

 {{{
 --->  Fetching archive for p5.30-mozilla-ca
 --->  Attempting to fetch p5.30-mozilla-ca-
 20200520_0.darwin_19.noarch.tbz2 from https://packages.macports.org/p5.30
 -mozilla-ca
 --->  Attempting to fetch p5.30-mozilla-ca-
 20200520_0.darwin_19.noarch.tbz2 from
 http://lil.fr.packages.macports.org/p5.30-mozilla-ca
 --->  Attempting to fetch p5.30-mozilla-ca-
 20200520_0.darwin_19.noarch.tbz2 from
 http://nue.de.packages.macports.org/p5.30-mozilla-ca
 --->  Verifying checksums for p5.30-mozilla-ca
 Error: Checksum (rmd160) mismatch for Mozilla-CA-20200520.tar.gz
 }}}

 Here's an example of how we could improve the output:

 {{{
 --->  Fetching binary archive for p5.30-mozilla-ca
 --->  Attempting to fetch p5.30-mozilla-ca-
 20200520_0.darwin_19.noarch.tbz2 from https://packages.macports.org/p5.30
 -mozilla-ca
 --->  Attempting to fetch p5.30-mozilla-ca-
 20200520_0.darwin_19.noarch.tbz2 from
 http://lil.fr.packages.macports.org/p5.30-mozilla-ca
 --->  Attempting to fetch p5.30-mozilla-ca-
 20200520_0.darwin_19.noarch.tbz2 from
 http://nue.de.packages.macports.org/p5.30-mozilla-ca
 Building from source because a binary archive could not be found
 --->  Verifying checksums for p5.30-mozilla-ca
 Error: Checksum (rmd160) mismatch for Mozilla-CA-20200520.tar.gz
 }}}

 If we [ticket:60315 let MacPorts know which ports are distributable] we
 could change that message to be more specific:

 {{{
 Building from source because the binary archive is not distributable
 --->  Verifying checksums for p5.30-mozilla-ca
 Error: Checksum (rmd160) mismatch for Mozilla-CA-20200520.tar.gz
 }}}

 We might also want to reword the output for fetching the source code. We
 currently print:

 {{{
 --->  Fetching distfiles for p5.30-mozilla-ca
 --->  Attempting to fetch Mozilla-CA-20200520.tar.gz from
 https://distfiles.macports.org/perl5
 }}}

 What if we change it to:

 {{{
 --->  Fetching source code for p5.30-mozilla-ca
 --->  Attempting to fetch Mozilla-CA-20200520.tar.gz from
 https://distfiles.macports.org/perl5
 }}}

 This would clear up confusion for users who don't know what we mean by
 "distfile" and would also make the message more accurate since it would
 accommodate those ports that don't fetch distfiles but fetch from a VCS
 like git instead. The new wording would be inaccurate for ports that
 download and repackage an existing binary but that's very few ports so it
 can probably be ignored.

-- 
Ticket URL: <https://trac.macports.org/ticket/60756>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list