Skip to content
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

Rust version 1.52.1 downloaded and reinstalled multiple times #6866

Closed
linusjf opened this issue May 27, 2021 · 12 comments
Closed

Rust version 1.52.1 downloaded and reinstalled multiple times #6866

linusjf opened this issue May 27, 2021 · 12 comments

Comments

@linusjf
Copy link

linusjf commented May 27, 2021

Problem description
The package rust with version 1.52.1 is downloaded and reinstalled over itself multiple times. This has occured regularly over the past week.

Steps to reproduce
Execute pkg up once a day.

Expected behavior
If Rust 1.52.1 already exists, it must not download and reinstall it.

Additional information

Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://dl.kcubeterm.me/termux-packages-24/ stable main
# science-repo (sources.list.d/science.list)
deb https://grimler.se/science-packages-24 science stable
# game-repo (sources.list.d/game.list)
deb https://grimler.se/game-packages-24 games stable
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/24 termux extras
# root-repo (sources.list.d/root.list)
deb https://grimler.se/termux-root-packages-24 root stable
# sources.list.d/pointless.bak
deb https://its-pointless.github.io/files/ termux extras
# x11-repo (sources.list.d/x11.list)
deb https://termux.com/x11-packages-bin x11 main
Updatable packages:
All packages up to date
Android version:
7.1.2
Kernel build information:
Linux localhost 3.18.31-perf-g89c85bf #1 SMP PREEMPT Tue Oct 22 13:55:14 WIB 2019 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
Redmi Y1

@Grimler91
Copy link
Member

Could you show the output of apt show -a rust?

@linusjf
Copy link
Author

linusjf commented May 28, 2021

$ apt show -a rust
Package: rust
Version: 1.52.1
Maintainer: Kevin Cotugno @kcotugno
Installed-Size: 855 MB
Depends: libc++, clang, openssl, lld, zlib, libllvm
Homepage: https://www.rust-lang.org/
Download-Size: 91.9 MB
APT-Manual-Installed: yes
APT-Sources: https://dl.kcubeterm.me/termux-packages-24 stable/main aarch64 Packages
Description: Systems programming language focused on safety, speed and concurrency

@ghost
Copy link

ghost commented May 28, 2021

This happens because package has different checksums in repositories by @Grimler91 and mine. Side effect of #6846, as we don't have primary source for mirroring and may build certain packages locally in case of CI (Github Actions) failure.

@suhan-paradkar
Copy link
Contributor

suhan-paradkar commented May 28, 2021

I don't why.. or is it intentional.. but while building packages that depend on other packages(i.e, large ones like boost or rust or even adwaita-icon-theme) the build script builds the package from source instead of downloading them, even when -i or-I option is enabled...

P.S: It builds large packages only rest are downloaded. Specially these-

boost
rust
adwaita-icon-theme
hicolor-icon-theme
cmake

Seems to be the side effect of the same issue

@ghost
Copy link

ghost commented May 28, 2021

build script builds the package from source instead of downloading them

adwaita-icon-theme
hicolor-icon-theme

build-package.sh is fine tuned for downloading deb files from Bintray. It doesn't expect the directory structure generated by Aptly where architecture-independent package is linked to each of aarch64, arm, i686, x86_64 architectures.

boost
rust
cmake

These could be downloaded in case of mismatch between actual package version and build.sh.

@Grimler91
Copy link
Member

It doesn't expect the directory structure generated by Aptly where architecture-independent package

I think I worked around that in 6d0883d (worked when I tested locally), is it still a problem for some packages?

boost
rust
cmake

Looks like boost is one revision behind on my mirror, I'll fix that. The other two are the correct version

@ghost
Copy link

ghost commented May 28, 2021

Interesting which package has specified rust as dependency. I couldn't find such in termux-packages repository.

Lines

