Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] Broken xbps-src builds as a result of pycompile and python_version behavior changes
@ 2020-04-25  6:22 ahesford
  2020-04-25  7:01 ` Chocimier
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ahesford @ 2020-04-25  6:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

New issue by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/21323

Description:
The move to drop the default `python_version=2` in favor of no default, in combination with the move to derive the `pycompile_version` value from `python_version`, has broken builds that declare `pycompile_dirs` without `python_version`.

The hook `common/hooks/post-install/04-create-xbps-metadata-scripts.sh` tries to discover the `pycompile_version` from the existence of `usr/lib/pythonX.Y`. However, this directory will not exist if a package installs Python code somewhere else. In these cases, when `pycompile_dirs` is nonempty by `python_version` is not set, the hook will fail.

The fix involves:
1. Finding the list of packages that declare `pycompile_dirs`;
2. Eliminating from the list those packages that also declare `python_version`;
3. Further eliminating those packages that install files into `usr/lib/pythonX.Y` for any version `X.Y`; and
4. Manually adding `python_version=2` to the remaining templates. This will restore prior build behavior for those packages.

I will dig into this as soon as I have time. In the meantime, please merge as many reasonable PRs that add explicit `python_version` to individual templates as possible to avoid duplicate PRs and potential merge conflicts.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Broken xbps-src builds as a result of pycompile and python_version behavior changes
  2020-04-25  6:22 [ISSUE] Broken xbps-src builds as a result of pycompile and python_version behavior changes ahesford
@ 2020-04-25  7:01 ` Chocimier
  2020-04-25 11:44 ` ahesford
  2020-04-25 14:41 ` [ISSUE] [CLOSED] " Chocimier
  2 siblings, 0 replies; 4+ messages in thread
From: Chocimier @ 2020-04-25  7:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

New comment by Chocimier on void-packages repository

https://github.com/void-linux/void-packages/issues/21323#issuecomment-619332893

Comment:
> tries to discover the pycompile_version from the existence of usr/lib/pythonX.Y

Note, this only works when there is exactly one `X.Y`.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Broken xbps-src builds as a result of pycompile and python_version behavior changes
  2020-04-25  6:22 [ISSUE] Broken xbps-src builds as a result of pycompile and python_version behavior changes ahesford
  2020-04-25  7:01 ` Chocimier
@ 2020-04-25 11:44 ` ahesford
  2020-04-25 14:41 ` [ISSUE] [CLOSED] " Chocimier
  2 siblings, 0 replies; 4+ messages in thread
From: ahesford @ 2020-04-25 11:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/21323#issuecomment-619366727

Comment:
> > tries to discover the pycompile_version from the existence of usr/lib/pythonX.Y
> 
> Note, this only works when there is exactly one `X.Y`.

Right. This is also true in `common/hooks/pre-pkg/03-rewrite-python-shebang.sh`. I think this is proper behavior; trying to decide what to do when a package created two Python libdirs is prone to error. Let the template specifically list `python_version` in those ambiguous cases.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ISSUE] [CLOSED] Broken xbps-src builds as a result of pycompile and python_version behavior changes
  2020-04-25  6:22 [ISSUE] Broken xbps-src builds as a result of pycompile and python_version behavior changes ahesford
  2020-04-25  7:01 ` Chocimier
  2020-04-25 11:44 ` ahesford
@ 2020-04-25 14:41 ` Chocimier
  2 siblings, 0 replies; 4+ messages in thread
From: Chocimier @ 2020-04-25 14:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]

Closed issue by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/21323

Description:
The move to drop the default `python_version=2` in favor of no default, in combination with the move to derive the `pycompile_version` value from `python_version`, has broken builds that declare `pycompile_dirs` without `python_version`.

The hook `common/hooks/post-install/04-create-xbps-metadata-scripts.sh` tries to discover the `pycompile_version` from the existence of `usr/lib/pythonX.Y`. However, this directory will not exist if a package installs Python code somewhere else. In these cases, when `pycompile_dirs` is nonempty by `python_version` is not set, the hook will fail.

The fix involves:
1. Finding the list of packages that declare `pycompile_dirs`;
2. Eliminating from the list those packages that also declare `python_version`;
3. Further eliminating those packages that install files into `usr/lib/pythonX.Y` for any version `X.Y`; and
4. Manually adding `python_version=2` to the remaining templates. This will restore prior build behavior for those packages.

I will dig into this as soon as I have time. In the meantime, please merge as many reasonable PRs that add explicit `python_version` to individual templates as possible to avoid duplicate PRs and potential merge conflicts.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-25 14:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25  6:22 [ISSUE] Broken xbps-src builds as a result of pycompile and python_version behavior changes ahesford
2020-04-25  7:01 ` Chocimier
2020-04-25 11:44 ` ahesford
2020-04-25 14:41 ` [ISSUE] [CLOSED] " Chocimier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).