alexlarsson/xdg-app

Verify URIs when adding remotes

Closed this issue · 8 comments

$ xdg-app remote-add --user --no-gpg-verify local file:///`pwd`/repo/
$ xdg-app install --user local org.freedesktop.Platform.GStreamer.libav
error: Invalid 'file' URI: file://home/hadess/Projects/jhbuild/gnome-apps-nightly/repo/summary.sig

There's no equivalent to --no-gpg-verify for install.

Try:

xdg-app remote-add --user --no-gpg-verify local repo
xdg-app install --user local org.freedesktop.Platform.GStreamer.libav

Thats a weird error though, i install from local repos all the time without gpg, and i have not seen it.

The install part is wrong, it's missing the branch, in my case "1.4". But, it's really an error reporting problem. Using file:/// for the repo:

$ xdg-app remote-add --user --no-gpg-verify local file:///`pwd`/repo/
$ xdg-app install --user local org.freedesktop.Platform.GStreamer.libav 
error: Invalid 'file' URI: file://home/hadess/Projects/jhbuild/gnome-apps-nightly/repo/summary.sig
$ xdg-app install --user local org.freedesktop.Platform.GStreamer.libav 1.4
error: Runtime org.freedesktop.Platform.GStreamer.libav, branch 1.4 is already installed

When using a local path for the repo name:

$ xdg-app remote-add --user --no-gpg-verify local repo
$ xdg-app install --user local org.freedesktop.Platform.GStreamer.libav 
error: Can't find org.freedesktop.Platform.GStreamer.libav master in remote local
$ xdg-app install --user local org.freedesktop.Platform.GStreamer.libav 1.4
error: Runtime org.freedesktop.Platform.GStreamer.libav, branch 1.4 is already installed

Also, notice how it mangles the file URI.

Seems like you're specifying an invalid url:

echo file:///`pwd`/repo/
file:////vcs/gnome/gnome-apps-nightly/repo/

Still, i guess we could verify it at add-time.

I'm pretty sure I saw the same problem with file://pwd/... fwiw.

Seems to work here:

[jhbuild gnome-apps-nightly] xdg-app remote-add --user --no-gpg-verify local-test file://`pwd`/repo/
[jhbuild gnome-apps-nightly] xdg-app remote-ls --user local-test
org.gnome.Calculator
org.gnome.Calculator.Debug
....

You're right, not sure why I thought that.

This issue was moved to flatpak/flatpak#10