canonical / craft-archives

A library for handling archives/repositories in Craft applications
https://canonical-craft-archives.readthedocs-hosted.com
GNU Lesser General Public License v3.0
0 stars 8 forks source link

"url" field no longer accepts local paths #92

Closed tigarmo closed 1 year ago

tigarmo commented 1 year ago

Bug Description

Once we changed the field type to AnyUrl it stopped supporting localpaths, which breaks at least one user from Snapcraft.

To Reproduce

Try to use a file:// "url" for the url field in a package-repository model specification (yaml).

part yaml

package-repositories:
  - key-id: <elided>
    path: .
    type: apt
    url: file:///tmp/tmp.JprehK6wsY/repo

Relevant log output

1 validation error for PackageRepositoryApt
url
  URL host invalid (type=value_error.url.host)