Eos-update-notifier and flatpak

Hello, can the updater also check flatpak?

The AdditionalEosUpdater variable is an advanced feature. It may contain the name of your external script. The script is meant for performing other tasks related to updating your software. It is called right after updating Arch, EndeavourOS, and possibly AUR packages. One useful example of this is to have a script that updates your flatpacks. The script gets the name of a log file as a parameter and can add log information if needed. The script should provide an exit code similar to the checkupdates program (0, 1 or 2).

if I understand the part correctly you would have to write a script for it?

1 Like

I do not believe it does. You can update first and then run flatpak update and see. . . .

This is a more or less experimental feature in eos-update-notifier, but it should basically work if you add a proper command to the variable.
The command can be e.g. a script, or e.g. a program written in C language.

So you are fully in charge of what the command does, and eos-update-notifier is simply able to call it, and use its return code as explained.

1 Like

i’m looking at the script right now, just don’t have any idea how to query flatpack without it doing an update

I’m not using flatpak so don’t know about that.
In principal you could do the update anyway, but the only small issue is the return value.
Can you parse the flatpak command output to see if there were updates? Then you would know what value to return.

the update command updates the packages immediately and does not return a value

Question, since flatpak updates are safe, why not just auto-update them? I have a systemd service/timer that updates my flatpaks automatically.

1 Like

Doesn’t it show any output on the terminal?

And the suggestion by @dalto sounds reasonable.

[don@Valhalla ~]$ flatpak update ; echo $?   
Looking for updates…
Nothing to do.
[don@Valhalla ~]$

When it finds nothing to do, $? returns zero. If it finds updates, $? returns non-zero



but if I understand the script correctly, the updates do not install automatically but only when you click on the notification?
The command updates directly when there are updates?

You can configure how eos-update-notifier shows updates, see file
/etc/eos-update-notifier.conf, variables

  • ShowHowAboutUpdates
  • ShowWhatAboutUpdates

I think using those configuration variables you can make eos-update-notifier suit better for adding the flatpak update.

But there are other alternatives entirely. For example, you could write a script that runs

  • UpdateInTerminal
  • flatpak update (maybe with the help of command RunInTerminal?)

and use a systemd service timer to run your script, like @dalto suggested.

yesterday I tried to work a little on the existing script, but the whole thing is a little opaque.
Will the days still a little tinker with it.

You could try flatpak list --columns=name,application,active,latest and then compare the active commit to the latest commit? I don’t have any out-of-date flatpaks to test to see if that would work.

i had the same problem yesterday when i wanted to test my changes in the update script :slight_smile: