Commit Graph

13 Commits

Author SHA1 Message Date
razzeee
6b6fdda2f6 flatpak-coredumpctl: Guard against unexpected coredumpctl output
The bare tuple unpack 'executable, = re.findall(...)' raises a cryptic
ValueError if the pattern matches zero or more than one line. Replace it
with an explicit length check and a clear error message.

Also pass count=1 to str.replace() so a /newroot prefix is only stripped
once and /app/ paths are passed through unchanged.
2026-06-08 12:10:42 +00:00
Mia McMahill
8c418fa4b9 flatpak-coredumpctl: Use subprocess.PIPE instead of NamedTemporaryFile 2026-05-27 14:48:22 +00:00
Mia McMahill
61272df8cd flatpak-coredumpctl: Require Python 3.10 or greater at runtime 2026-05-27 14:48:22 +00:00
Mia McMahill
b6ceab85c3 flatpak-coredumpctl: Pass tuple to startswith instead of two calls 2026-05-27 14:48:22 +00:00
Mia McMahill
4bcd6cd48b flatpak-coredumpctl: Pass description as argparse description argument
This prevents it from getting printed twice in some circumstances
2026-05-27 14:48:22 +00:00
Mia McMahill
8e5d4c1183 flatpak-coredumpctl: Exit with return code of flatpak_command 2026-05-27 14:48:22 +00:00
Mia McMahill
0285e879d0 flatpak-coredumpctl: Print help message to stderr
This is more consistent with common practice for
help messages printed due to missing/incorrect arguments.
2026-05-27 14:48:22 +00:00
Mia McMahill
d7dbb10845 flatpak-coredumpctl: Replace old style format strings with f-strings
Print out error messages instead of raising an uncaught exception

Replace one more set of quotes that I missed previously
2026-05-27 14:48:22 +00:00
Mia McMahill
f48c7866b6 flatpak-coredumpctl: Clean up mixed usage of single and double quotes 2026-05-27 14:48:22 +00:00
Mia McMahill
af453ce99d flatpak-coredumpctl: Check for /app as well as /newroot
This fixes a bug where the warning about not being a flatpaked
application was being printed for flatpaks. This was due to a
change in bwrap so that the paths no longer start with /newroot.
2026-05-27 14:48:22 +00:00
Michael Catanzaro
68a5a46cbf flatpak-coredumpctl: launch flatpak with --filesystem=home
This is a debugging tool so there's no need for a strict sandbox. I
want to be able to extract backtraces from gdb using 'set logging on'
and it's not currently possible without using
--extra-flatpak-args="--filesystem=home".

Closes: #2313
Approved by: matthiasclasen
2018-11-14 12:35:31 +00:00
Charlie Turner
15c8e26a91 flatpak-coredumpctl: -b option ignored the argument.
Due to a typo, the -b option was not placing the passed build directory
into the CoreDumper class.

Closes: #2076
Approved by: alexlarsson
2018-09-07 15:17:39 +00:00
Thibault Saunier
c0ef5aadcb scripts: Add a flatpak-coredumpctl to debug crashed application in gdb
Closes: #1784
Approved by: alexlarsson
2018-06-19 08:39:31 +00:00