[Dev] [PATCH] libretools: fix i686 gpg signature failures

Josh Branning lovell.joshyyy at gmail.com
Wed Mar 21 23:45:48 GMT 2018


On 21/03/18 23:04, Luke Shumaker wrote:
> On Wed, 21 Mar 2018 18:18:07 -0400,
> Josh Branning wrote:
>> Ignore the last two emails.
>>
>> Code seems to work as expected.
>>
>> I see you are purposefully testing for a negative and not that the
>> line is wrong.
>>
>> if setarch $setarch /bin/false 2>/dev/null; then
>>
>> Would have been more readable instead of a double negative; bit confusing.
>
> That would never trigger, there is no way that exits with 0.  If
> setarch fails, it exits with 1.  If setarch succeeds, then it runs
> /bin/false, which exits with 1.  No matter what, it exits with 1.
>

You are correct.

 From what you have said about the alternatives (uname, /bin/false), the 
present code seems to do the job better already.

Though I am not certain about mashing all the package cache into one 
directory.

You said the packages, when built for the same architecture, are already 
built in a chroot.

Reproducible packages might require a very similar environment, so it 
would be beneficial to use qemu and librechroot for these too (not just 
a vanilla chroot on the same architecture). It also makes the process 
standardized, as no matter if you are compiling on the same or a 
different architecture, you could use librechroot and qemu and expect 
similar, or the same, behavior when using the tools.

Either way, the patch doesn't seem to address any of this at all in any 
meaningful sense. If one wanted to make a patch for this, I'd suggest 
they completely remove the conditional (but not the body) at line 77.

As it is, you are not keen on that happening either way.

I myself feel that where the arch=(any) packages are different, they are 
probably different for a reason and would suggest that the build 
architecture take priority; for they are most likely to have the best 
support for that architecture family.


Josh



More information about the Dev mailing list