Re: [PATCH 5/5] travis-ci: don't fail if user already exists on 32 bit Linux build job

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 23, 2018 at 5:46 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Mon, Jan 22, 2018 at 02:32:20PM +0100, SZEDER Gábor wrote:

>> diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh
>> index e37e1d2d5f..13047adde3 100755
>> --- a/ci/run-linux32-build.sh
>> +++ b/ci/run-linux32-build.sh
>> @@ -33,7 +33,13 @@ then
>>       CI_USER=root
>>  else
>>       CI_USER=ci
>> -     useradd -u $HOST_UID $CI_USER
>> +     if test "$(id -u $CI_USER)" = $HOST_UID
>> +     then
>> +             : # user already exists with the right ID
>> +     else
>> +             useradd -u $HOST_UID $CI_USER
>> +     fi
>
> Is it worth redirecting the stderr of "id" to avoid noise when $CI_USER
> does not yet exist at all? Or is that a useful log message? :)

I think it's worth silencing that error.  I'm not even sure it was
useful while working on this patch series, but an error message in the
middle of the log of a successful build job is surely distracting and
might raise some eyebrows (though I suspect that barely anyone looks at
logs of successful build jobs).

OTOH, I might turn that comment into an echo msg...




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux