[MacPorts] #49359: tdom: fix build failure with tcl 8.6

MacPorts noreply at macports.org
Sat Oct 24 11:15:50 PDT 2015


#49359: tdom: fix build failure with tcl 8.6
------------------------+---------------------------------
  Reporter:  neumann@…  |      Owner:  ryandesign@…
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.3.4
Resolution:             |   Keywords:  haspatch maintainer
      Port:  tdom       |
------------------------+---------------------------------

Comment (by neumann@…):

 Not sure, what might be special about my installation. I've tried to debug
 macports and found the following:

 When NOT using the github portgroup in the Portfile (just using
 {{{
 master_sites  https://github.com/downloads/tDOM/tdom"
 }}}
 ), the code in "macports/lib/port1.0/portfetch.tcl" uses the following
 commands (i've added a debug line for the "port fetch" command)
 {{{
 :debug:fetch Executing org.macports.fetch (tDOM)
 :info:fetch --->  tDOM-0.8.3.tgz doesn't seem to exist in
 /opt/local/var/macports/distfiles/tDOM
 :notice:fetch --->  Attempting to fetch tDOM-0.8.3.tgz from
 http://nue.de.distfiles.macports.org/macports/distfiles/tDOM
 eval curl fetch --progress ui_progress_download
 {http://nue.de.distfiles.macports.org/macports/distfiles/tDOM/tDOM-0.8.3.tgz}
 {/opt/local/var/macports/distfiles/tDOM/tDOM-0.8.3.tgz.TMP}
 :debug:fetch Privilege de-escalation not attempted as not running as root.
 :debug:checksum checksum phase started at Sat Oct 24 19:43:27 CEST 2015
 ....
 }}}

 When using the github portgroup with "github.tarball_from downloads", the
 port fetch command is
 {{{
 :debug:fetch Executing org.macports.fetch (tDOM)
 :info:fetch --->  tdom-0.8.3.tgz doesn't seem to exist in
 /opt/local/var/macports/distfiles/tDOM
 :notice:fetch --->  Attempting to fetch tdom-0.8.3.tgz from
 http://nue.de.distfiles.macports.org/macports/distfiles/tDOM
 eval curl fetch --ignore-ssl-cert --progress ui_progress_download
 {http://nue.de.distfiles.macports.org/macports/distfiles/tDOM/tdom-0.8.3.tgz}
 {/opt/local/var/macports/distfiles/tDOM/tdom-0.8.3.tgz.TMP}
 :debug:fetch Fetching distfile failed: The requested URL returned error:
 404 Not Found
 :notice:fetch --->  Attempting to fetch tdom-0.8.3.tgz from
 http://lil.fr.distfiles.macports.org/tDOM
 eval curl fetch --ignore-ssl-cert --progress ui_progress_download
 {http://lil.fr.distfiles.macports.org/tDOM/tdom-0.8.3.tgz}
 {/opt/local/var/macports/distfiles/tDOM/tdom-0.8.3.tgz.TMP}
 :debug:fetch Fetching distfile failed: The requested URL returned error:
 404 Not Found
 ...
 eval curl fetch --ignore-ssl-cert --progress ui_progress_download
 {https://github.com/downloads/tDOM/tdom/tdom-0.8.3.tgz}
 {/opt/local/var/macports/distfiles/tDOM/tdom-0.8.3.tgz.TMP}
 :debug:fetch Fetching distfile failed: SSL peer handshake failed, the
 server most likely requires a client certificate to connect
 }}}

 So, when not using the github portgroup, the fetch goes to
 "nue.de.distfiles.macports.org/macports/distfiles/tDOM//tdom-0.8.3.tgz"
 and NOT to github. Interestingly when using the portgroup "--ignore-ssl-
 cert" is used, but then the fetch fails. Later the fetch to github fails
 during handshake, although "--ignore-ssl-cert" is used.

 I would be curious, if the behavior would be different for you.

 When looking at the code of portfetch.tcl, i saw some desperate quoting
 and deprecated code. I would recommend to use the Tcl expand operator as
 shown in the following patch (not related to the issue).
 {{{
 --- /opt/local/libexec/macports/lib/port1.0/portfetch.tcl-orig  2015-10-24
 18:50:00.000000000 +0200
 +++ /opt/local/libexec/macports/lib/port1.0/portfetch.tcl       2015-10-24
 19:32:05.000000000 +0200
 @@ -536,7 +536,7 @@
              foreach site $urlmap($url_var) {
                  ui_notice "$UI_PREFIX [format [msgcat::mc "Attempting to
 fetch %s from %s"] $distfile $site]"
                  set file_url [portfetch::assemble_url $site $distfile]
 -                if {![catch {eval curl fetch $fetch_options {$file_url}
 {"${distpath}/${distfile}.TMP"}} result] &&
 +                if {![catch {curl fetch {*}$fetch_options $file_url
 "${distpath}/${distfile}.TMP"} result] &&
                      ![catch {file rename -force
 "${distpath}/${distfile}.TMP" "${distpath}/${distfile}"} result]} {
                      set fetched 1
                      break
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/49359#comment:9>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list