the following is a flat list of the .l2s. file in /.l2s folder, there are total 730 .l2s. files for 365 hard link groups, and 244 of the groups with a regular .l2s.*0001 files associated with 224 files each being the only single hard linked file to each of the .l2s.*0001 files. this kind of wrapper of a single file using link2symlink is really unnecessary for over 2/3 of all hard link groups created.
enhancement the proot with a script tool named l2l-clean to get rid of unnecessary links for those having hard link count equql 1 will help. but you have no clue of the original position of the original file. finding out it using "find -L /var /usr /lib -samefile .l2s.tmp_pack_Qe2Jyu0001.0001 -print -quit" will take a long time. with https://github.com/termux/proot/issues/183 PROOT_L2S_ROOT enhancement by a tree structure, it might be easier if the position of the original file was not change, using "find -L /var/db/repos/gentoo -samefile .l2s.tmp_pack_Qe2Jyu0001.0001 -print -quit" with result immediately. but it might fail if the file moved to another folder.
Steps to reproduce
Expected behavior
add one more .l2s.* text or json file with some special suffix '.txt' or '.json' and with the paths of hard linked files as file content, which makes a triplet for one group of hard link, will help tracking all the files hard linked for the link group, and do better for cleaning out the unnecessary links directly in the proot ln hook without adding a cleaning tool.
Problem description
the following is a flat list of the .l2s. file in /.l2s folder, there are total 730 .l2s. files for 365 hard link groups, and 244 of the groups with a regular .l2s.*0001 files associated with 224 files each being the only single hard linked file to each of the .l2s.*0001 files. this kind of wrapper of a single file using link2symlink is really unnecessary for over 2/3 of all hard link groups created.
after a run of "emaint sync -a", there is a huge file over 1BG: .l2s.tmp_pack_Qe2Jyu0001.0001
enhancement the proot with a script tool named l2l-clean to get rid of unnecessary links for those having hard link count equql 1 will help. but you have no clue of the original position of the original file. finding out it using "find -L /var /usr /lib -samefile .l2s.tmp_pack_Qe2Jyu0001.0001 -print -quit" will take a long time. with https://github.com/termux/proot/issues/183 PROOT_L2S_ROOT enhancement by a tree structure, it might be easier if the position of the original file was not change, using "find -L /var/db/repos/gentoo -samefile .l2s.tmp_pack_Qe2Jyu0001.0001 -print -quit" with result immediately. but it might fail if the file moved to another folder.
Steps to reproduce
Expected behavior
add one more .l2s.* text or json file with some special suffix '.txt' or '.json' and with the paths of hard linked files as file content, which makes a triplet for one group of hard link, will help tracking all the files hard linked for the link group, and do better for cleaning out the unnecessary links directly in the proot ln hook without adding a cleaning tool.
Additional information