• [gentoo-dev] [PATCH 2/2] linux-mod-r1.eclass: Explicitly check for miss

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sat Dec 30 06:10:01 2023
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/linux-mod-r1.eclass | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
    index b6be4ba8a16d..4de2e3f89995 100644
    --- a/eclass/linux-mod-r1.eclass
    +++ b/eclass/linux-mod-r1.eclass
    @@ -855,6 +855,9 @@ _modules_process_compress() {
    compress=(gzip)
    fi
    elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
    + if ! type -P zstd &>/dev/null; then
    + die "zstd not found, please install app-arch/zstd or disable USE=modules-compress"
    + fi
    compress=(zstd -qT"$(makeopts_jobs)" --rm)
    else
    die "USE=modules-compress enabled but no MODULE_COMPRESS* configured"
    --
    2.43.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ionen Wolkens@21:1/5 to All on Sat Dec 30 16:30:01 2023
    On Sat, Dec 30, 2023 at 06:07:16AM +0100, Michał Górny wrote:
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/linux-mod-r1.eclass | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
    index b6be4ba8a16d..4de2e3f89995 100644
    --- a/eclass/linux-mod-r1.eclass
    +++ b/eclass/linux-mod-r1.eclass
    @@ -855,6 +855,9 @@ _modules_process_compress() {
    compress=(gzip)
    fi
    elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
    + if ! type -P zstd &>/dev/null; then
    + die "zstd not found, please install app-arch/zstd or disable USE=modules-compress"
    + fi

    As mentioned on IRC, I don't think we overly need an extra check just
    for this. Users have explicitly enabled zstd-compression that they
    needed for their kernel (meaning they at least had zstd), and if it
    somehow dies with "zstd: command not found" I think it's
    self-explanatory.

    Hard for it to be missing even if it's not in @system too given portage currently depends on it. Not to say it couldn't, or change.

    compress=(zstd -qT"$(makeopts_jobs)" --rm)
    else
    die "USE=modules-compress enabled but no MODULE_COMPRESS* configured"
    --
    2.43.0



    --
    ionen

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

    iQEzBAABCAAdFiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmWQNscACgkQskQGsLCs QzRH6wgAnjTGkBF+Z6EHtxlNmoam8LfYjyC/qWsSyG6oD+Ca2b5Q70+Vh46AVsyI IMx7YOhqwFuKFsIx/LEig4HNAJV/bwtQufA5f4rWmVEApu2RPvO8mu2Me9SHi647 CS60a7rr+MRBSk/Xoh+Sa/e9flmNSGc/kcLcM+sGnwkF/BGWGWP+z9CmW87oNnQM U3QvzDuM+vxTQnrevTqbTJ+BWFkuGEQO/iVtqDonFMbx2ebJMiw98ctny23lE+Om qZ5mdCv3dcuezaE3FERDlJCpekToY7r9onxUCuvwPFX2n7KZZIwqDZmVsc+eON1x WXOsD/KH3pNJIibqdxN+skjxp4Lpaw==
    =YOHD
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Ionen Wolkens on Sat Dec 30 17:20:02 2023
    On Sat, 2023-12-30 at 10:27 -0500, Ionen Wolkens wrote:
    On Sat, Dec 30, 2023 at 06:07:16AM +0100, Michał Górny wrote:
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/linux-mod-r1.eclass | 3 +++
    1 file changed, 3 insertions(+)

    diff --git a/eclass/linux-mod-r1.eclass b/eclass/linux-mod-r1.eclass
    index b6be4ba8a16d..4de2e3f89995 100644
    --- a/eclass/linux-mod-r1.eclass
    +++ b/eclass/linux-mod-r1.eclass
    @@ -855,6 +855,9 @@ _modules_process_compress() {
    compress=(gzip)
    fi
    elif linux_chkconfig_present MODULE_COMPRESS_ZSTD; then
    + if ! type -P zstd &>/dev/null; then
    + die "zstd not found, please install app-arch/zstd or disable USE=modules-compress"
    + fi

    As mentioned on IRC, I don't think we overly need an extra check just
    for this. Users have explicitly enabled zstd-compression that they
    needed for their kernel (meaning they at least had zstd), and if it
    somehow dies with "zstd: command not found" I think it's
    self-explanatory.

    Hard for it to be missing even if it's not in @system too given portage currently depends on it. Not to say it couldn't, or change.


    Very well, less patches, less waitin'.

    --
    Best regards,
    Michał Górny


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

    iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmWQQhgSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQO6MwH/R1kidBB4FwTWQub0UnTePU9Q3gHuzKX IGlJg+H76HzUisf6zUdpKYzAgQimpa9Nvv47cgzwoGnM7dg0c8uARMawjXIajQ0T X5nSf/njddPUqSTCXbFHXrXEiSCheeXudLbROfUNzGl53fJozOX00g3CUzQ3XBX2 wkpvDLeyf4U457nT+7cDsS97NfcEYJJskw94ma2sXn2CG4qJ13H+2vFLURJnCUuf PLVJL47FWHFNcK7y/L4HY8wsL4GQHKuDA06gyNAxiUb5npR9kx7t458Qh3Yz5jNf zvXD1VVlag2Pwx3ysWf/+LjIZZLQBsIxHtI8SbMb5HwtnA9h04r0RcU=
    =o29i
    -----END PGP SIGNATURE-----

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