flatpak-builder icon indicating copy to clipboard operation
flatpak-builder copied to clipboard

screenshots folder is no longer created in the builddir

Open tytan652 opened this issue 2 years ago • 2 comments

Checklist

  • [X] I agree to follow the Code of Conduct that this project adheres to.
  • [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

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

  • https://github.com/flatpak/flatpak-github-actions/issues/168 was created on the actions repo.
  • I know that Fedora has already a bad stance with how they provide flatpak-builder version by providing unstable version.
  • flatpak-builder was creating the screenshot directory in builddir in version 1.3.3 (the one that was used to publish OBS Studio 30.0.0) but it looks like that got changed by libappstream port for some reason

tytan652 avatar Dec 10 '23 16:12 tytan652

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.

bbhtt avatar Dec 11 '23 03:12 bbhtt

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?

TingPing avatar Feb 21 '24 19:02 TingPing