Skip to content

android pipeline build fails with unreachable mirror #5893

@kralo

Description

@kralo

so sometimes, the build fails with an error like

Running command: mkdir -vp ~/.cargo/bin; yes | pkg install rust binutils openssl tar -y; echo $? > /sdcard/pkg.probe
run_termux_command with timeout=3600 / retries=10 / sleep_interval=10
/sdcard/pkg.probe
/sdcard/pkg.log: 1 file pulled, 0 skipped. 0.6 MB/s (1165 bytes in 0.002s)
==================================== SUMMARY ===================================
Command: mkdir -vp ~/.cargo/bin; yes | pkg install rust binutils openssl tar -y; echo $? > /sdcard/pkg.probe
Finished in 11 seconds.
Output was:
+ mkdir -vp /data/data/com.termux/files/home/.cargo/bin
mkdir: created directory '/data/data/com.termux/files/home/.cargo'
mkdir: created directory '/data/data/com.termux/files/home/.cargo/bin'
+ pkg install rust binutils openssl tar -y
+ yes
Testing the available mirrors:
[*] https://packages-cf.termux.org/apt/termux-main: ok
[*] https://deb.kcubeterm.me/termux-main: ok
[*] https://termux.mentality.rip/termux-main: ok
[*] https://grimler.se/termux-packages-24: ok
[*] https://termux.librehat.com/apt/termux-main: ok
Picking mirror: https://deb.kcubeterm.me/termux-main

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 https://deb.kcubeterm.me/termux-main stable InRelease [512 B]
Err:1 https://deb.kcubeterm.me/termux-main stable InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
Reading package lists...
E: Failed to fetch https://deb.kcubeterm.me/termux-main/dists/stable/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'https://deb.kcubeterm.me/termux-main stable InRelease' is not signed.
+ echo 100
Return code: 100

it looks like the pkg command picks the wrong mirror, one that should have been gone at least months ago.
However, the v0.118 still has this mirror and needs user interaction, see termux/termux-app#3690

termux-change-repo presents a TUI which needs manual selection.
One possible solution is to set the softlink .../com.termux/files/usr/etc/termux/chosen_mirror -> .../com.termux/files/usr/etc/termux/mirrors/default but this is not trivial from the build script

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions