• Re: [gentoo-dev] [PATCH 1/1] linux-info.eclass: Provide ability to skip

    From Ionen Wolkens@21:1/5 to Mike Pagano on Sat Aug 6 01:20:01 2022
    On Fri, Aug 05, 2022 at 06:47:42PM -0400, Mike Pagano wrote:
    Based upon code from check-reqs.eclass by Andreas Sturmlechner

    Provide support for users who requested the ability to skip
    CONFIG_* checks. (e.g. from within a chroot for testing purposes)

    Bug: https://bugs.gentoo.org/862315
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>
    ---
    eclass/linux-info.eclass | 11 ++++++++++-
    1 file changed, 10 insertions(+), 1 deletion(-)

    diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
    index 7e130062a..59e86490f 100644
    --- a/eclass/linux-info.eclass
    +++ b/eclass/linux-info.eclass
    @@ -29,6 +29,15 @@
    # A Couple of env vars are available to effect usage of this eclass
    # These are as follows:

    +
    +# @ECLASS_VARIABLE: CHECKCONFIG_DONOTHING
    +# @USER_VARIABLE
    +# @DEFAULT_UNSET
    +# @DESCRIPTION:
    +# Do not error out in check_extra_config if CONFIG settings are not met.
    +# This is a user flag and should under _no circumstances_ be set in the ebuild.
    +[[ -n ${I_KNOW_WHAT_I_AM_DOING} ]] && CHECKCONFIG_DONOTHING=1

    So this enables it if I_KNOW_WHAT_I_AM_DOING is set?

    Generally I feel giving more purposes to that variable is a bad idea.
    What starts out as "don't bother me about size/ram checks" ignores
    a lot of other things that may be not be expected.

    +
    # @ECLASS_VARIABLE: KERNEL_DIR
    # @DESCRIPTION:
    # A string containing the directory of the target kernel sources. The default value is
    @@ -978,7 +987,7 @@ linux-info_pkg_setup() {

    linux-info_get_any_version

    - [ -n "${CONFIG_CHECK}" ] && check_extra_config;
    + [[ -n "${CONFIG_CHECK}" && -z ${CHECKCONFIG_DONOTHING} ]] && check_extra_config;
    }

    # @FUNCTION: kernel_get_makefile
    --
    2.35.1



    --
    Mike Pagano
    Gentoo Developer - Kernel Project
    Gentoo Sources - Lead
    E-Mail : mpagano@gentoo.org
    GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
    Public Key : http://http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index




    --
    ionen

    -----BEGIN PGP SIGNATURE-----

    iQEzBAABCAAdFiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmLtpIYACgkQskQGsLCs QzS+4Qf/RYNipAvXEnklOE6h4neXFEIOI5tOC9OE5WZdEElnAoNO+bZNmIs/GGtM R2w/LvJ9wpq9Hpu6clyf/j+c2NHBhR3arbSAP9xst9Uwb16pUWn4z8bFsp8yHC0N +PsD27QNM3JvkX9I6fqn9l6fCWux0axSCRVsqixfSP0mUgFr170q/zKQCKoxGWS/ VIsZVpHoGE3OaWoqSqt5F+M3whKnyrsskobpRNBBMK0O38XpqZZiVh61nJZaYKji HaFXWNGQQtuv9CKyPJC8YpUsJtI+uJrZgOh2Zw7KCjw/Fg1nZsvc7ogRx1TvO8RP No4E8tisC8rOrVC71eD4WnA9NnP5uA==
    =nfL1
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Gilbert@21:1/5 to ionen@gentoo.org on Sat Aug 6 04:20:01 2022
    On Fri, Aug 5, 2022 at 7:15 PM Ionen Wolkens <ionen@gentoo.org> wrote:

    On Fri, Aug 05, 2022 at 06:47:42PM -0400, Mike Pagano wrote:
    Based upon code from check-reqs.eclass by Andreas Sturmlechner

    Provide support for users who requested the ability to skip
    CONFIG_* checks. (e.g. from within a chroot for testing purposes)

    Bug: https://bugs.gentoo.org/862315
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>
    ---
    eclass/linux-info.eclass | 11 ++++++++++-
    1 file changed, 10 insertions(+), 1 deletion(-)

    diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
    index 7e130062a..59e86490f 100644
    --- a/eclass/linux-info.eclass
    +++ b/eclass/linux-info.eclass
    @@ -29,6 +29,15 @@
    # A Couple of env vars are available to effect usage of this eclass
    # These are as follows:

    +
    +# @ECLASS_VARIABLE: CHECKCONFIG_DONOTHING
    +# @USER_VARIABLE
    +# @DEFAULT_UNSET
    +# @DESCRIPTION:
    +# Do not error out in check_extra_config if CONFIG settings are not met. +# This is a user flag and should under _no circumstances_ be set in the ebuild.
    +[[ -n ${I_KNOW_WHAT_I_AM_DOING} ]] && CHECKCONFIG_DONOTHING=1

    So this enables it if I_KNOW_WHAT_I_AM_DOING is set?

    Generally I feel giving more purposes to that variable is a bad idea.
    What starts out as "don't bother me about size/ram checks" ignores
    a lot of other things that may be not be expected.

    I agree. Please avoid abusing the I_KNOW_WHAT_I_AM_DOING variable any further.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Pagano@21:1/5 to Mike Gilbert on Sat Aug 6 11:40:01 2022
    On 8/5/22 22:12, Mike Gilbert wrote:
    On Fri, Aug 5, 2022 at 7:15 PM Ionen Wolkens <ionen@gentoo.org> wrote:

    On Fri, Aug 05, 2022 at 06:47:42PM -0400, Mike Pagano wrote:
    Based upon code from check-reqs.eclass by Andreas Sturmlechner

    Provide support for users who requested the ability to skip
    CONFIG_* checks. (e.g. from within a chroot for testing purposes)

    Bug: https://bugs.gentoo.org/862315
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>
    ---
    eclass/linux-info.eclass | 11 ++++++++++-
    1 file changed, 10 insertions(+), 1 deletion(-)

    diff --git a/eclass/linux-info.eclass b/eclass/linux-info.eclass
    index 7e130062a..59e86490f 100644
    --- a/eclass/linux-info.eclass
    +++ b/eclass/linux-info.eclass
    @@ -29,6 +29,15 @@
    # A Couple of env vars are available to effect usage of this eclass
    # These are as follows:

    +
    +# @ECLASS_VARIABLE: CHECKCONFIG_DONOTHING
    +# @USER_VARIABLE
    +# @DEFAULT_UNSET
    +# @DESCRIPTION:
    +# Do not error out in check_extra_config if CONFIG settings are not met. >>> +# This is a user flag and should under _no circumstances_ be set in the ebuild.
    +[[ -n ${I_KNOW_WHAT_I_AM_DOING} ]] && CHECKCONFIG_DONOTHING=1

    So this enables it if I_KNOW_WHAT_I_AM_DOING is set?

    Generally I feel giving more purposes to that variable is a bad idea.
    What starts out as "don't bother me about size/ram checks" ignores
    a lot of other things that may be not be expected.

    I agree. Please avoid abusing the I_KNOW_WHAT_I_AM_DOING variable any further.
    Baldino


    I actually agree. I was following the pattern that did not receive any complaints on the mailing list when presented for the other eclass indicated.

    It's a vague variable and this adds more random functionality when set.

    I'll change this appropriately and submit something later today.

    Thanks for thee review.

    Mike




    --
    Mike Pagano
    Gentoo Developer - Kernel Project
    Gentoo Sources - Lead
    E-Mail : mpagano@gentoo.org
    GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
    Public Key : http://http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Agostino Sarubbo@21:1/5 to All on Sat Aug 6 12:40:01 2022
    This is a multi-part message in MIME format.

    On sabato 6 agosto 2022 04:12:18 CEST Mike Gilbert wrote:
    Please avoid abusing the I_KNOW_WHAT_I_AM_DOING variable any further.

    I'm the original requestor of this change.

    I agree with floppym, so at this point I'd suggest to migrate the current I_KNOW_WHAT_I_AM_DOING into something that reflects what actually is doing/skipping.

    Atm we have:

    $ grep -Rl I_KNOW_WHAT_I_AM_DOING
    ecm.eclass
    check-reqs.eclass
    perl-functions.eclass


    Agostino

    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    </head>
    <body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">On sabato 6 agosto 2022 04:12:18 CEST Mike Gilbert wrote:</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">&gt; Please avoid abusing the I_KNOW_WHAT_I_AM_DOING variable any further.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I'm the original requestor of this change.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">I agree with floppym, so at this point I'd suggest to migrate the current I_KNOW_WHAT_I_AM_DOING into something that reflects what actually is doing/skipping.</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Atm we have:</p>
    <br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">$ grep -Rl I_KNOW_WHAT_I_AM_DOING</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">ecm.eclass</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">check-reqs.eclass</p>
    <p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">perl-functions.eclass</p>
    <br /><br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Agostino</p>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)