Commit Graph

6274 Commits

Author SHA1 Message Date
Alexander Larsson
ecda7757bb Fix multiarch support
A typo was causing us to pass the app id as arch, breaking (at least)
multiarch support.
2020-11-20 15:08:58 +01:00
Alexander Larsson
ea116809d1 remote-metadata-update: Don't clean caches if nothing changed
This was causing us to never cache the summary in user installations
2020-11-20 14:01:42 +01:00
Alexander Larsson
07f36b2e90 Fix test-summaries on non-x86-64 2020-11-20 09:27:17 +01:00
Alexander Larsson
a43c617870 tests: Don't hardcode x86-64 2020-11-20 09:27:17 +01:00
Phaedrus Leeds
1f53e73bf3 dir: Fix spurious permission denied errors
Currently this error is happening on the eos3.9 dev branch of Endless
OS:

Nov 19 12:05:55 endless eos-updater-flatpak-installer[464]:
eos-updater-flatpak-installer: Couldn’t apply some flatpak update
actions for this boot: Error opening directory
'/root/.local/share/flatpak/app': Permission denied

The reason is that we have a check in flatpak_dir_list_unused_refs() to
check if the per-user installation exists and only try to list the refs
there if so, but the existence check falsely succeeds due to the systemd
sandboxing on eos-updater-flatpak-installer.service, and
flatpak_dir_list_refs() then fails in find_used_refs(). Specifically the
ProtectHome=yes systemd service option makes /root inaccessible, and due
to a bug in GLib[1] this makes g_file_query_exists() falsely return TRUE
for any paths under /root.

So, check for not found and permission denied errors rather than doing
an existence check, as we should be doing anyway to avoid a
time-of-check/time-of-use race, as explained in the
g_file_query_exists() documentation.

[1] https://gitlab.gnome.org/GNOME/glib/-/issues/1237
2020-11-20 09:16:57 +01:00
Alexander Larsson
09b470c0fd transaction: Add more details to the ABORTED error
This is reported when we reported an error to the user via
::operation-error signal and the app told us to not continue.

If this happens in some weird case and we see the results its nice
to have access to the original error message.
2020-11-19 18:31:40 +01:00
Alexander Larsson
d395763327 Update pofiles for release 1.9.1 2020-11-19 11:12:25 +01:00
Alexander Larsson
c12f4a5b21 Fix build/dist of API docs
We don't want to dist the stamp files, because they are not actually
created.

Also include the AuthenticatorRequest dbus interface in the docs
2020-11-19 11:01:03 +01:00
Alexander Larsson
d8e0d2785e Update NEWS for release 2020-11-19 09:25:04 +01:00
Alexander Larsson
f650c303e3 Don't auto-install sources for extensions
There was a bug in the extension point matcher which made it
install `org.gnome.Totem.Videosite.YouTubeDl.Sources` (in addition to
`org.gnome.Totem.Videosite.YouTubeDl`) for the `org.gnome.Totem.Videosite`
extension.

We just need to make sure we only match the extension prefix if there
is a single element in the extension name following the extension
name (i.e. '.YouTubeDl', not '.YouTubeDl.Sources').

This fixes https://github.com/flatpak/flatpak/issues/3973
2020-11-18 17:36:10 +01:00
Alexander Larsson
c4c57312ba tests: Un-redirect url after trying redirect
After the --redirect-url= test is finished it leaves the remote with a
different url, which is confusing the other tests.

In particular, at some point we remove the remote and add it back,
which gets us back to the old url, but at that point the summary (from
the newer url) has a later mtime than the old one so the old one keeps
getting used.

So, we unset the redirect and set back the old url. Also, the following test
had to be tweaked for this change.
2020-11-17 15:20:43 +01:00
Alexander Larsson
7043093a5f tests: Avoid unnecessarily recreating the summary file
We enforce --no-update-summary when we create test apps and
runtimes, and then we ensure we always manually call update_repo
after all modifications are done.

