• Re: [gentoo-dev] [PATCH 06/15] unpacker.eclass: Use lowercase in unpack

    From John Helmert III@21:1/5 to John Helmert III on Sun Sep 25 23:10:01 2022
    On Sun, Sep 25, 2022 at 04:04:07PM -0500, John Helmert III wrote:
    On Sun, Sep 25, 2022 at 08:23:08PM +0200, Michał Górny wrote:
    Transform the URIs to lowercase in unpacker_src_uri_depends() for consistency with the behavior of _unpacker().

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/unpacker.eclass | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
    index 482cf141ee1d..e07c25d0ffa9 100644
    --- a/eclass/unpacker.eclass
    +++ b/eclass/unpacker.eclass
    @@ -509,7 +509,8 @@ unpacker_src_uri_depends() {
    fi

    for uri in "$@" ; do
    - case ${uri} in
    + local m=${uri,,}
    + case ${m} in
    *.cpio.*|*.cpio)
    d="app-arch/cpio" ;;
    *.rar|*.RAR)

    If m is always lowercased, no need to check for uppercased extensions?

    Sorry, this was done in the next patch


    --
    2.37.3





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

    iHUEABYKAB0WIQQyG9yfCrmO0LPSdG2gXq2+aa/JtQUCYzDCuAAKCRCgXq2+aa/J tbgKAP4+Beo7R9ab7xfY/E58fQwm3i7eNAL29Re8xZY7v5z+yAEA7eBwEeDr983O W+tTS6UzzGKAfp76DG4PwXcYxepOcwA=
    =RUTr
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Helmert III@21:1/5 to All on Sun Sep 25 23:10:01 2022
    On Sun, Sep 25, 2022 at 08:23:08PM +0200, Michał Górny wrote:
    Transform the URIs to lowercase in unpacker_src_uri_depends() for
    consistency with the behavior of _unpacker().

    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/unpacker.eclass | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass
    index 482cf141ee1d..e07c25d0ffa9 100644
    --- a/eclass/unpacker.eclass
    +++ b/eclass/unpacker.eclass
    @@ -509,7 +509,8 @@ unpacker_src_uri_depends() {
    fi

    for uri in "$@" ; do
    - case ${uri} in
    + local m=${uri,,}
    + case ${m} in
    *.cpio.*|*.cpio)
    d="app-arch/cpio" ;;
    *.rar|*.RAR)

    If m is always lowercased, no need to check for uppercased extensions?

    --
    2.37.3



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

    iHUEABYKAB0WIQQyG9yfCrmO0LPSdG2gXq2+aa/JtQUCYzDCRAAKCRCgXq2+aa/J tb9yAQC0WHYpCYfd/JmpYAv/i6dGYh52vANMOMNDK2RB6ipzFAD+JhQcOKDhUcVg Uk74T+J301+o2mwPDNaaj4s33El7OwI=
    =BCoe
    -----END PGP SIGNATURE-----

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