Skip to content

Fix version split for packages using --with-extra-version option #116

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

Closed
wants to merge 1 commit into from
Closed

Fix version split for packages using --with-extra-version option #116

wants to merge 1 commit into from

Conversation

marceloneppel
Copy link

This patch solves the error below when we have some extra data in the version string retrieved from pg_config output (like in PostgreSQL 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1)):

...
File "...postgresql/installation.py", line 212, in __init__
    self.type, vs = self.version.split()
ValueError: too many values to unpack (expected 2)

As the extra data in the version string is added with the --with-extra-version option in the PostgreSQL configure script, like in the example command below, we can rely in getting just the two first parts of the version string without introducing a weird behavior for the already working version strings.

./configure --with-extra-version=" (Ubuntu 12.9-0ubuntu0.20.04.1)"

@jwp
Copy link
Contributor

jwp commented Dec 17, 2021

Seeing that configure option being builtin, I nearly committed this. However, it is, still, probably best to keep patches like this downstream as the next packaging system may not care to insert a space at all.

@jwp jwp closed this Dec 17, 2021
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