Overview

Request 888942 accepted

- Extend reproducible.patch (enforce list context for the return value
of sort because the behaviour of sort in scalar context is undefined)

- Extend reproducible.patch to sort file lists (boo#1041090)


Wolfgang Engel's avatar

Friendly review reminder: @coolo @lrupp



Tina Müller's avatar

Note that using sort as a return value of a function can be harmful. sort in scalar context is undefined, so if you have a sub like this:

    sub foo {
        return sort [@x](https://build.opensuse.org/users/x);
    }
    my $num = foo();

and call it in scalar context, you will get back undef and not the number of elements. In the case of this patch I don't know if the function find_file is called in scalar context anywhere, I just wanted to note that one should avoid doing a sort on return directly and rather do something like:

    [@x](https://build.opensuse.org/users/x) = sort [@x](https://build.opensuse.org/users/x);
    return [@x](https://build.opensuse.org/users/x);

I don't know how to prevent "at-sign letter" being interpreted as a link to a user, sorry.


Tina Müller's avatar

I extended the patch to enforce list context: https://build.opensuse.org/request/show/886980


Request History
Bernhard Wiedemann's avatar

bmwiedemann created request

- Extend reproducible.patch (enforce list context for the return value
of sort because the behaviour of sort in scalar context is undefined)

- Extend reproducible.patch to sort file lists (boo#1041090)


Saul Goodman's avatar

licensedigger accepted review

ok


Wolfgang Engel's avatar

bigironman added as a reviewer

Being evaluated by staging project "openSUSE:Backports:SLE-15-SP3:Staging:adi:19"


Wolfgang Engel's avatar

bigironman accepted review

Picked "openSUSE:Backports:SLE-15-SP3:Staging:adi:19"


Lars Vogdt's avatar

lrupp accepted review

ok


Wolfgang Engel's avatar

bigironman accepted review

Staging Project openSUSE:Backports:SLE-15-SP3:Staging:adi:19 got accepted.


Wolfgang Engel's avatar

bigironman approved review

Staging Project openSUSE:Backports:SLE-15-SP3:Staging:adi:19 got accepted.


Wolfgang Engel's avatar

bigironman accepted request

Staging Project openSUSE:Backports:SLE-15-SP3:Staging:adi:19 got accepted.

openSUSE Build Service is sponsored by