[MacPorts] #56008: port mirror does not indicate failure when checksum verification fails

MacPorts noreply at macports.org
Sun Mar 11 04:05:59 UTC 2018


#56008: port mirror does not indicate failure when checksum verification fails
------------------------+-------------------
 Reporter:  ryandesign  |      Owner:
     Type:  defect      |     Status:  new
 Priority:  Normal      |  Milestone:
Component:  base        |    Version:  2.4.2
 Keywords:              |       Port:
------------------------+-------------------
 `port mirror` correctly returns an error code if fetch fails. For example
 if I modify the zlib port to fetch a nonexistent version:

 {{{
 $ sudo /opt/local/bin/port mirror zlib; echo $?
 --->  Fetching distfiles for zlib
 --->  Attempting to fetch zlib-1.2.1111.tar.xz from
 https://distfiles.macports.org/zlib
 --->  Attempting to fetch zlib-1.2.1111.tar.xz from http://www.zlib.net/
 Error: Failed to mirror zlib: The requested URL returned error: 404 Not
 Found
 Error: See /opt/local/var/macports/logs/_Users_rschmidt_macports_macports-
 ports-svn-trunk_archivers_zlib/zlib/main.log for details.
 Error: Follow https://guide.macports.org/#project.tickets to report a bug.
 Error: Processing of port zlib failed
 1
 }}}

 But if fetch succeeds but checksum verification fails, it does not
 indicate this. For example if I deliberately make the checksum of the zlib
 port incorrect:

 {{{
 $ sudo /opt/local/bin/port mirror zlib; echo $?
 --->  Fetching distfiles for zlib
 --->  Attempting to fetch zlib-1.2.11.tar.xz from
 https://distfiles.macports.org/zlib
 Error: Checksum (rmd160) mismatch for zlib-1.2.11.tar.xz
 0
 }}}

 We already tell people to run `port -p mirror` if they want to mirror all
 files and proceed past errors, so fixing it to correctly indicate its
 error status seems like the right thing to do.

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


More information about the macports-tickets mailing list