Files
termux-packages/packages/perl/create-placeholder-in-empty-sitearch-dir.patch
termux-pacman-bot 0acc811918 fix(main/perl): create .placeholder to prevent termux_step_massage() from deleting empty sitearch folder from the package
- Fixes https://github.com/termux/termux-packages/issues/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
2025-11-07 12:06:13 +00:00

22 lines
747 B
Diff

Fixes https://github.com/termux/termux-packages/issues/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
--- a/installperl
+++ b/installperl
@@ -297,6 +297,7 @@ mkpath($installprivlib);
mkpath($installarchlib);
mkpath($installsitelib, $opts{verbose}, 0777) if ($installsitelib);
mkpath($installsitearch, $opts{verbose}, 0777) if ($installsitearch);
+system("touch", "$installsitearch/.placeholder");
if (-d 'lib') {
find({no_chdir => 1, wanted => \&installlib}, 'lib')