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

Skip some checks for baseapps, extensions and console applications #211

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

bbhtt
Copy link
Contributor

@bbhtt bbhtt commented Nov 24, 2023

This is a workaround until flatpak-builder-lint becomes fully flathub.json aware for builddir and repo checks

Baseapps and extensions should at minimum install a valid (passing appstream-util validate <file>) appdata file to be able to skip checks.

Eg baseapp with no appdata file https://github.com/flathub/org.mozilla.firefox.BaseApp will now error on:

# For baseapp

x flatpak-builder-lint builddir build
{
    "errors": [
        "appstream-missing-appinfo-file",
        "appstream-metainfo-missing"
    ]
}

→ flatpak-builder-lint repo repo 
/tmp/tmp40ksno6l
{
    "errors": [
        "appstream-missing-appinfo-file",
        "appstream-metainfo-missing",
        "appstream-missing-appinfo"
    ]
}

# For extension

→ flatpak-builder-lint builddir build                                            
{
    "errors": [
        "appstream-metainfo-missing",
        "appstream-missing-appinfo-file"
    ]
}

Don't need to check for extensions in check_repo because get_primary_refs returns refs starting with app/ only, but extensions start with runtime/

@bbhtt bbhtt marked this pull request as draft November 24, 2023 18:23
@bbhtt bbhtt force-pushed the baseapp-exempt branch 7 times, most recently from 4e1b797 to 0e9192c Compare November 27, 2023 06:50
@bbhtt
Copy link
Contributor Author

bbhtt commented Nov 27, 2023

Added support for console applications too.

I don't see a way to not reach the appstream.is_console() check for icons for tests. Maybe there's some way to create the files on the fly using mock. I added some empty files to make them pass.

@bbhtt bbhtt force-pushed the baseapp-exempt branch 3 times, most recently from 8235a25 to fb3eb80 Compare November 27, 2023 09:02
This is a workaround until flatpak-builder-lint becomes fully
flathub.json aware for builddir and repo checks

Baseapps, extensions or console applications should at minimum install
a valid appdata file to be able to skip checks

Baseapps and extensions can skip through "appstream-failed-validation"
and "appstream-missing-icon-file" while console applications can skip
"appstream-missing-icon-file"
@bbhtt
Copy link
Contributor Author

bbhtt commented Nov 27, 2023

I don't see a way to not reach the appstream.is_console() check for icons for tests.

Figured out a way by moving it in check repo and check_build

@bbhtt bbhtt changed the title Skip some appstream checks for baseapps and extensions Skip some checks for baseapps, extensions and console applications Nov 27, 2023
@bbhtt bbhtt marked this pull request as ready for review November 27, 2023 12:03
@barthalion barthalion merged commit 83610e6 into flathub-infra:master Nov 28, 2023
1 check passed
@bbhtt bbhtt deleted the baseapp-exempt branch November 28, 2023 12:42
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

Successfully merging this pull request may close these issues.

2 participants