flatpak-build-import-bundle - Linux


Overview

flatpak-build-import-bundle imports a reference to a Flatpak bundle so it can be referenced in future builds. This is useful for importing external modules or dependencies that are not available in the repository.

Syntax

flatpak-build-import-bundle [OPTIONS] --app-id=<string> --source=<path> [--user]

Options/Flags

  • --app-id: The application ID of the Flatpak bundle to import.
  • --source: The path to the Flatpak bundle file (.flatpakref).
  • --user: Import the bundle for the current user only.

Examples

Import a Flatpak bundle called org.example.MyModule from the path /path/to/my-module.flatpakref for all users:

flatpak-build-import-bundle --app-id=org.example.MyModule --source=/path/to/my-module.flatpakref

Import a Flatpak bundle for the current user only:

flatpak-build-import-bundle --app-id=org.example.MyModule --source=/path/to/my-module.flatpakref --user

Common Issues

  • Ensure that the Flatpak bundle is a valid .flatpakref file.
  • Make sure the application ID specified in --app-id matches the ID of the bundle being imported.
  • If importing for the current user fails, check that the user has sufficient permissions to install Flatpak bundles.

Integration

flatpak-build-import-bundle can be used in conjunction with other Flatpak build commands to create complex build pipelines. For example, you could use it to import a utility library that is not available in the repository:

flatpak-build-import-bundle --app-id=org.example.MyModule --source=/path/to/my-module.flatpakref
flatpak-build-app --runtime=org.freedesktop.Sdk \
  --bundle-repo=file:///path/to/my-repo \
  --app-id=org.example.MyApp \
  --source=/path/to/my-app \
  --deps-blob=org.example.MyModule

Related Commands

  • flatpak-build-app: Build a Flatpak application from source code.
  • flatpak-build-bundle: Create a Flatpak bundle from an existing application.
  • flatpak-build-repo: Create a Flatpak repository.