{"action":"opened","issue":{"url":"https://api.github.com/repos/LLNL/spack/issues/3969","repository_url":"https://api.github.com/repos/LLNL/spack","labels_url":"https://api.github.com/repos/LLNL/spack/issues/3969/labels{/name}","comments_url":"https://api.github.com/repos/LLNL/spack/issues/3969/comments","events_url":"https://api.github.com/repos/LLNL/spack/issues/3969/events","html_url":"https://github.com/LLNL/spack/issues/3969","id":223801519,"number":3969,"title":"Better Error Messages for Failed curl","user":{"login":"citibeth","id":1924215,"avatar_url":"https://avatars2.githubusercontent.com/u/1924215?v=3","gravatar_id":"","url":"https://api.github.com/users/citibeth","html_url":"https://github.com/citibeth","followers_url":"https://api.github.com/users/citibeth/followers","following_url":"https://api.github.com/users/citibeth/following{/other_user}","gists_url":"https://api.github.com/users/citibeth/gists{/gist_id}","starred_url":"https://api.github.com/users/citibeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citibeth/subscriptions","organizations_url":"https://api.github.com/users/citibeth/orgs","repos_url":"https://api.github.com/users/citibeth/repos","events_url":"https://api.github.com/users/citibeth/events{/privacy}","received_events_url":"https://api.github.com/users/citibeth/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-24T12:23:11Z","updated_at":"2017-04-24T12:23:11Z","closed_at":null,"body":"When Spack fails because `curl` couldn't fetch due to an outdated URL, it currently produces the error message below.  This is cryptic for the typical user encountering such an error --- i.e. someone who is trying out Spack for the first time on an older system; for example, Ubuntu 12.  That is a place where we could lose users before they've even really had a chance to try Spack.\r\n\r\nSpack needs to be more pro-active about detecting this problem and giving a meaningful error message.\r\n\r\n```\r\nspack install hdf5\r\n==> zlib is already installed in /home/mem341/spack/opt/spack/linux-ubuntu16-x86_64/gcc-5.4.0/zlib-1.2.11-zn23nl6w64spjwau3vgkaqp4f4vi2uba\r\n==> Installing util-macros\r\n==> Fetching https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2\r\ncurl: (1) Protocol https not supported or disabled in libcurl\r\n==> Fetching from https://www.x.org/archive/individual/util/util-macros-1.19.1.tar.bz2 failed.\r\n==> Error: FetchError: All fetchers failed for util-macros-1.19.1-mj6veg4t5dpyrcfa6zgdc5hqojnyczat\r\n/home/mem341/spack/lib/spack/spack/package.py:919, in do_fetch:\r\n     892      def do_fetch(self, mirror_only=False):\r\n     893          \"\"\"\r\n     894          Creates a stage directory and downloads the tarball for this package.\r\n     895          Working directory will be set to the stage directory.\r\n     896          \"\"\"\r\n     897          if not self.spec.concrete:\r\n     898              raise ValueError(\"Can only fetch concrete packages.\")\r\n     899  \r\n     900          start_time = time.time()\r\n     901          if spack.do_checksum and self.version not in self.versions:\r\n     902              tty.warn(\"There is no checksum on file to fetch %s safely.\" %\r\n     903                       self.spec.format('$_$@'))\r\n     904  \r\n     905              # Ask the user whether to skip the checksum if we're\r\n     906              # interactive, but just fail if non-interactive.\r\n     907              ck_msg = \"Add a checksum or use --no-checksum to skip this check.\"\r\n     908              ignore_checksum = False\r\n     909              if sys.stdout.isatty():\r\n     910                  ignore_checksum = tty.get_yes_or_no(\"  Fetch anyway?\",\r\n     911                                                      default=False)\r\n     912                  if ignore_checksum:\r\n     913                      tty.msg(\"Fetching with no checksum.\", ck_msg)\r\n     914  \r\n     915              if not ignore_checksum:\r\n     916                  raise FetchError(\"Will not fetch %s\" %\r\n     917                                   self.spec.format('$_$@'), ck_msg)\r\n     918  \r\n  >> 919          self.stage.fetch(mirror_only)\r\n     920  \r\n     921          self._fetch_time = time.time() - start_time\r\n     922  \r\n     923          if spack.do_checksum and self.version in self.versions:\r\n     924              self.stage.check()\r\n     925  \r\n     926          self.stage.cache_local()\r\n```\r\n"}}
{"actor":{"display_login":"citibeth"}}