Philip Webb wrote:
> 060821 Shaochun Wang wrote:
>> Does anyone know the function of .keep file in a directory?
> 
> It prevents the dir from being deleted by a script,
> eg esp during a package update.
> 
I believe it is to do with how tar handles directories. If there are no
files in a dir, tar won't include the dir in the archive. So to ensure
packages create dirs that will be needed by that package (i.e. an empty
data directory, or empty log directory or some such) there is a .keep
file placed in that directory. This will cause tar to create the
directory when the archive is unpacked.

Shawn
-- 
gentoo-user@gentoo.org mailing list

Reply via email to