[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: avoid wrapper scripts when possible
From: |
Attila Lendvai |
Subject: |
Re: avoid wrapper scripts when possible |
Date: |
Wed, 08 Sep 2021 09:20:52 +0000 |
thanks for the ideas Maxime!
> You could patch trezor-agent with something like
>
> Python syntax might be incorrect
> ================================
>
> if sys.argv[0] == ".trezor-gpg'
> sys.argv[0] = "trezor-gpg"
> device_name = os.path.basename(sys.argv[0]).rsplit('-',1)[0]
>
> Would that work?
most probably, but i thought first i'll pursue a more general fix for
this. i will fall back to just patching upstream if i fail.
> FWIW, there's 'wrap-program' and there is 'wrap-script'.
>
> wrap-script is less likely to cause errors here (it doesn't rename the
> executable)
> but less general. Maybe wrap-script can be used instead of wrap-program?
not sure how to do this. looking at python-build-system.scm it looks
like there is no way to tell it to use wrap-script, so i went ahead
and just changed the wrap-program call to wrap-script globally, and
gave it a try.
the first error i encountered was in the package called scons. it has
.bat files that wrap-script fails on. if i delete them in a snippet,
then scons' own build system errors out.
any hints on how to proceed from here?
was this what you meant at all?
would it be a worthwhile improvement to hack my way through this path
at all?
shall i try to make it configurable from the package's definition,
change the default, and force it back to wrap-program for packages
that fail with wrap-script?
- attila