Re: [gentoo-dev] [PATCH] user-info.eclass: return immediately if db does not exist

2023-02-20 Thread Mike Gilbert
On Sun, Feb 19, 2023 at 5:40 PM Bertrand Jacquin  wrote:
>
> Using portage to bootstrap gentoo install can lead to the following
> warning when ROOT is empty:
>
>   >> Running pre-merge checks for acct-group/root-0
>   grep: /tmp/0xff.z2MjAjJXuo/root/etc/group: No such file or directory
>   grep: /tmp/0xff.z2MjAjJXuo/root/etc/group: No such file or directory
>
> This change prevent egetent() from attempting to lookup key if database
> does not exit, removing error from output.
>
> Signed-off-by: Bertrand Jacquin 
> ---
>  eclass/user-info.eclass | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/eclass/user-info.eclass b/eclass/user-info.eclass
> index b18f280c1022..79d33d6881ae 100644
> --- a/eclass/user-info.eclass
> +++ b/eclass/user-info.eclass
> @@ -1,4 +1,4 @@
> -# Copyright 1999-2022 Gentoo Authors
> +# Copyright 1999-2023 Gentoo Authors
>  # Distributed under the terms of the GNU General Public License v2
>
>  # @ECLASS: user-info.eclass
> @@ -34,6 +34,9 @@ egetent() {
> *) die "sorry, database '${db}' not yet supported; file a bug" ;;
> esac
>
> +   # return immediately if db does not exist
> +   [[ ! -e "${EROOT}/etc/${db}" ]] && return 1
> +
> case ${CHOST} in
> *-freebsd*|*-dragonfly*)
> case ${db} in
>

This change makes sense to me.

The "return 1" made me think about the return value a bit more. If we
want to replicate the behavior of getent from glibc, we should return
2 if the user/group does not exist or if the passwd/group files are
missing. I don't think any ebuild/eclass code really cares about the
specific status though, so we can leave that alone for now.



[gentoo-dev] Last rites: dev-python/pandas-datareader

2023-02-20 Thread Michał Górny
# Michał Górny  (2023-02-20)
# No declared Python 3.11 support.  Multiple failing tests (probably due
# to being online tests).  Last release in 2021, upstream CI is all red.
# No revdeps.
# Removal on 2023-03-22.  Bug #895614.
dev-python/pandas-datareader

-- 
Best regards,
Michał Górny




[gentoo-dev] Last rites: dev-python/colorspacious

2023-02-20 Thread Michał Górny
# Michał Górny  (2023-02-20)
# Uses dev-python/nose, no py3.11 support.  Last upstream commit
# in 2019.  Used only for dev-python/matplotlib[doc].
# Removal on 2023-03-22.  Bug #888241.
dev-python/colorspacious

-- 
Best regards,
Michał Górny




Re: [gentoo-dev] [PATCH] New pre-GLEP: TEST_SUITE_PRESENT variable

2023-02-20 Thread Alec Warner
On Sun, Feb 19, 2023 at 3:11 PM Maciej Barć  wrote:
>
> What if developer configured an ebuild in a way that it downloads the
> test suite/files/data with USE=test?
>
> IMO it should be added to the GLEP that then TEST_SUITE_PRESENT should
> be true (exists).

This is what I was afraid of with the name; it's not only about a
testsuite being there or not, it's about trusting that:
 - There is a test suite.
 - It was run.
 - It passed, and passing is valuable.

Just existing is not sufficient, because we cannot gain any
information from an src_test that just downloaded but didn't run the
suite. That is not valuable information.

-A

