这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@robertkirkman
Copy link
Member

  • Fixes [Bug]: cpan -i in postinst scripts does not install Perl modules in an accessible location #27136 by preventing termux_step_massage() from deleting the empty folder /data/data/com.termux/files/usr/lib/perl5/site_perl/5.40.3/aarch64-android/ from the perl package so that it is detected as present and writable by cpan/CPAN/lib/CPAN/FirstTime.pm during the command cpan -i XML::Parser during postinst scripts, which results in the command cpan -i XML::Parser working more consistently and reliably

…()` from deleting empty `sitearch` folder from the package

- Fixes termux#27136 by preventing `termux_step_massage()` from deleting the empty folder `/data/data/com.termux/files/usr/lib/perl5/site_perl/5.40.3/aarch64-android/` from the `perl` package so that it is detected as present and writable by `cpan/CPAN/lib/CPAN/FirstTime.pm` during the command `cpan -i XML::Parser` during `postinst` scripts, which results in the command `cpan -i XML::Parser` working more consistently and reliably
+++ b/cpan/CPAN/lib/CPAN/FirstTime.pm
@@ -904,7 +904,6 @@ sub init {
unless ( $matcher
|| _can_write_to_libdirs() || _using_installbase() || _using_sudo()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch cpan-force-auto-local-lib.patch is no longer necessary to prevent the infinite loop after the development of create-placeholder-in-empty-sitearch-dir.patch, because create-placeholder-in-empty-sitearch-dir.patch causes the function seen here _can_write_to_libdirs() to return True instead of False, which diverts the cpan/CPAN/lib/CPAN/FirstTime.pm away from this non-functioning codepath and into a working codepath, resulting in

being fixed.

@robertkirkman
Copy link
Member Author

It does fix the issue I reported for me in actual testing, so I will merge it in 24 hours if no other problems are found.

@robertkirkman robertkirkman merged commit 588bba2 into termux:master Nov 7, 2025
11 checks passed
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.

[Bug]: cpan -i in postinst scripts does not install Perl modules in an accessible location

1 participant