Skip to content

flatpak: Migrate flatpakref handling to FlatpakTransaction

Phaedrus Leeds requested to merge mwleeds/fix-deprecated-install into main

Currently we use flatpak_installation_install_ref_file() when parsing a .flatpakref file for displaying it to the user, but that function is deprecated in favor of flatpak_transaction_add_install_flatpakref(). So, migrate to the replacement function.

This is unfortunately not a simple migration, mainly because while the deprecated function only adds the appropriate remote but doesn't install the thing, by default a FlatpakTransaction will execute the install operation unless aborted. So, abort the transaction so that we have enough information to display the app to the user and let them decide whether to install it.

Unlike the deprecated API, the replacement API handles the RuntimeRepo= key of the flatpakref file properly, so we are getting that bug fix in this change.

Edited by Phaedrus Leeds

Merge request reports