mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-24 16:57:42 -04:00
create-usb: Include partial commits
Commits32194f2d2andb8d2196c2made create-usb detect partially installed commits and omit them except when --allow-partial is specified (and in the case of extensions of related refs omit them unconditionally). The reasoning was that if on the other computer using the USB for an installation you need a different subpath of a commit (such as a different language of a locale extension), the installation will fail. But in most real world cases the users on both ends will speak the same language so it will not often be an issue. Also, if you are offline and have only your own language's subpaths for your locale extensions, it makes sense to put them on the USB because you have no way to get the full locale extension and the receiver probably wants the same subpath as you. The way "flatpak create-usb" is most often used in Endless is via gnome-software which calls it under the hood. So while we could have it pass --allow-partial that would not accomplish much; it doesn't solve the problems above. For the online case we may want to attempt to download the full locale extensions before copying to the USB, but that is for a later commit. Fixes https://github.com/flatpak/flatpak/issues/3491
This commit is contained in:
committed by
Alexander Larsson
parent
0552c4cbe4
commit
bd04b09f9b
@@ -123,7 +123,8 @@ add_related (GHashTable *all_refs,
|
||||
return FALSE;
|
||||
|
||||
if (flatpak_deploy_data_has_subpaths (deploy_data) && !opt_allow_partial)
|
||||
return flatpak_fail (error, _("Related ref '%s' is only partially installed"), ref);
|
||||
g_printerr (_("Warning: Related ref ‘%s’ is partially installed. Use --allow-partial to suppress this message.\n"),
|
||||
ref);
|
||||
|
||||
commit = flatpak_deploy_data_get_commit (deploy_data);
|
||||
|
||||
@@ -161,9 +162,8 @@ add_related (GHashTable *all_refs,
|
||||
|
||||
if (flatpak_deploy_data_has_subpaths (ext_deploy_data) && !opt_allow_partial)
|
||||
{
|
||||
g_printerr (_("Warning: Omitting related ref ‘%s’ because it is partially installed.\n"),
|
||||
g_printerr (_("Warning: Related ref ‘%s’ is partially installed. Use --allow-partial to suppress this message.\n"),
|
||||
ext->ref);
|
||||
continue;
|
||||
}
|
||||
|
||||
ext_remote = flatpak_deploy_data_get_origin (ext_deploy_data);
|
||||
@@ -642,8 +642,8 @@ flatpak_builtin_create_usb (int argc, char **argv, GCancellable *cancellable, GE
|
||||
return FALSE;
|
||||
|
||||
if (flatpak_deploy_data_has_subpaths (deploy_data) && !opt_allow_partial)
|
||||
return flatpak_fail (error,
|
||||
_("Ref '%s' is only partially installed"), installed_ref);
|
||||
g_printerr (_("Warning: Ref ‘%s’ is partially installed. Use --allow-partial to suppress this message.\n"),
|
||||
installed_ref);
|
||||
|
||||
commit = flatpak_deploy_data_get_commit (deploy_data);
|
||||
c_s = commit_and_subpaths_new (commit, NULL);
|
||||
|
||||
@@ -163,8 +163,9 @@
|
||||
<term><option>--allow-partial</option></term>
|
||||
|
||||
<listitem><para>
|
||||
Allow exporting partially installed commits, for example locale extensions without all languages. These can cause
|
||||
problems when installing them, for example if the language config is different on the installing side.
|
||||
Don't print a warning when exporting partially installed commits, for example locale extensions without all
|
||||
languages. These can cause problems when installing them, for example if the language config is different
|
||||
on the installing side.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user