Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 May 2024 17:20:57 +0900
From:      Tatsuki Makino <tatsuki_makino@hotmail.com>
To:        Mark Millard <marklmi@yahoo.com>, FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   Re: I've started collecting tmpfs usage figures from a poudriere-devel bulk -a for later publishing some of the top ones (handy for TMPFS_BLACKLIST judgments)
Message-ID:  <SI2PR01MB503612CE12FF4C039DE3A21CFAE52@SI2PR01MB5036.apcprd01.prod.exchangelabs.com>
In-Reply-To: <313298B4-803A-44A9-B0B6-6C5FF4644888@yahoo.com>
References:  <97E1D1BA-CBA1-42C6-8202-B6D654941C28@yahoo.com> <3BF173B4-E6A8-42B7-9A64-0E87E81B8597@yahoo.com> <E1A29267-998F-42DD-B015-1EC50D9B355C@yahoo.com> <F8D3BFD1-ECBB-45ED-913D-7CF53B59304C@yahoo.com> <313298B4-803A-44A9-B0B6-6C5FF4644888@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello.

Mark Millard wrote on 2024/05/05 18:15:
> [Part of my hack's notation does not generalize well across
> various USE_TMPFS= alternatives.]
> 
>>>>> "<" below is what is new, ">" is what was original, in
>>>>> /usr/local/share/poudriere/common.sh :
>>>>>
>>>>> 5928,5934d5927
>>>>> < tmpfs_at_end="$(env BLOCKSIZE=512 df -t tmpfs \
>>>>> < ${MASTERMNTROOT}/${MY_JOBID}/ \
>>>>> < ${MASTERMNTROOT}/${MY_JOBID}/.p/ \
>>>>> < ${MASTERMNTROOT}/${MY_JOBID}/usr/local/ \
>>>>> < 2>/dev/null | tail -3 \
>>>>> < | awk '{ tmpfs_use += $3; } END { printf "%s %.2f %s", "TMPFS:", tmpfs_use*512/(1024**3), "GiB" }')"
> 
> Turns out that the above assignment fails for the likes
> of USE_TMPFS=data instead of USE_TMPFS=all . The builder
> stops at that line and never executes the next line (such
> as when a job_msg line had been added).

I think you will get "em" if $- is output just before the line there.
For example, “msg $-”. If so, it will appear in the package's individual log.
I don't know where it is set, but errexit of sh is set.
And, if a path is specified when df is executed, it returns 1 if there is no mount point corresponding to that path.
It is thought that a combination of these factors is causing the running to cease there.

So it seems necessary to make sure that it always ends as 0, use if, use ||:, etc.

Regards.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?SI2PR01MB503612CE12FF4C039DE3A21CFAE52>