Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update apport coredump path handling for CorefileFinder #2518

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from

Conversation

Meetesh-Saini
Copy link

@Meetesh-Saini Meetesh-Saini commented Jan 15, 2025

Apport uses the executable's pathname in the core filename. This update modifies the implementation to use the absolute path of the executable and replace both / and . with _ in the pathname to match apport's implementation.

Reference source:
https://github.com/canonical/apport/blob/4bbb179b8f92989bf7c1ee3692074f35d70ef3e8/data/apport#L110
https://github.com/canonical/apport/blob/4bbb179b8f92989bf7c1ee3692074f35d70ef3e8/apport/fileutils.py#L599

Apport calls get_core_path with options.executable_path, which corresponds to the executable's pathname, as specified by the %E placeholder in the core pattern (see man core and apport --help).

@Meetesh-Saini Meetesh-Saini changed the base branch from stable to dev January 15, 2025 18:50
@peace-maker
Copy link
Member

Thank you! Do you have a link to the source or docs you used? Please add it to the code too so we can monitor for future changes if this wasn't the default behavior before.

@Meetesh-Saini
Copy link
Author

@peace-maker, I updated the comments. I've made the changes in the dev branch. Is that fine, or should I use the stable one?

@peace-maker
Copy link
Member

The stable branch is would be better indeed. Thank you for the references, looks good!

@Meetesh-Saini Meetesh-Saini reopened this Jan 22, 2025
@Meetesh-Saini Meetesh-Saini changed the base branch from dev to stable January 22, 2025 16:21
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.

2 participants