info: downloading installer
info: profile set to 'default'
info: default host triple is x86_64-unknown-linux-gnu
info: syncing channel updates for '1.52.1-x86_64-unknown-linux-gnu'
info: latest update on 2021-05-10, rust version 1.52.1 (9bc8c42bb 2021-05-09)
info: downloading component 'cargo'
  6.0 MiB /   6.0 MiB (100 %)   5.8 MiB/s in  1s ETA:  0s
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 15.3 MiB /  15.3 MiB (100 %)   5.8 MiB/s in  2s ETA:  0s
info: downloading component 'rust-std'
 24.1 MiB /  24.1 MiB (100 %)   5.8 MiB/s in  4s ETA:  0s
info: downloading component 'rustc'
 48.4 MiB /  48.4 MiB (100 %)   7.0 MiB/s in  7s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'

are completely normal when building packages written in Rust lang. Docker image doesn't have bundled toolchains for all architectures and they are installed by termux_setup_rust.

Same with CMake & Ninja - we don't use Ubuntu packages for these tools and downloading appropriate versions of prebuilt binaries:

Downloading https://cmake.org/files/v3.20/cmake-3.20.2-linux-x86_64.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 41.5M  100 41.5M    0     0  1611k      0  0:00:26  0:00:26 --:--:-- 1979k
Downloading https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   619  100   619    0     0   2009      0 --:--:-- --:--:-- --:--:--  2009
100  100k  100  100k    0     0   163k      0 --:--:-- --:--:-- --:--:--  163k
Archive:  /home/builder/.termux-build/flatbuffers/tmp/ninja-1.10.2.zip
  inflating: /home/builder/.termux-build/_cache/ninja-1.10.2/ninja

P.S. I've seen that flatbuffers specified cmake as build-time dependency. That's redundant since build tool is installed by termux_setup_cmake and wastes traffic by unnecessarily downloading a .deb package. Will remove it and also will check termux-packages as well as x11-packages for similar mistakes.

@linusjf
Copy link
Author

linusjf commented May 30, 2021

I'm not quite sure I understand all this especially since I've not delved into Termux internals. What I can tell you for sure is that it's highly irritating that Rust gets downloaded multiple times which is 90MB x times every time I update Termux. Of course, I can always abort the process but it's still an irritant.

@Grimler91
Copy link
Member

@Fernal73 you can do apt-mark hold rust to make it not update. Then you just have to remember to apt-mark unhold rust when there is an actual update

@linusjf
Copy link
Author

linusjf commented May 31, 2021 via email

@linusjf
Copy link
Author

linusjf commented Jun 1, 2021

$ apt show rust -a

Package: rust
Version: 1.52.1
Maintainer: Kevin Cotugno @kcotugno
Installed-Size: 855 MB
Depends: libc++, clang, openssl, lld, zlib, libllvm
Homepage: https://www.rust-lang.org/
Download-Size: 91.9 MB
APT-Sources: https://grimler.se/termux-packages-24 stable/main aarch64 Packages
Description: Systems programming language focused on safety, speed and concurrency

Package: rust
Version: 1.52.1
Status: hold ok installed
Maintainer: Kevin Cotugno @kcotugno
Installed-Size: 840 MB
Depends: libc++, clang, openssl, lld, zlib, libllvm
Homepage: https://www.rust-lang.org/
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /data/data/com.termux/files/usr/var/lib/dpkg/status
Description: Systems programming language focused on safety, speed and concurrency

Package: rust
Version: 1.51.0-3
Maintainer: Kevin Cotugno @kcotugno
Installed-Size: 843 MB
Depends: libc++, clang, openssl, lld, zlib, libllvm
Homepage: https://www.rust-lang.org/
Download-Size: 90.9 MB
APT-Sources: https://grimler.se/termux-packages-24 stable/main aarch64 Packages
Description: Systems programming language focused on safety, speed and concurrency

@Grimler91
Copy link
Member

From now on there's only one deb variant in the repos. Problem will be gone next time rust is updated, but you can probably apt remove rust && apt install rust to get rid of the issue before then

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

No branches or pull requests

3 participants