Skip to content

flatpak-coredumpctl: Add flatpak-coredumpctl list subcommand - #6705

Merged
bbhtt merged 4 commits into
flatpak:mainfrom
electricbrass:coredumpctl-list
Jul 5, 2026
Merged

bbhtt merged 4 commits into
flatpak:mainfrom
electricbrass:coredumpctl-list

Conversation

@electricbrass

@electricbrass electricbrass commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

This is an updated version of the feature that was removed from #6677, and is stacked on the current version of that PR.

flatpak-coredumpctl list lists all coredumps from flatpaks, filtering coredumpctl's list using the same check as the existing debug functionality (does the path start with /app or /newroot). The format matches coredumpctl's as closely as possible, with one exception. Inaccessible and missing coredumps are hidden unless the --show-inaccessible option is used. If this is not wanted, I can remove it, but personally I find that I almost never want to see those and that it's just extra noise in coredumpctl's output.

The existing debug functionality has been moved to the debug subcommand. This aligns with the interface of coredumpctl.

Fixes: #2002

Comment thread scripts/flatpak-coredumpctl Outdated
Comment thread scripts/flatpak-coredumpctl
Comment thread scripts/flatpak-coredumpctl

@swick swick left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Seems fine, but a few commits should probably be merged (the ones which fix up the previously newly added feature).

Comment thread scripts/flatpak-coredumpctl
Comment thread scripts/flatpak-coredumpctl
@electricbrass
electricbrass force-pushed the coredumpctl-list branch 2 times, most recently from 4cbe906 to 942e7c8 Compare June 23, 2026 09:42
Comment thread scripts/flatpak-coredumpctl Outdated
Comment thread scripts/flatpak-coredumpctl Outdated
Comment thread scripts/flatpak-coredumpctl
@bbhtt

bbhtt commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Last two comments should get rid of the remaining typecheck errors. You can squash the first one with flatpak-coredumpctl: Use a pager for list output and the next one as a separate commit to fix the typecheck.

@electricbrass
electricbrass force-pushed the coredumpctl-list branch 2 times, most recently from ee75bb4 to 2047f6f Compare June 27, 2026 01:27
@bbhtt

bbhtt commented Jun 27, 2026 •

Copy link
Copy Markdown
Collaborator

I feel like the first commit and commits 3 to 6 should be squashed into one as it is introducing a new subcommand and new functionality entirely. The next ones are just improving on that new functionality which could be done from the get go. It causes an oddity that in 6c847d7 the list_dumps() function is not doing anything except return 0. But this is just my opinion.

Otherwise seems fine to me now.

@electricbrass

Copy link
Copy Markdown
Contributor Author

Sure, can do. I did it that way just because you'd previously said that adding the new stuff to argparse at the same time made it difficult to review.

@bbhtt

bbhtt commented Jun 27, 2026

Copy link
Copy Markdown
Collaborator

I probably wasn't clear enough. I think squashing those will better as there will be at least one commit in the history where list will exist but will not do anything.

Reworks the interface of flatpak-coredumpctl to use subcommands
similar to those of coredumpctl. The new list subcommand is currently
non-functional, but will list all store coredumps from flatpak
applications, and the previous debugger functionality has been moved to
the debug subcommand.

flatpak-coredumpctl: Implement basic functionality for 'list' subcommand

Resolves flatpak#2002: 'flatpak-coredumpctl list' now lists coredumps
in a format similar to coredumpctl, except that it skips inaccessible
coredumps by default

flatpak-coredumpctl: Use a pager for list output

These less flags don't perfectly match coredumpctl because it uses
systemd's pager instead of less, but it's close enough

flatpak-coredumpctl: Match coredumpctl's text styling

The column titles are now underlined and missing/inaccessible coredumps
are grayed out.
This is probably just a little overengineered for what is needed, but I
wanted to make it easy to expand in the future if needed, and it is
still fairly minimal.

flatpak-coredumpctl: Add matches argument to list subcommand
coredumpctl is required for both subcommands, and likely will be for any
others added in the future, so we should just check for it in one place
at the start.
This constraints the scope of the variables within instead of
unnecessarily creating global variables, and it makes it easier to keep
only a single sys.exit
Fixes a type check error with mypy
Other members had their type hints moved to the
class body as well for consistency
@bbhtt
bbhtt added this pull request to the merge queue Jul 5, 2026
Merged via the queue into flatpak:main with commit aeb3783 Jul 5, 2026
11 checks passed
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.

Make flatpak-coredumpctl options closer to coredumpctl

3 participants