On Sun, Feb 02, 2025 at 04:37:19PM -0800, Andy Tai wrote:
> The second command runs into this problem on package python-pydevd,
> which would be built locally and an unit test would constantly fail.
> The reason for it is not clear and off topic for this mail.
> 
> so what I tried to do is to specify
> 
> --do-not-upgrade=python-pydevd
> 
> as argument to guix package -u
> trying to bypass the build failure; but it does not have effect;  it
> seems because other packages depending on python-pydevd, it would be
> built and then that fails.

Right, that option will only affect packages that are installed in your
profile (`guix package --list-installed`), not their dependencies.
 
> The question is, how to bypass this build failure when upgrading
> packages, if at all possible?

In this particular case, you can use the --without-tests Package
Transformation Option [0].

That is, do `guix package -u .  --without-tests=python-pydevd` to avoid
the buggy unit test. Everything your profile needs that depends on
pydevd will be built locally, and I know from experience that's probably
an expensive group of packages.

That's because if you change how pydevd is built, everything that
depends on it is considered to have changed and will be rebuilt too,
There's likely no substitute for this test-less pydevd variant on the
servers.

A more involved option, but less computationally expensive, is to use
--with-grafts [0]. Define a variant of python-pydevd that skips the tests,
and then use --with-graft=your-python-pydevd, so at least you don't have
to re-compile the big packages that depend on pydevd.

I hope that helps!

[0]
https://guix.gnu.org/manual/en/html_node/Package-Transformation-Options.html

Reply via email to