summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2020-06-11 17:39:06 -0700
committerAlexander Larsson <alexander.larsson@gmail.com>2020-06-15 10:08:34 +0200
commitbd04b09f9b1acd9ef8ec943c385b4c3c3d2207a7 (patch)
tree15b0f205630eda2204166f4a37e2033d2076ee61
parent0552c4cbe44eb8483fd9f16b0656ff7b36f54d46 (diff)
downloadflatpak-bd04b09f9b1acd9ef8ec943c385b4c3c3d2207a7.tar.gz
create-usb: Include partial commits
Commits 32194f2d2 and b8d2196c2 made 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
-rw-r--r--app/flatpak-builtins-create-usb.c10
-rw-r--r--doc/flatpak-create-usb.xml5
2 files changed, 8 insertions, 7 deletions
diff --git a/app/flatpak-builtins-create-usb.c b/app/flatpak-builtins-create-usb.c
index d83ace34..7d2ddd97 100644
--- a/app/flatpak-builtins-create-usb.c
+++ b/app/flatpak-builtins-create-usb.c
@@ -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);
diff --git a/doc/flatpak-create-usb.xml b/doc/flatpak-create-usb.xml
index e6b0f496..0d0b6217 100644
--- a/doc/flatpak-create-usb.xml
+++ b/doc/flatpak-create-usb.xml
@@ -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>