fix(main/perl): force cpan to never interactively prompt to use local::lib, just always default to it

Gets rid of this infinite loop that can permanently freeze many noninteractive scripts which need to run `cpan`:

```
What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib]
Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib]
Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib]
Warning: You do not have write permission for Perl library directories.

To install modules, you need to configure a local Perl library directory or
escalate your privileges.  CPAN can help you by bootstrapping the local::lib
module or by configuring itself to use 'sudo' (if available).  You may also
resolve this problem manually if you need to customize your setup.

What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
 [local::lib]
```
This commit is contained in:
termux-pacman-bot
2025-11-06 11:35:45 +00:00
parent 857c3d809e
commit 19ec75b865
8 changed files with 31 additions and 8 deletions

View File

@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Debian package management system"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.22.6"
TERMUX_PKG_REVISION=4
TERMUX_PKG_REVISION=5
# old tarball are removed in https://mirrors.kernel.org/debian/pool/main/d/dpkg/dpkg_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SRCURL=git+https://salsa.debian.org/dpkg-team/dpkg.git
TERMUX_PKG_GIT_BRANCH="${TERMUX_PKG_VERSION}"

View File

@@ -8,8 +8,10 @@ termux_step_create_subpkg_debscripts() {
#!$TERMUX_PREFIX/bin/bash
set -e
export PERL_MM_USE_DEFAULT=1
echo "Sideloading Perl Locale::gettext ..."
cpan -fi Locale::gettext
cpan -Ti Locale::gettext
exit 0
POSTINST_EOF

View File

@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="The internationalization tool collection"
TERMUX_PKG_MAINTAINER="@suhan-paradkar"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=0.51.0
TERMUX_PKG_REVISION=3
TERMUX_PKG_REVISION=4
TERMUX_PKG_SRCURL=https://launchpad.net/intltool/trunk/$TERMUX_PKG_VERSION/+download/intltool-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd
TERMUX_PKG_DEPENDS="perl, clang, make, libexpat"
@@ -14,8 +14,10 @@ termux_step_create_debscripts() {
#!$TERMUX_PREFIX/bin/bash
set -e
export PERL_MM_USE_DEFAULT=1
echo "Sideloading Perl XML::Parser..."
cpan install XML::Parser
cpan -Ti XML::Parser
exit 0
POSTINST_EOF

View File

@@ -11,7 +11,7 @@ TERMUX_PKG_MAINTAINER="@termux"
# - subversion
TERMUX_PKG_VERSION=(5.40.3
1.6.2)
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=(65f63b4763ab6cb9bb3d5731dd10369e1705be3c59be9847d453eb60b349ab43
f74ab2a6cacc574c98398ae9d36660b4cc0ba0e3d34e87b24d27b9cd2a27787d)
TERMUX_PKG_SRCURL=(https://www.cpan.org/src/5.0/perl-${TERMUX_PKG_VERSION[0]}.tar.xz

View File

@@ -0,0 +1,10 @@
--- a/cpan/CPAN/lib/CPAN/FirstTime.pm
+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm
@@ -904,7 +904,6 @@ sub init {
unless ( $matcher
|| _can_write_to_libdirs() || _using_installbase() || _using_sudo()
) {
- local $auto_config = 0; # We *must* ask, even under autoconfig
local *_real_prompt; # We *must* show prompt
my_prompt_loop(install_help => 'local::lib', $matcher,
'local::lib|sudo|manual');

View File

@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="A perl-script to send XMPP (jabber) messages"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=1.24
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/lhost/sendxmpp/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=dfaf735b4585efd6b3b0f95db31203f9ab0fe607b50e75c6951bc18a6269837d
TERMUX_PKG_DEPENDS="perl, clang, make"
@@ -18,8 +19,10 @@ termux_step_create_debscripts() {
#!$TERMUX_PREFIX/bin/bash
set -e
export PERL_MM_USE_DEFAULT=1
echo "Sideloading Perl Authen::SASL and Net::XMPP ..."
cpan -fi Authen::SASL Net::XMPP
cpan -Ti Authen::SASL Net::XMPP
exit 0
POSTINST_EOF

View File

@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Tool that generates XDG Desktop Menus for icewm and othe
TERMUX_PKG_LICENSE="GPL-2.0-or-later"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.7.6.6"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL="https://arch.p5n.pp.ru/~sergej/dl/2023/arch-xdg-menu-$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=01cbd3749939c180fed33783f0f7c4f47ac9563af2d1c4b39e23cb6cba792b40
TERMUX_PKG_DEPENDS="perl"
@@ -37,8 +38,10 @@ termux_step_create_debscripts() {
#!$TERMUX_PREFIX/bin/bash
set -e
export PERL_MM_USE_DEFAULT=1
echo "Sideloading Perl XML::Parser..."
cpan install XML::Parser
cpan -Ti XML::Parser
exit 0
POSTINST_EOF

View File

@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="A set of simple scripts that provide basic desktop integ
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.2.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://gitlab.freedesktop.org/xdg/xdg-utils/-/archive/v${TERMUX_PKG_VERSION}/xdg-utils-v${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=93d510dccf328378f012fe195b4574c2fac1cd65a74d0852d6eaa72e5a2065a7
TERMUX_PKG_AUTO_UPDATE=true
@@ -33,8 +34,10 @@ termux_step_create_debscripts() {
#!$TERMUX_PREFIX/bin/bash
set -e
export PERL_MM_USE_DEFAULT=1
echo "Sideloading Perl File::MimeInfo ..."
cpan -fi File::MimeInfo
cpan -Ti File::MimeInfo
exit 0
POSTINST_EOF