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

flatpak-builder sometimes creates duplicate groups in metadata

Open bbhtt opened this issue 1 year 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.4.4

Flatpak version

1.15.10

How to reproduce

When a locale extension is manually specified through add-extensions with the same base ID as the app, Flatpak Builder should skip creating it's own locale extension.

Having both causes duplicate groups to be written in the metadata file.

app-id: org.example.test
runtime: org.freedesktop.Platform
runtime-version: '24.08'
sdk: org.freedesktop.Sdk
add-extensions:
 org.example.test.Locale:
  directory: share/runtime/locale
  autodelete: true
  locale-subset: true
cleanup-commands:
  - mkdir -p ${FLATPAK_DEST}/share/runtime/locale

causes the metadata to be:

[Application]
name=org.example.test
runtime=org.freedesktop.Platform/x86_64/24.08
sdk=org.freedesktop.Sdk/x86_64/24.08

[Extension org.example.test.Locale]
directory=share/runtime/locale
autodelete=true
locale-subset=true

[Extension org.example.test.Locale]
directory=share/runtime/locale
autodelete=true
locale-subset=true

[Build]
built-extensions=org.example.test.Locale;

which has two duplicate groups.

Expected Behavior

Disable Locale extension creation and don't write duplicate groups

Actual Behavior

Writes duplicate groups in metadata

Additional Information

N/A

bbhtt avatar Sep 25 '24 16:09 bbhtt