diff --git a/packages/termux-tools/build.sh b/packages/termux-tools/build.sh index b3cc2d6d5..d7e28733b 100644 --- a/packages/termux-tools/build.sh +++ b/packages/termux-tools/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://termux.com/ TERMUX_PKG_DESCRIPTION="Basic system tools for Termux" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=0.160 +TERMUX_PKG_VERSION=0.161 TERMUX_PKG_SKIP_SRC_EXTRACT=true TERMUX_PKG_PLATFORM_INDEPENDENT=true TERMUX_PKG_ESSENTIAL=true diff --git a/packages/termux-tools/login b/packages/termux-tools/login index 57c5b21ce..bf7a7b3c8 100755 --- a/packages/termux-tools/login +++ b/packages/termux-tools/login @@ -23,6 +23,9 @@ else done fi +# for the correct operation of scripts that work with the package manager +export TERMUX_MAIN_PACKAGE_FORMAT="@TERMUX_PACKAGE_FORMAT@" + if [ -f @TERMUX_PREFIX@/lib/libtermux-exec.so ]; then export LD_PRELOAD=@TERMUX_PREFIX@/lib/libtermux-exec.so $SHELL -c "coreutils --coreutils-prog=true" > /dev/null 2>&1 || unset LD_PRELOAD diff --git a/packages/termux-tools/termux-info b/packages/termux-tools/termux-info index 11224b081..c77eb2110 100755 --- a/packages/termux-tools/termux-info +++ b/packages/termux-tools/termux-info @@ -1,7 +1,5 @@ #!/bin/bash -TERMUX_PACKAGE_FORMAT="@TERMUX_PACKAGE_FORMAT@" - if [ "$#" != "0" ]; then echo 'usage: termux-info' echo 'Provides information about Termux, and the current system. Helpful for debugging.' @@ -14,9 +12,9 @@ updates() { if [ "$(id -u)" = "0" ]; then echo "Running as root. Cannot check package updates." else - if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ]; then + if [ "$TERMUX_MAIN_PACKAGE_FORMAT" = "pacman" ]; then pacman -Sy >/dev/null 2>&1 - updatable=$(pacman -Qeu) + updatable=$(pacman -Qu) else apt update >/dev/null 2>&1 updatable=$(apt list --upgradable 2>/dev/null | tail -n +2) @@ -86,7 +84,7 @@ fi output+="Packages CPU architecture: $( - if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ]; then + if [ "$TERMUX_MAIN_PACKAGE_FORMAT" = "pacman" ]; then pacman-conf | grep Architecture | sed 's/Architecture = //g' else dpkg --print-architecture @@ -94,7 +92,7 @@ $( ) Subscribed repositories: $( - if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ]; then + if [ "$TERMUX_MAIN_PACKAGE_FORMAT" = "pacman" ]; then repo_subscriptions_pacman else repo_subscriptions_apt