[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: avoid wrapper scripts when possible

From: Maxime Devos
Subject: Re: avoid wrapper scripts when possible
Date: Tue, 07 Sep 2021 22:41:35 +0200
User-agent: Evolution 3.34.2


Attila Lendvai schreef op di 07-09-2021 om 18:52 [+0000]:
> pardon me for reviving a years old discussion, but i'm facing the same 
> problem once again.
> i have updated trezor support, and i wanted to test generating a new gpg key:
> $ trezor-gpg init "foobar <>"
> leading to: OSError: Cannot find '.trezor-gpg-gpg-agent' in $PATH
> upstream relies on sys.argv[0] in a non-trivial way:

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?

> is there any chance to revive this effort?
> original discussion: 
> shall i open an issue? for this specific problem, or the wider situation 
> discussed in the mailing list thread?

FWIW, there's 'wrap-program' and there is 'wrap-script'.
wrap-script is less likely to cause errors here (it doesn't rename the 
but less general.  Maybe wrap-script can be used instead of wrap-program?


Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]