[PATCH] gnu: trezor-agent: Fix it by deleting the sanity-check phase.

  • Done
  • quality assurance status badge
Details
4 participants
  • Attila Lendvai
  • Guillaume Le Vaillant
  • Marek Pa?nikowski
  • Maxime Devos
Owner
unassigned
Submitted by
Attila Lendvai
Severity
normal
A
A
Attila Lendvai wrote on 3 Mar 2022 11:58
(address . guix-patches@gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
20220303105801.3187-1-attila@lendvai.name
It used to work before the new sanity_check.py was added, and the build result
still seems to work fine.
---
gnu/packages/finance.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (14 lines)
diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm
index 985eaa87f7..26c546caed 100644
--- a/gnu/packages/finance.scm
+++ b/gnu/packages/finance.scm
@@ -1156,6 +1156,7 @@ (define-public trezor-agent
(arguments
`(#:phases
(modify-phases %standard-phases
+ (delete 'sanity-check) ; TODO It fails, but the package works fine.
(add-after 'wrap 'fixup-agent-py
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")))
--
2.34.0
M
M
Maxime Devos wrote on 3 Mar 2022 13:28
689f13ea95af1712fdb8cdc10faeac06e8cdb07e.camel@telenet.be
Attila Lendvai schreef op do 03-03-2022 om 11:58 [+0100]:
Toggle quote (2 lines)
> +         (delete 'sanity-check) ; TODO It fails, but the package works fine.

How does it fail? Maybe it indicates a real problem that merely
happens to be difficult to trigger in practice.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiC0YhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7nm4AP4+JOqur79eeZ6agAqJNW1VaRPl
nuYh/EdrdibGj9vLUgEAtrHH1PAAfCmIfrr6fefemX6PMFFWbmKI5UUd3sMg4wk=
=Y3Ri
-----END PGP SIGNATURE-----


A
A
Attila Lendvai wrote on 3 Mar 2022 15:24
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54231@debbugs.gnu.org)
kkDlbXY1VsbqS22dGnkP7b8riq7fttIu_horVDXTr5r_J2tRVbOX553IVo6mJOUEeTBEX9oFXoCzd2WzUYctRR6sMhDO3Fto39hUi6Vz1Vk=@lendvai.name
Toggle quote (6 lines)
> > + (delete 'sanity-check) ; TODO It fails, but the package works fine.
>
> How does it fail? Maybe it indicates a real problem that merely
> happens to be difficult to trigger in practice.


unfortunately i'm not a python expert, i don't know why it fails, but currently it doesn't even build.

i have attached the relevant part of the build output.

if you scan python-xyz.scm, this phase is deleted in several other packages.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“There is nothing sacrosanct about the majority; the lynch mob, too, is the majority in its own domain.”
— Murray N. Rothbard (1926–1995), 'For a New Liberty' (1973)
starting phase `check'
running "python setup.py" with command "test" and parameters ()
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
running egg_info
writing trezor_agent.egg-info/PKG-INFO
writing dependency_links to trezor_agent.egg-info/dependency_links.txt
writing entry points to trezor_agent.egg-info/entry_points.txt
writing requirements to trezor_agent.egg-info/requires.txt
writing top-level names to trezor_agent.egg-info/top_level.txt
reading manifest file 'trezor_agent.egg-info/SOURCES.txt'
writing manifest file 'trezor_agent.egg-info/SOURCES.txt'
running build_ext

----------------------------------------------------------------------
Ran 0 tests in 0.000s

OK
phase `check' succeeded after 0.3 seconds
starting phase `sanity-check'
validating 'trezor-agent' /gnu/store/2546g9jrhnyzy3iar35cy3clgzv505dh-trezor-agent-0.11.0-1/lib/python3.9/site-packages
...checking requirements: OK
...trying to load endpoint console_scripts trezor-agent: ERROR:
Traceback (most recent call last):
File "/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py", line 85, in <module>
ep.load()
File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2450, in load
return self.resolve()
File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2456, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'trezor_agent'
...trying to load endpoint console_scripts trezor-gpg: ERROR:
Traceback (most recent call last):
File "/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py", line 85, in <module>
ep.load()
File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2450, in load
return self.resolve()
File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2456, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'trezor_agent'
...trying to load endpoint console_scripts trezor-gpg-agent: ERROR:
Traceback (most recent call last):
File "/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py", line 85, in <module>
ep.load()
File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2450, in load
return self.resolve()
File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2456, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'trezor_agent'
...trying to load endpoint console_scripts trezor-signify: ERROR:
Traceback (most recent call last):
File "/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py", line 85, in <module>
ep.load()
File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2450, in load
return self.resolve()
File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 2456, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'trezor_agent'
error: in phase 'sanity-check': uncaught exception:
%exception #<&invoke-error program: "python" arguments: ("/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py" "/gnu/store/2546g9jrhnyzy3iar35cy3clgzv505dh-trezor-agent-0.11.0-1/lib/python3.9/site-packa
phase `sanity-check' failed after 0.2 seconds
command "python" "/gnu/store/35ix1m6m8a5s21j02ajhdyqxb2xkshfb-sanity-check.py" "/gnu/store/2546g9jrhnyzy3iar35cy3clgzv505dh-trezor-agent-0.11.0-1/lib/python3.9/site-packages" failed with status 1
builder for `/gnu/store/zaamrw85wbcw5h3x011bpns180jrm0pp-trezor-agent-0.11.0-1.drv' failed with exit code 1
build of /gnu/store/zaamrw85wbcw5h3x011bpns180jrm0pp-trezor-agent-0.11.0-1.drv failed
View build log at '/var/log/guix/drvs/za/amrw85wbcw5h3x011bpns180jrm0pp-trezor-agent-0.11.0-1.drv.gz'.
guix build: error: build of `/gnu/store/zaamrw85wbcw5h3x011bpns180jrm0pp-trezor-agent-0.11.0-1.drv' failed
M
M
Marek Pa?nikowski wrote on 30 Mar 2022 15:29
[PATCH] gnu: trezor-agent: Fix it by deleting the sanity-check phase.
(address . 54231@debbugs.gnu.org)
125518768c2b11d2e08dc426424ad311e958db16.camel@marekpasnikowski.name
Greetings

I am a Guix newbie, so I do not know yet, how to find the package
source.

Does this package declare `python-trezor-agent` as a dependency? The
error message hints at this missing dependency.
A
A
Attila Lendvai wrote on 12 Apr 2022 12:41
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 54231@debbugs.gnu.org)
Jt2b7omOO40D6Xz9fF4dMIUixX7_WuS0LOOTjOXZ8ZHc_hnxjcopny5jwuOils828JbheUpdcmtjX-m3H1sLmBMO9s3xMoXImAfCppVjaLM=@lendvai.name
would it be possible to get this in? or another fix that restores the
package's buildability?

the tests can be fixed later by a python expert that wanders around
here.

--
• attila lendvai
• PGP: 963F 5D5F 45C7 DFCD 0A39
--
“It is the mark of an educated mind to be able to entertain a thought without accepting it.”
— Aristotle (BC 384–322), 'Metaphysics'
M
M
Maxime Devos wrote on 12 Apr 2022 13:11
(name . Attila Lendvai)(address . attila@lendvai.name)(address . 54231@debbugs.gnu.org)
e9211d60eec30eab19066ad7e60805b0485e9324.camel@telenet.be
Attila Lendvai schreef op di 12-04-2022 om 10:41 [+0000]:
Toggle quote (6 lines)
> would it be possible to get this in? or another fix that restores the
> package's buildability?
>
> the tests can be fixed later by a python expert that wanders around
> here.

It looks like 'trezor-agent' only has a python script and not a python
module, so no wonder that 'sanity-check' fails to find the module. As
such, I believe that the 'sanity-check' phase can indeed be removed in
this case, if accompanied an appropriate comment.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlVeVRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uXIAQCf4ats0beFTtscYfsQ3u7TwBwb
lmlx8cuqt+Aa0K6ctAD/eRs28vJMCbRjUjuJvX3E4sFIOuGlU28Az4c8i6gCdwE=
=Q9a2
-----END PGP SIGNATURE-----


G
G
Guillaume Le Vaillant wrote on 12 Apr 2022 14:04
(name . Attila Lendvai)(address . attila@lendvai.name)
87k0buwlpw.fsf@kitej
Patch pushed as d3d2881acf4f3efef61a4049ea4c7c3ba883f48c with a comment
explaining why the 'sanity-check' phase is deleted.
Thanks.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYlVrCw8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j9AXwEAioEVxT09gQq+GfVN0J4ZSbh63YKtXb7L34th
r4BMciYBAJL8SQEk208BM/Yqx0XFtENBhdFuKp+H69sye+Ue9tl9
=ZKH/
-----END PGP SIGNATURE-----

Closed
M
M
Maxime Devos wrote on 12 Apr 2022 14:29
426f3ae8578235cd9774b5cac1467846cdc41f8d.camel@telenet.be
Marek Pa?nikowski schreef op wo 30-03-2022 om 15:29 [+0200]:
Toggle quote (3 lines)
> Does this package declare `python-trezor-agent` as a dependency? The
> error message hints at this missing dependency.

Yes, it does:

(inputs
(list python-trezor python-trezor-agent))

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlVwoxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7hVcAQCH6j+oOVZDwaOwtrPdr4TUgsUw
BJe+MHiaWzWS9ZDdwgEA2oYGTtAPk1TlBZpru5V/28JkoOjfCG1t7iQRfkR0wgQ=
=RqGc
-----END PGP SIGNATURE-----


?