The keepdir command in an ebuild puts a .keep file in a directory so that it will not be deleted by autoclean when it is empty. This solution is not very graceful. The .keep file interferes with many things: 1. Bash completion. 2. du (Adds one more file to the count). 3. Filesystems mounted as read-only. 4. Annoying during ls -A. It also has some problems. Some ebuilds abuse this ability by keeping directories with no significance at all. For instance, an empty Russion locale directory. I think it is time for Gentoo to find a better solution. Reproducible: Always Steps to Reproduce:
*** This bug has been marked as a duplicate of 16162 ***
This is definitely not a duplicate of 16162. I am trying to say that portage needs a better way of keeping directories. By the way, I just found another reason why the current way is bad. Even though the .keep files are zero-byte, they still fill up an inode. Depending on how your filesystem is formatted, it still takes up a little space on your hard drive, (4k on mine). Even though that is not very much space, it shows that the current way is flawed.
"This is definitely not a duplicate of 16162. I am trying to say that portage needs a better way of keeping directories. By the way, I just found another reason why the current way is bad." And 16162 is about portage's md5/mtime solution sucking, requiring the .keepdir hack. Closing. *** This bug has been marked as a duplicate of 16162 ***