>
> W dniu 19.02.2023 o 18:32, Michał Górny pisze:
> > Signed-off-by: Michał Górny 
> > ---
> >   glep-.ebuild | 132 +++
> >   1 file changed, 132 insertions(+)
> >   create mode 100644 glep-.ebuild
> >
> > diff --git a/glep-.ebuild b/glep-.ebuild
> > new file mode 100644
> > index 000..9ee18ca
> > --- /dev/null
> > +++ b/glep-.ebuild
> > @@ -0,0 +1,132 @@
> > +---
> > +GLEP: 
> > +Title: TEST_SUITE_PRESENT variable
> > +Author: Michał Górny 
> > +Type: Standards Track
> > +Status: Draft
> > +Version: 1
> > +Created: 2023-02-19
> > +Last-Modified: 2023-02-19
> > +Post-History: 2023-02-19
> > +Content-Type: text/x-rst
> > +---
> > +
> > +
> > +Abstract
> > +
> > +
> > +A new ``TEST_SUITE_PRESENT`` variable is introduced to indicate whether
> > +the package features a test suite.  It can be set either by the ebuild,
> > +the eclass or the default ``src_test`` implementation, and afterwards
> > +included in the package manager logs.  This can aid in analyzing
> > +the results of automated package testing.
> > +
> > +
> > +Motivation
> > +==
> > +
> > +The deployment of new Python targets in Gentoo currently involves
> > +testing of a large number of Gentoo packages against the said target.
> > +This is currently done manually for the most part.  It can be
> > +particularly time consuming if multiple individuals repeatedly test
> > +the same package only to determine that it remains incompatible with
> > +the new interpreter.
> > +
> > +The Python team wanted to explore the use of automation to aid this
> > +testing.  Unfortunately, this faces a major problem: for the vast
> > +of majority of packages, the incompatibilities with new Python versions
> > +do not exhibit during the installation and can only be detected through
> > +running the test suite.  The results of automated testing are therefore
> > +only meaningful if the package features a test phase.
> > +
> > +For packages using ``distutils-r1`` eclass, the presence of test suite
> > +can usually be easily determined through grepping for
> > +``distutils_enable_tests`` call or an explicit ``python_test()``
> > +function.  Even then, it seems sensible to work towards a more generic
> > +approach to tell whether a package had a test suite or not,
> > +and therefore whether a particular successful automated testing result
> > +means that the package actually passed tests or only confirmed that
> > +the Python files were copied successfully.
> > +
> > +An explicit indication whether a test suite was present can be presented
> > +by the package manager as part of logs, along with the result of running
> > +the test phase.  Afterwards, these logs can be used to determine which
> > +packages were actually tested.
> > +
> > +
> > +Specification
> > +=
> > +
> > +A new ``TEST_SUITE_PRESENT`` variable is introduced that can be set
> > +by a ``src_test()`` implementation to indicate whether the package
> > +featured a test suite.  It can take three values:
> > +
> > +- ``yes`` indicating that a test suite was run
> > +- ``indeterminate`` indicating that it was not possible to clearly
> > +  determine whether the test suite was present or not (this could be
> > +  a case e.g. when a generic test command is run and it does not
> > +  indicate whether any tests were found)
> > +- ``no`` indicating that no test suite was run
> > +
> > +This variable *should* be set by eclasses defining the ``src_test()``
> > +phase.  If the package in question is using ``src_test()`` defined
> > +by an eclass that does not declare it explicitly, the PM must assume
> > +``indeterminate``.
> > +
> > +The variable *may* be set by an ebuild defining the ``src_test()``
> > +phase.  If the ebuild does not define it explicitly, the PM must assume
> > +``yes``.
> > +
> > +The default ``src_test()`` implementation as defined by the PMS sets
> > +the value to ``indeterminate`` if it runs a ``check`` or ``test``
> > +target, and to ``no`` if neither of the targets is found.
> > +
> > +
> > +Rationale
> > +=
> > +
> > +The use of ternary flag makes it possible to clearly represent all three
> > +possible outcomes while navigating the defaults defined in the GLEP.
> > +The flag is set in ``src_test()``, so that runtime conditions (such
> > +as the results 

Re: [gentoo-dev] [PATCH] New pre-GLEP: TEST_SUITE_PRESENT variable

2023-02-20 Thread Michał Górny
On Mon, 2023-02-20 at 12:42 +0100, Ulrich Mueller wrote:
> How about using a new token in PROPERTIES instead?

I don't see how you could alter PROPERTIES at runtime, or how you'd
express three possible outcomes with a binary flag.

-- 
Best regards,
Michał Górny




Re: [gentoo-dev] [PATCH] New pre-GLEP: TEST_SUITE_PRESENT variable

2023-02-20 Thread Ulrich Mueller
How about using a new token in PROPERTIES instead?


signature.asc
Description: PGP signature


Re: [gentoo-dev] [PATCH] New pre-GLEP: TEST_SUITE_PRESENT variable

2023-02-20 Thread Sam James


> On 20 Feb 2023, at 08:37, Florian Schmaus  wrote:
> 
> On 19/02/2023 18.32, Michał Górny wrote:
>> +Abstract
>> +
>> +
>> +A new ``TEST_SUITE_PRESENT`` variable is introduced to indicate whether
>> +the package features a test suite.
> I wonder if we could not simply use IUSE="test" for this purpose? That is, 
> allow declaring the 'test' use flag, even though it is not used in a USE 
> conditional, to indicate that the package has a test suite.
> 
This might make the confusion wrt "USE=test should enable running tests" worse, 
as users will see every package with tests has it.


signature.asc
Description: Message signed with OpenPGP


Re: [gentoo-dev] [PATCH] New pre-GLEP: TEST_SUITE_PRESENT variable

2023-02-20 Thread Florian Schmaus

On 19/02/2023 18.32, Michał Górny wrote:

+Abstract
+
+
+A new ``TEST_SUITE_PRESENT`` variable is introduced to indicate whether
+the package features a test suite.
I wonder if we could not simply use IUSE="test" for this purpose? That 
is, allow declaring the 'test' use flag, even though it is not used in a 
USE conditional, to indicate that the package has a test suite.


With that said, I don't have any strong objections against this 
proposal. But I'd like to mention that with RESTRICT="test", IUSE="test" 
and then TEST_SUITE_PRESENT="true", we end up with an awful lot of test 
related metadata and complexity, which potentially contributes to confusion.


- Flow