Skip to content

Commit 75b34ed

Browse files
author
Release Manager
committed
sagemathgh-37785: sage-logger: Suppress "No such file or directory" messages
<!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> A minor follow-up after sagemath#37391: Seen for example in https://github.com/sagemath/sage/actions/runs/8626379356/job/23644513913 ?pr=37570#step:11:3227: ``` sagemath#24 4091.8 /sage/build/bin/sage-logger: line 66: /usr/bin/time: No such file or directory sagemath#24 4091.8 [sagemath_doc_html-none] installing. Log file: /sage/logs/pkgs/sagemath_doc_html-none.log sagemath#24 5807.5 cat: /sage/logs/pkgs/sagemath_doc_html-none.time: No such file or directory ``` We suppress these (harmless) messages which show up when `/usr/bin/time` is not available. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#37785 Reported by: Matthias Köppe Reviewer(s): David Ayotte, Gonzalo Tornaría, Matthias Köppe
2 parents 6d2394f + ededb59 commit 75b34ed

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

build/bin/sage-logger

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ fi
6363

6464
timefile="$logdir/$logname.time"
6565
rm -f "$timefile"
66-
if /usr/bin/time -h -o /dev/null true; then
66+
if /usr/bin/time -h -o /dev/null true 2>/dev/null; then
6767
TIME="/usr/bin/time -h -o $timefile"
6868
else
6969
TIME=""
7070
fi
7171

7272
report_time ()
7373
{
74-
time=$(echo $(cat $timefile))
74+
time=$(echo $(cat $timefile 2>/dev/null))
7575
case "$time" in
7676
*m*real*|*h*real*|*[1-9][0-9].*real*|*[1-9][0-9],*real*)
7777
# at least 10 seconds wall time

build/pkgs/configure/checksums.ini

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=b9d9a4bb2d949d8f6fffe63c77ff069d59ca6e8c
3-
md5=95f8a1d22f684e3f61019ae82111e639
4-
cksum=3352815196
2+
sha1=690acbd8f7ee57f38cedf5234efbe9b1244c02e1
3+
md5=2f52a2f05de9669ccb2028540e4fccf2
4+
cksum=326483124
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4dd66116b58babf05bb8e4b30282638e2c0b82c3
1+
5012947626d10bff0780a1aca9ce1e4461d9f30e

0 commit comments

Comments
 (0)