Gentoo Archives: gentoo-user

From: Shawn Haggett <podge@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] .keep
Date: Mon, 21 Aug 2006 08:57:42
Message-Id: 44E97418.2020708@podgeweb.com
In Reply to: Re: [gentoo-user] .keep by Philip Webb
1 Philip Webb wrote:
2 > 060821 Shaochun Wang wrote:
3 >> Does anyone know the function of .keep file in a directory?
4 >
5 > It prevents the dir from being deleted by a script,
6 > eg esp during a package update.
7 >
8 I believe it is to do with how tar handles directories. If there are no
9 files in a dir, tar won't include the dir in the archive. So to ensure
10 packages create dirs that will be needed by that package (i.e. an empty
11 data directory, or empty log directory or some such) there is a .keep
12 file placed in that directory. This will cause tar to create the
13 directory when the archive is unpacked.
14
15 Shawn
16 --
17 gentoo-user@g.o mailing list

Replies

Subject Author
[gentoo-user] Re: .keep Alexander Skwar <listen@×××××××××××××××.name>