Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: validation of urls fails by default when run offline #174

Closed
decathorpe opened this issue Feb 7, 2018 · 4 comments
Closed

cli: validation of urls fails by default when run offline #174

decathorpe opened this issue Feb 7, 2018 · 4 comments

Comments

@decathorpe
Copy link

When running the validation tool with default settings without internet connection, it chokes on validation of URLs (of course). This shouldn't be a fatal error (except maybe when --pedantic or --net is passed?). For example, this default behaviour prevents running upstream tests (meson test, or make check, etc.) during fedora package builds.

@ximion
Copy link
Owner

ximion commented Feb 7, 2018

Can you please specify what happens when you run the tool? Does it throw errors, or does it hang?

EDIT: From reading the report again, it seems like you are running appstreamcli without the --nonet flag. If so, pass that flag and any tests requiring network access will be disabled.

@decathorpe
Copy link
Author

That's exactly my point: I can't pass the --nonet flag without having to modify upstream's test definitions (in CMake or meson) downstream - which defeats the whole point of wanting to run the original upstream tests ...
For example, running meson test just times out after 30 seconds while validating an .appdata.xml file - it looks like appstreamcli hangs without internet access.

@ximion
Copy link
Owner

ximion commented Apr 3, 2018

I think this really should be addressed in some way in the respective upstream projects to pass --nonet if needed.
I can however, to make this easier to address for distributions and in case upstream always wants this enabled on their CI and doesn't want to provide a specific option to disable it, add an environment variable to disable network access as well.

ximion added a commit that referenced this issue Apr 3, 2018
See issue #174 for details on this.
@ximion ximion closed this as completed in c4f71f3 Apr 3, 2018
@decathorpe
Copy link
Author

The env variable looks like a good solution for now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants