Skip to content

Bug 40067: Use --no-verbose wget option when not running in a terminal

boklm requested to merge boklm/rbm:bug_40067 into main

Use the --no-verbose option when stdout is not a tty. We avoid setting the option when getting_id is set, in order to have constant input_file_id when urlget is being used inside the exec script in input_files.

Tested with this change in tor-browser-build:

diff --git a/projects/go/config b/projects/go/config
index af59d4f10..db559e464 100644
--- a/projects/go/config
+++ b/projects/go/config
@@ -133,3 +133,15 @@ input_files:
       '^.*browser-(?!testbuild).*': 'basebrowser-linux-x86_64'
   - filename: 0001-Use-fixed-go-build-tmp-directory.patch
     enable: '[% c("var/android") %]'
+
+steps:
+  test:
+    test: |
+      #!/bin/bash
+      echo OK
+    container:
+      use_container: 0
+    input_files:
+      - URL: 'https://go.dev/dl/go[% c("version") %].src.tar.gz'
+        name: go
+        sha256sum: 285cbbdf4b6e6e62ed58f370f3f6d8c30825d6e56c5853c66d3c23bcdb09db19

And running those commands:

$ rm out/go/go1.21.5.src.tar.gz
$ ~/work/mkpkg/rbm build --step test go
$ rm out/go/go1.21.5.src.tar.gz
$ ~/work/mkpkg/rbm build --step test go > /tmp/t.log 2>&1

In the first case we can see the download progress, but in the second case we only have one line for the download in /tmp/t.log.

/closes #40067 (closed)

/cc @Mynacol

Edited by boklm

Merge request reports