GNU bug report logs - #43746
What to do about packages that don't support --without-tests / #:tests? #f setting

Previous Next

Package: guix;

Reported by: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>

Date: Thu, 1 Oct 2020 14:32:01 UTC

Severity: normal

Done: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43746 in the body.
You can then email your comments to 43746 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#43746; Package guix. (Thu, 01 Oct 2020 14:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 01 Oct 2020 14:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: bug-guix <at> gnu.org
Subject: What to do about packages that don't support --without-tests /
 #:tests? #f setting
Date: Thu, 1 Oct 2020 16:31:36 +0200
[Message part 1 (text/plain, inline)]
The new package transformation option --without-tests works by setting
#:tests? #f in the specified packages.  But some packages replace
their 'check phase and no longer honor #tests?.  glib for example.

Attached is an attempt to document this current behavior.  Shall I
push it?  Alternatively, it should be documented to write a check
phase that honors #:tests?.  Or the package transformation should be
changed to remove any check phase it finds.

Regards,
Florian
[0001-doc-Explain-why-without-tests-may-fail-with-modified.patch (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#43746; Package guix. (Thu, 01 Oct 2020 21:09:02 GMT) Full text and rfc822 format available.

Message #8 received at 43746 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: 43746 <at> debbugs.gnu.org
Subject: Re: bug#43746: What to do about packages that don't support
 --without-tests / #:tests? #f setting
Date: Thu, 01 Oct 2020 23:07:54 +0200
Hi,

"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> skribis:

> The new package transformation option --without-tests works by setting
> #:tests? #f in the specified packages.  But some packages replace
> their 'check phase and no longer honor #tests?.  glib for example.

Oh, we should fix ‘glib’ in ‘core-updates’.

> Attached is an attempt to document this current behavior.  Shall I
> push it?  Alternatively, it should be documented to write a check
> phase that honors #:tests?.  Or the package transformation should be
> changed to remove any check phase it finds.

Hmm not sure, I think fiddling with phases is more risky or at least
could lead to more obscure errors for example with build systems that
don’t support phases, like ‘trivial-build-system’.

I’m inclined to apply the patch you propose and leaving phases
unchanged.

>>From b55e6ee01fe674b282e7ec75d0e4c8a839262261 Mon Sep 17 00:00:00 2001
> From: Florian Pelz <pelzflorian <at> pelzflorian.de>
> Date: Thu, 1 Oct 2020 15:35:52 +0200
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> Subject: [PATCH] doc: Explain why '--without-tests' may fail with modified
>  'check' phase.
>
> * doc/guix.texi (Package Transformation Options): Explain.

[...]

> +Internally, @code{--without-tests} relies on changing the
> +@code{#:tests?} option of a package's @code{check} phase (@pxref{Build
> +Systems}).  Note that some packages use a customized @code{check} phase
> +that does not respect a @code{#:tests? #f} setting.  Therefore there are
> +some packages for which @code{--without-tests} cannot disable tests.

I’d change the last sentence to:

  Therefore, @option{--without-tests} has no effect on these packages.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#43746; Package guix. (Fri, 02 Oct 2020 22:49:01 GMT) Full text and rfc822 format available.

Message #11 received at 43746 <at> debbugs.gnu.org (full text, mbox):

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 43746 <at> debbugs.gnu.org
Subject: Re: bug#43746: What to do about packages that don't support
 --without-tests / #:tests? #f setting
Date: Sat, 3 Oct 2020 00:48:21 +0200
[Message part 1 (text/plain, inline)]
On Thu, Oct 01, 2020 at 11:07:54PM +0200, Ludovic Courtès wrote:
> Oh, we should fix ‘glib’ in ‘core-updates’.

I verified the attached patch fixes glib on the ‘master’ branch.  I’m
not sure about adding a copyright.  Anyway.  Shall I push it to
‘core-updates’ or wait until I can test it on ‘core-updates’ without
rebuilding the world?

> I’m inclined to apply the patch you propose and leaving phases
> unchanged.
> […]
> I’d change the last sentence to:
> 
>   Therefore, @option{--without-tests} has no effect on these packages.

I changed it and pushed the patch to the documentation as
3c01fcc1bb9c086f487d9694cb91a57d7abd0880.  Thank you!

(I maybe should have written in the commit message “Fixes
<https://bugs.gnu.org/43746>.”  Oh well.  I will leave the bug open
though because glib is not fixed yet.)

Regards,
Florian
[0001-gnu-glib-Adhere-to-without-tests-option.patch (text/plain, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#43746; Package guix. (Sat, 03 Oct 2020 10:05:01 GMT) Full text and rfc822 format available.

Message #14 received at 43746 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: 43746 <at> debbugs.gnu.org
Subject: Re: bug#43746: What to do about packages that don't support
 --without-tests / #:tests? #f setting
Date: Sat, 03 Oct 2020 12:04:37 +0200
Hi,

"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> skribis:

> On Thu, Oct 01, 2020 at 11:07:54PM +0200, Ludovic Courtès wrote:
>> Oh, we should fix ‘glib’ in ‘core-updates’.
>
> I verified the attached patch fixes glib on the ‘master’ branch.  I’m
> not sure about adding a copyright.  Anyway.  Shall I push it to
> ‘core-updates’ or wait until I can test it on ‘core-updates’ without
> rebuilding the world?

If you tested it on ‘master’, you can push it on ‘core-updates’.

> I changed it and pushed the patch to the documentation as
> 3c01fcc1bb9c086f487d9694cb91a57d7abd0880.  Thank you!

Great!

> (I maybe should have written in the commit message “Fixes
> <https://bugs.gnu.org/43746>.”  Oh well.  I will leave the bug open
> though because glib is not fixed yet.)

That’s OK.  :-)

> From 505cfd0fa3411a21c8794ab84473dc1dd2b8754c Mon Sep 17 00:00:00 2001
> From: Florian Pelz <pelzflorian <at> pelzflorian.de>
> Date: Sat, 3 Oct 2020 00:29:56 +0200
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> Subject: [PATCH] gnu: glib: Adhere to '--without-tests' option.
>
> * gnu/packages/glib.scm (glib)[arguments]<#:phases>[configure]:
> Only run tests if 'tests?' is true.

OK for ‘core-updates’, thank you!

Ludo’.




Reply sent to "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>:
You have taken responsibility. (Sat, 03 Oct 2020 11:05:01 GMT) Full text and rfc822 format available.

Notification sent to "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>:
bug acknowledged by developer. (Sat, 03 Oct 2020 11:05:02 GMT) Full text and rfc822 format available.

Message #19 received at 43746-done <at> debbugs.gnu.org (full text, mbox):

From: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 43746-done <at> debbugs.gnu.org
Subject: Re: bug#43746: What to do about packages that don't support
 --without-tests / #:tests? #f setting
Date: Sat, 3 Oct 2020 13:03:47 +0200
On Sat, Oct 03, 2020 at 12:04:37PM +0200, Ludovic Courtès wrote:
> > I verified the attached patch fixes glib on the ‘master’ branch.
> If you tested it on ‘master’, you can push it on ‘core-updates’.

Pushed as 0585a0d0d1fe6e334d36e2d851b42b47d6769546.  Thank you!

Closing, since the issue is documented now and fixing *all* other
check phases is generally not worth it.

Regards,
Florian




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 31 Oct 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.