>>>>> On Sun, 12 Nov 2017, Michael Orlitzky wrote: > Some day -- I'll add it to my list. For now I'll update the docs to > explain why you should use keepdir, and do a QA warning for empty > directories. Then how does this sound for EAPI=next? > * Ban keepdir. > * Have portage call its keepdir code on any empty directories in $D > between src_install and pkg_preinst. > * Update the devmanual and portage documentation to suggest dodir > instead of keepdir in the new EAPI. > * Change the PMS to remove "undefined behavior" and replace it with > "empty directories must be tracked, and may only be removed once no > installed package is using them," or something along those lines. > That leaves the implementation up to the PM. How? Look up VDB entries of all installed packages? Note that this would have to be done for every dir that becomes empty, not just the ones currently containing a .keep_* file. What problem are you trying to solve? I see typically around 100 .keep_* files on my systems. These are empty files, so they don't use any blocks. And 100 inodes system wide looks like negligible usage of resources to me. Ulrich