Repository navigation
Improve error handling and printed output of flatpak-coredumpctl - #6649
Conversation
bbe777c to
3d1d780
Compare
| options = parser.parse_args(namespace=coredumper) | ||
| if not coredumper.clean_args(): | ||
| parser.print_help() | ||
| parser.print_help(sys.stderr) |
There was a problem hiding this comment.
should explain why this is being changed.
There was a problem hiding this comment.
In most programs that print the help message due to missing/incorrect arguments, it gets printed to stderr instead of stdout. I'm cleaning up the commit messages now and will add this to the description.
The build indeed does not define a minimum version and there aren't any runtime checks in the scripts either. Maybe it should have one or both of those. If the minimum is getting raised, this cannot be backported to 1.16.x. If that's ok, and it's going to land in the unstable and new stable 1.18.x, I think using upto 3.10 is ok if that's what you need. I'm sceptical about supporting EOL Python versions. |
Is that the total length including the |
My intention was for this to go to 1.17/1.18. If you would rather it be able to go into 1.16, I can revert the changes that raised the minimum version, but it would definitely be nicer to be able to use 3.10. |
f3723c2 to
1463ac6
Compare
Including the prefix
I will be releasing 1.18 very soon at which point 1.16 won't be supported anymore anyway, so I'd say don't bother. |
Yes I suggest then using 3.10 to make life easier. And also encoding the requirement formally in meson.build + runtime verification. |
I'm not particularly familiar with meson. Would something like this in py = import('python').find_installation('python3')
pyver = py.language_version()
if pyver.version_compare('<3.10')
error('Python >= 3.10 is required, found ' + pyver)
endif(And then since this affects |
74a3351 to
15f2451
Compare
Yes something like that.
In a later PR when it is actually relying on 3.10 features. Same for the meson.build part. |
|
A few of your commits are still exceeding the width. |
|
It looks to me like the longest is 70 characters? Edit: Oh wait found one description line that was too long. |
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.
Print out error messages instead of raising an uncaught exception Replace one more set of quotes that I missed previously
This is more consistent with common practice for help messages printed due to missing/incorrect arguments.
This prevents it from getting printed twice in some circumstances
3444e9e to
21273c6
Compare
|
It's in body: |
Fixes #6270
This is the first of a few planned PRs to fix and improve
flatpak-coredumpctl.Changes made by this PR:
shlex.joinis used to present a more readable output.Before:
After:
coredumpctl dump, exceptions are now caught, with the error message fromcoredumpctlbeing printed out. Previously the exception was uncaught, leading to the output seen in [Bug]:flatpak-coredumpctlcrashes when-mis provided with an invalid argument. #6270.I couldn't find any documentation anywhere about the targeted Python version for
flatpak-coredumpctlorflatpak-bisect. The changes in this PR have a minimum required version of 3.8 because ofshlex.joinand f-strings. The current version is compatible with down to 3.3.Example output:

Flatpak does not exist/is not installed:
-m finds no matches:
