Skip to content

Conversation

@alimirjamali
Copy link
Contributor

@alimirjamali alimirjamali force-pushed the flatpak-update-support branch from 5646bd3 to b1b49de Compare September 5, 2025 23:04
@codecov-commenter
Copy link

codecov-commenter commented Sep 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.98%. Comparing base (b479add) to head (a22d5b2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #200   +/-   ##
=======================================
  Coverage   72.98%   72.98%           
=======================================
  Files          10       10           
  Lines        1155     1155           
=======================================
  Hits          843      843           
  Misses        312      312           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alimirjamali alimirjamali force-pushed the flatpak-update-support branch from b1b49de to a22d5b2 Compare September 6, 2025 13:34
Copy link
Member

@marmarek marmarek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the two specific comments below, this should be a bit better integrated. At the very least regarding outcome reporting - it does make a difference if there were some updates or not (for example, if there were no updates, updater will not propose restarting relevant app qubes). Right now update plugins don't return anything (implicit None). Maybe consider return value similar to normal updater if a plugin returns not None?

Distro agnostic plugin to update system-wide flatpaks
"""

if not Path("/usr/bin/flatpak"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean .exists()? but then, I don't think you can assume it's always /usr/bin, especially with NixOS existing out there...
We use distutils.spawn.find_executable() in various places

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use distutils.spawn.find_executable() in various places

Where? distutils is deprecated since version 3.10, removed in version 3.12.

Anyways, I will replace it with appropriate supported lib (i.e. shutil.which).

Comment on lines +34 to +37
if not subprocess.Popen(
["flatpak", "remote-ls", "--system", "--updates"],
stdout=subprocess.PIPE
).stdout.read().decode().strip():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should consider exit code (and report as update failure, not "no updates". subprocess.check_output may be helpful.

@marmarek
Copy link
Member

marmarek commented Sep 8, 2025

And one more thing, plugins run before normal update. It might be better to run flatpak updates after updating flatpak itself... Idk how to do that best. Either not use plugin for this (which will make progress reporting later easier), or add some option to run plugins after update (plugins_post dir?)

@alimirjamali alimirjamali marked this pull request as draft September 19, 2025 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants