Page MenuHomeSoftware Heritage

nixguix: Add support for pseudo-URLs with a missing schema
Closed, MigratedEdits Locked


Some URLs in Nixpkgs don't have a schema when they should have http://. This is valid for Nix, so the Nixguix loader should accept them too.

For example:

MissingSchema: Invalid URL '': No schema supplied. Perhaps you meant
  File "swh/loader/package/", line 576, in load
    res = self._load_revision(p_info, origin)
  File "swh/loader/package/", line 713, in _load_revision
    dl_artifacts = self.download_package(p_info, tmpdir)
  File "swh/loader/package/", line 364, in download_package
    return [download(p_info.url, dest=tmpdir, filename=p_info.filename)]
  File "swh/loader/package/", line 79, in download
    response = requests.get(url, **params, timeout=timeout, stream=True)
  File "requests/", line 75, in get
    return request('get', url, params=params, **kwargs)
  File "requests/", line 60, in request
    return session.request(method=method, url=url, **kwargs)
  File "requests/", line 519, in request
    prep = self.prepare_request(req)
  File "requests/", line 462, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "requests/", line 313, in prepare
    self.prepare_url(url, params)
  File "requests/", line 387, in prepare_url
    raise MissingSchema(error)

Event Timeline

vlorentz triaged this task as Normal priority.Apr 26 2021, 2:18 PM
vlorentz created this task.
ardumont added a subscriber: ardumont.

I've moved around the parent task as the lister should be able to do something about this.

ardumont claimed this task.

The code is landed. It will be released at the same time as the lister/loader stack.
So let's close this.