Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [RFC] option to skip 03-rewrite-python-shebang
Date: Sun, 14 Nov 2021 15:48:37 +0100	[thread overview]
Message-ID: <20211114144837.zVo70CmO6qyn3Ft_KMAtrV5FLlbq6nvdSGqh8nIHx_o@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34053@inbox.vuxu.org>

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/34053#issuecomment-968304770

Comment:
> My position here is that sage shouldn't be merged into void as long as it's using built-in python.

Fair enough, I tend to think the same. Hopefully it will work with python 3.10 by the time they release sagemath-9.5. If it doesn't, though, it may mean another 6 months wait for sagemath-9.6.

> Most of the hooks exist for good reason, and I don't think this change has enough value.

Doesn't scanning and replacing all python shebangs cause issues in any other situations? In this case we are mostly replacing "#! /usr/bin/env python3" or worse "#! /usr/bin/env sage-python" (which complains about lack of python version and aborts).

In particular this is NOT about hardcoding paths to the python interpreter but allowing it to run through env.

It might be argued that rewriting "#! /usr/bin/env sage-python" is incorrect.

Also: for packages with lots of files (and/or huge text files?) this hook takes its time... AFAICT it's not only checking in /usr/bin or +x files but every single non-binary file is scanned.

A similar situation is 11-pkglint-elf-in-usrshare, but for that case we have "ignore_elf_dirs=". Example package pari-galpol contains 14681 files and using `nostrip=true` plus `ignore_elf_dirs=/usr/share/pari` saves ~ 3m in install step. It may not sound much for CI, but when testing changes locally it's a workflow killer.

> A variable to skip specific hooks is also fragile: sometimes we need to change the order they run at, and that means changing their name.

That's a good point. It could be made different, e.g. `skip_hooks="pre-pkg:rewrite-python-shebang"` where the first part matches a stage exactly and the second part matches partially, so this is robust to change in the numbers. But I understand this gets a bit hairy...

Would one of the following be acceptable:
 a. fix the pattern in 03-rewrite-python-shebang so it doesn't match "#!/usr/bin/env sage-python".
 b. add an option "ignore_python_shebang_dirs" similar to "ignore_elf_dirs"




  parent reply	other threads:[~2021-11-14 14:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 11:20 [PR PATCH] " tornaria
2021-11-13 14:03 ` ericonr
2021-11-14 10:18 ` dkwo
2021-11-14 14:27 ` leahneukirchen
2021-11-14 14:48 ` tornaria [this message]
2021-11-14 18:31 ` ericonr
2021-11-15  1:45 ` [PR PATCH] [Closed]: " tornaria
2021-11-15  1:45 ` tornaria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211114144837.zVo70CmO6qyn3Ft_KMAtrV5FLlbq6nvdSGqh8nIHx_o@z \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).