Skip to content

scripts: make download or build of dependencies less verbose #24745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Grimler91
Copy link
Member

No need to print info over several lines, stick to one per package unless something goes wrong.

We now get something like:

Downloading dependency [email protected] if necessary... found grep in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency [email protected] if necessary... found gzip in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency less@668 if necessary... found less in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency [email protected] if necessary... found procps in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency [email protected] if necessary... found psmisc in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency [email protected] if necessary... found sed in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency [email protected] if necessary... found libandroid-glob in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading https://packages-cf.termux.dev/apt/termux-main/pool/main/liba/libandroid-glob/libandroid-glob_0.6-2_aarch64.deb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6802  100  6802    0     0    862      0  0:00:07  0:00:07 --:--:--  1652
Downloading dependency [email protected] if necessary... found tar in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency [email protected] if necessary... found termux-am in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency [email protected] if necessary... found termux-am-socket in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency [email protected] if necessary... found termux-core in https://packages-cf.termux.dev/apt/termux-main/dists/stable
Downloading dependency [email protected] if necessary... found termux-core-static in https://packages-cf.termux.dev/apt/termux-main/dists/stable

Or, for build case:

Building dependency libgmp if necessary... [email protected] already built - skipping (rm /data/data/.built-packages/libgmp to force rebuild)
Building dependency libiconv if necessary... [email protected] already built - skipping (rm /data/data/.built-packages/libiconv to force rebuild)
Building dependency coreutils if necessary... [email protected] already built - skipping (rm /data/data/.built-packages/coreutils to force rebuild)
Building dependency libnghttp2 if necessary... [email protected] already built - skipping (rm /data/data/.built-packages/libnghttp2 to force rebuild)
Building dependency libnghttp3 if necessary... [email protected] already built - skipping (rm /data/data/.built-packages/libnghttp3 to force rebuild)
Building dependency ca-certificates if necessary... ca-certificates@1:2025.02.25 already built - skipping (rm /data/data/.built-packages/ca-certificates to force rebuild)
Building dependency zlib if necessary... [email protected] already built - skipping (rm /data/data/.built-packages/zlib to force rebuild)
Building dependency openssl if necessary... openssl@1:3.4.1 already built - skipping (rm /data/data/.built-packages/openssl to force rebuild)
Building dependency libssh2 if necessary... [email protected] already built - skipping (rm /data/data/.built-packages/libssh2 to force rebuild)
Building dependency libcurl if necessary... [email protected] already built - skipping (rm /data/data/.built-packages/libcurl to force rebuild)
Building dependency dash if necessary... [email protected] already built - skipping (rm /data/data/.built-packages/dash to force rebuild)

No need to print info over several lines, stick to one per package
unless something goes wrong.
@Grimler91 Grimler91 requested a review from thunder-coding as a code owner May 16, 2025 17:41
@Biswa96
Copy link
Member

Biswa96 commented May 16, 2025

Wouldn't this wrap around in the terminal if a single line is too long? IMHO, I prefer single lines that wrapped lines in terminal output.

@TomJo2000
Copy link
Member

Wouldn't this wrap around in the terminal if a single line is too long? IMHO, I prefer single lines that wrapped lines in terminal output.

This would wrap in a terminal but be a single line in CI logs.
I think making it use ${CI:+'-n'} to add the echo argument might solve that issue in a way where we can keep the CI logs "short" without making local build logs messy.

@agnostic-apollo
Copy link
Member

Yes, would wrap around in terminal but not in log files. A better solution for controlling verbose info instead of this is log levels I plan to add soon.

@Grimler91
Copy link
Member Author

You mean that the line would start overwriting itself? The terminal should break the line automatically (or show you a scroll bar or something), all -n does is to not add a newline at the end automatically

@Grimler91
Copy link
Member Author

Several log levels sounds great. It currently prints 3 lines per package though and that seems unnecessary no matter what the log level is set to:

Downloading dependency openssl@1:3.4.1 if necessary...
Found openssl in https://packages-cf.termux.dev/apt/termux-main/dists/stable
extracting openssl to /home/builder/.termux-build/_cache-aarch64...

@agnostic-apollo
Copy link
Member

agnostic-apollo commented May 16, 2025

1 additional line was added I think when local directory and git sources support was added, to specify where the dependency was actually coming from, http, or file, or git uri, etc. Yeah, log levels would be better, will also try to solve problems for -q flag that prevents some packages from being built.

@twaik
Copy link
Member

twaik commented May 16, 2025

Seems like it conflicts with #24698 changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants