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 glib-mkenums #261

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Conversation

sergio-costas
Copy link
Contributor

The 'conditioning' part is replacing '/usr/bin/python' in glib- mkenums file with '/usr/bin/python3', to ensure that it works with the current builds. Unfortunately, this only works if the original shebang was referring to python2. The current version of glib-mkenums, instead, has a shebang that already points to python3, so the result of the sed command is a shebang that points to python33, resulting in an execution error.

This patch fixes it by ensuring that the replacement is done only if the shebang points to "python", but not if it points to "python3".

Fix #260

The 'conditioning' part is replacing '/usr/bin/python' in glib-
mkenums file with '/usr/bin/python3', to ensure that it works
with the current builds. Unfortunately, this only works if the
original shebang was referring to python2. The current version
of glib-mkenums, instead, has a shebang that already points to
python3, so the result of the sed command is a shebang that
points to python33, resulting in an execution error.

This patch fixes it by ensuring that the replacement is done
only if the shebang points to "python", but not if it points to
"python3".

Fix ubuntu#260
@sergio-costas sergio-costas requested a review from seb128 November 20, 2024 14:38
Copy link
Contributor

@seb128 seb128 left a comment

Choose a reason for hiding this comment

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

Thanks. The existing code seems weird, basically it is making the interpreter be "#!python3" which isn't valid right?

Could we simply remove that sed call instead?

We know that glib is using python3 in noble and it will not go back, is there really a case where it would ever do something?

@sergio-costas
Copy link
Contributor Author

Yes, you are right. Also, I missed the fact that it removed the /usr/bin/ part, which is completely wrong.

Done the removal. But, just in case, wait until I test it.

@sergio-costas
Copy link
Contributor Author

Confirmed: it works.

@sergio-costas sergio-costas requested a review from seb128 November 21, 2024 09:46
Copy link
Contributor

@seb128 seb128 left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@seb128 seb128 merged commit 87e7cd3 into ubuntu:gnome-46-2404-sdk Nov 21, 2024
2 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.

2 participants