This means we save work avoiding summary updates, but it also means we
can do special handling in update_summary and guarantee that this is
the only place this happens. For example, we want this to work around
the mtime handling of summary updates.
2020-11-17 15:20:43 +01:00
Alexander Larsson
bc46f13327 Update NEWS for 1.9.1 2020-11-17 15:20:43 +01:00
Yuri Chornoivan
d60c90c3e6 Update Ukrainian translation 2020-11-17 13:58:34 +01:00
Rodhos
243bb11ce6 Spanish translation (#3966)
* Update spanish translation

* Update spanish translation
2020-11-16 17:41:57 +01:00
Ludovico de Nittis
a17224cd08 context: do not use a cast to convert a pointer to an integer
Building with Clang 11 shows a warning for the cast of the 'gpointer' to
'FlatpakFilesystemMode'.
This is due to '-Wpointer-to-int-cast' being now enabled by default.

common/flatpak-context.c:2144:13: warning: cast to smaller integer type
'FlatpakFilesystemMode' from 'gpointer' (aka 'void *')
[-Wvoid-pointer-to-enum-cast]
fs_mode = (FlatpakFilesystemMode) g_hash_table_lookup (context->filesystems, "host");
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
2020-11-16 11:24:38 +01:00
Alexander Larsson
c4d2d6f0a9 cli: Show branch in eol messages 2020-11-16 11:23:10 +01:00
Alexander Larsson
7eb5f4ddc8 cli-transaction: Better handling of EOL refs
We remember what action we took for EOLs, and for sub-refs (ie .Locale)
we reuse that.

Also, we show if eol:ed refs are pinned (as that makes them not be
auto-uninstalled), and we list the apps that use the eol:ed runtime
ref.

Example run:
```
Looking for updates…
Info: (pinned) org.gnome.Sdk.Compat.i386 is end-of-life, with reason:
   The GNOME 3.34 runtime is no longer supported as of 14th August 2020. Please ask your application developer to migrate to a supported platform.
Info: org.gnome.Platform is end-of-life, with reason:
   The GNOME 3.32 runtime is no longer supported as of 11th March 2020. Please ask your application developer to migrate to a supported platform.
Applications using this runtime:
   org.gnome.HexGL
```
2020-11-16 11:23:10 +01:00
Alexander Larsson
39333fdb33 dir: Minor optimization to find_used_ref()
Its commonly the case that a runtime lists itself as its runtime and/or sdk.
So, short circuit this in the finding of used refs.
2020-11-16 11:23:10 +01:00
Alexander Larsson
8f07945e57 dir: Extract flatpak_dir_list_app_refs_with_runtime()
This was open-coded in flatpak_dir_uninstall(), and we want to reuse
it. So, extract to helper.
2020-11-16 11:23:10 +01:00
Alexander Larsson
7b1b706f80 decomposed: Add flatpak_decomposed_id_is_subref_of()
This checks if e.g. `org.app.App.Locale` is a subref of `org.app.App`.
2020-11-16 11:23:10 +01:00
Alexander Larsson
866d471d37 build-repo: Switch order of subset and options columns
The subset column is typically short, while for eol options the
options column can be very long. So, it makes more sense to have the
options at the end.
2020-11-14 11:12:28 +01:00
Alexander Larsson
e6c0374939 tests: Add basic testing of subsets 2020-11-13 10:32:19 +01:00
Alexander Larsson
e5fac1feb8 Add docs for --subset=SUBSET 2020-11-13 10:32:19 +01:00
Alexander Larsson
60caa765de remote-list: Support showing the subset 2020-11-13 10:32:19 +01:00
Alexander Larsson
754e1fb5d4 Allow configuring the subset
This adds support to remote-add, remote-modify and the flatpakrepo file
parser.
2020-11-13 10:32:19 +01:00
Alexander Larsson
5496c4e4ef appstream: Pull the right branch if the remote has a subset configured 2020-11-13 10:32:19 +01:00
Alexander Larsson
a679fd5787 remote-repo: Properly list subset info
We don't user subsummary names, but the highlevel summary names.
2020-11-13 10:32:19 +01:00
Alexander Larsson
3c60facb03 summary: Handle subset appstream branches
In the main summaries we drop all the subset appstream branches.
In the subset summaries we use the relevant appstream branch and drop
the normal ones.

We also leave out the old compat branch completely from the subset
summaries because it will just be used for newer flatpaks that support
the new format.
2020-11-13 10:32:19 +01:00
Alexander Larsson
4739fc147c Generate appstream branches for subsets
For all the subsets in the repo, create an appstream2/$subset-$arch branch
with the appstreams of the apps in that subset.
2020-11-13 10:32:19 +01:00
Alexander Larsson
9a7b33e4ed summary: Correctly extract the subset
We want to split $subset-$arch on the last dash, not the first,
because arch can't have dashes, while subset could.
2020-11-13 10:32:19 +01:00
Alexander Larsson
bf5329aa69 table-printer: Add append_with_comma_unique
This means we can ensure a flag is only added once
2020-11-13 10:32:19 +01:00
Alexander Larsson
cbe8e8ca36 build-export: Support --subset to add subsets 2020-11-13 10:32:19 +01:00
Alexander Larsson
e4c52df63f build-commit-from: Remove leftover spew 2020-11-13 10:32:19 +01:00
Yuri Chornoivan
de4bfa890b Update Ukrainian translation 2020-11-11 09:06:38 +01:00
Phaedrus Leeds
d406cf0ed7 installation: Include renamed apps when listing updates
Currently if an app has been renamed and you run "flatpak update" you
will be prompted to decide whether to install the new name of the app
(and uninstall the existing one). However, in such a situation
flatpak_installation_list_installed_refs_for_update() does not return
the app, and therefore gnome-software doesn't see any updates available
(except in the case where the installed commit is older than the commit
with the eol-rebase metadata).

So include end-of-life-rebased apps in the returned list. Patches to
make gnome-software update such apps properly are forthcoming.

I checked that the included unit test only passes with this patch to
libflatpak.
2020-11-11 09:00:39 +01:00
Phaedrus Leeds
f2a3e28544 Merge pull request #3951 from Rodhos/spanish-translation
Update spanish translation
2020-11-10 15:43:56 -08:00
Rodhos
268024c399 Update spanish translation 2020-11-10 15:39:36 +01:00
Piotr Drąg
4dff53ea2a Update POTFILES.in 2020-11-10 15:06:56 +01:00
Alexander Larsson
4f793a45c2 Remove some spammy debug spew
as_store_find_app() was constantly spewing things you don't really
need to see.
2020-11-10 14:32:13 +01:00
Alexander Larsson
d4dd663c88 flatpak-dir-private.h: re-indent function declarations 2020-11-10 14:32:13 +01:00
Alexander Larsson
7ab62ac3fb decomposed: Convert some more FlatpakDir apis to FlatpakDecomposed 2020-11-10 14:32:13 +01:00
Alexander Larsson
674cc1a60a decomposed: Convert more FlatpakDir APIs to use FlatpakDecomposed 2020-11-10 14:32:13 +01:00
Alexander Larsson
b111965640 decomposed: Convert flatpak_dir_read/set_active() 2020-11-10 14:32:13 +01:00
Alexander Larsson
3d29c6ee5c decomposed: Convert flatpak_load_deploy_data() to FlatpakDecomposed 2020-11-10 14:32:13 +01:00
Alexander Larsson
8a32656380 Remove unused flatpak_[de]compose_ref functions
We now all use the FlatpakDecompose versions.
2020-11-10 14:32:13 +01:00
Alexander Larsson
adb3b61f0a decomposed: Return FlatpakDecomposed from flatpak_dir_find_remote_ref() 2020-11-10 14:32:13 +01:00
Alexander Larsson
ed6ea2c97d decomposed: Remove last users of flatpak_compose_ref() 2020-11-10 14:32:13 +01:00
Alexander Larsson
e633fe0d81 Remove last uses of flatpak_decompose_ref() 2020-11-10 14:32:13 +01:00
Alexander Larsson
f7593cd7b6 appstream: Use FlatpakDecomposed when generating 2020-11-10 14:32:13 +01:00