flatpak / flatpak-builder

Tool to build flatpaks from source
GNU Lesser General Public License v2.1
142 stars 93 forks source link

screenshots folder is no longer created in the builddir #573

Open tytan652 opened 11 months ago

tytan652 commented 11 months ago

Checklist

flatpak-builder version

1.3.5

Flatpak version

1.15.4

How to reproduce

Use the flatpak/flatpak-github-actions with a mirror-screenshots-url set.

Expected Behavior

The build pass.

Actual Behavior

The build fails:

Committing screenshots...
Uploading artifact...
Starting artifact upload
For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging
Artifact name is valid!
/usr/bin/ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots
error: opendir(flatpak_app/screenshots): No such file or directory
/__w/_actions/flatpak/flatpak-github-actions/0ab9dd6a6afa6fe7e292db0325171660bf5b6fdf/flatpak-builder/dist/index.js:7912
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Error: The process '/usr/bin/ostree' failed with exit code 1
    at ExecState._setResult (/__w/_actions/flatpak/flatpak-github-actions/0ab9dd6a6afa6fe7e292db0325171660bf5b6fdf/flatpak-builder/dist/index.js:7912:25)
    at ExecState.CheckComplete (/__w/_actions/flatpak/flatpak-github-actions/0ab9dd6a6afa6fe7e292db0325171660bf5b6fdf/flatpak-builder/dist/index.js:7895:18)
    at ChildProcess.<anonymous> (/__w/_actions/flatpak/flatpak-github-actions/0ab9dd6a6afa6fe7e292db0325171660bf5b6fdf/flatpak-builder/dist/index.js:7789:27)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

Additional Information

bbhtt commented 11 months ago

The old location was removed in https://github.com/flatpak/flatpak-builder/commit/e3e12335e86cd13c4b0e296956dff292946aa1c3#diff-81460d46a2933ba7be79c8a9e9b7df7c28c7b6d867a80ae5436bbafd9108dbdaL2792 and https://github.com/flatpak/flatpak-builder/commit/a94517b5a10d17e9f412950623f831c8db0a5e30#diff-a5328208d48d74071a8dbe8dda818b3188ad0cc1bdcd491761d097bd5c2c073dL958 It is now saved to builddir/share/app-info/media.

TingPing commented 9 months ago

For future reference the original logic was here: https://github.com/hughsie/appstream-glib/blob/d26446e437c9b82f3267ca22874f86f4a1954638/client/as-util.c#L3536-L3653

The media directory is not the same contents so we'll might have to recreate that?