"url" field no longer accepts local paths
Metadata
Current evaluation
APT repository URLs once again accept local file:// paths; the fix was merged in #93 via commit 6f787ea.
Resolution: closed resolved
Reason: The regression was fixed by allowing FileUrl alongside AnyUrl for APT repository URLs. PR canonical/craft-archives#93 resolved it in commit 6f787ea.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
Once we changed the field type to `AnyUrl` it stopped supporting localpaths, which breaks [at least one user](https://github.com/snapcore/snapcraft/issues/4224#issuecomment-1614401055) from Snapcraft.
### To Reproduce
Try to use a `file://` "url" for the `url` field in a package-repository model specification (yaml).
### part yaml
```shell
package-repositories:
- key-id: <elided>
path: .
type: apt
url: file:///tmp/tmp.JprehK6wsY/repo
```
### Relevant log output
```shell
1 validation error for PackageRepositoryApt
url
URL host invalid (type=value_error.url.host)
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | APT repository URLs once again accept local file:// paths; the fix was merged in #93 via commit 6f787ea. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in canonical/craft-archives#93 (commit 6f787ea): APT repository URLs again accept local file:// paths after the AnyUrl change caused a regression. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. Validation logic was updated to accept local file paths, resolving the regression introduced by switching to the AnyUrl type. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution or fix. A validation error occurred when using local file paths with the AnyUrl field type, but no comments or pull requests were linked to address the bug. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. Changing the url field to AnyUrl causes validation failures for local file:// paths in package repository configurations. Closed without a fix or follow-up. |
Update history
No update history recorded yet.
Related work
-
Likely Fixed By:
canonical/craft-archives#93
(confidence 99%)
Commit 6f787ea introduced support for file:// repository URLs.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #93 repo: permit file URLs | craft-archives | merged | Merged PR #93 restored APT repository support for local file:// URLs, fixing canonical/craft-archives#92 in commit 6f787ea. |