In regards to the patch ...

1) Why is this:
if [[ $CARCH != $(uname -m) ]]; then

2) Any better than this:
> if ! setarch $setarch /bin/true 2>/dev/null; then

The first doesn't change the cachedir if the host architecture is the same as the build architecture.

The second is a bit complicated, but as I gather, sets the architecture and runs /bin/true. If /bin/true returns false (something to do with setting the architecture fails), then the code is run. I may have got this wrong, but frankly I would be surprised if this works as it should and I like surprises.


For the first, bare in mind there is a possibility that you would want to cross-compile to the same architecture for some reason (e.g. reproducible builds).

For the second, I guess you want to know if you are compiling in a chroot or not, which makes sense, but I'm not 100% convinced that code works correctly just from reading.

In regards to the responses on the mailing list regarding mixing packages/overrides etc. I'm not sure how they correspond to the code in the patch. For the first, packages will not be mixed if the CARCH is different from the host. For the second, packages will not be mixed if a chroot exists (that is ... if the code works as it is presumably intended ... something I am not entirely convinced on at the moment, but soon may be).

Josh
_______________________________________________
Dev mailing list
[email protected]
https://lists.parabola.nu/mailman/listinfo/dev

Reply via email to