public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] .keep files
@ 2005-05-21 20:28 Andrej Kacian
  2005-05-21 20:38 ` marduk
  0 siblings, 1 reply; 6+ messages in thread
From: Andrej Kacian @ 2005-05-21 20:28 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 415 bytes --]

Are .keep files necessary in a live filesystem? AFAIK they're only there
to keep portage from removing a directory from emerge-time image. Would it be
possible to just remove them from live filesystem after package files are
merged to / ?

Or do .keep files serve another purpose, not obvious to me?

-- 
Andrej "Ticho" Kacian <ticho at gentoo dot org>
Gentoo Linux Developer - net-mail, antivirus, amd64

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] .keep files
  2005-05-21 20:28 [gentoo-dev] .keep files Andrej Kacian
@ 2005-05-21 20:38 ` marduk
  2005-05-22  0:34   ` Jason Stubbs
  2005-05-22  0:37   ` Drake Wyrm
  0 siblings, 2 replies; 6+ messages in thread
From: marduk @ 2005-05-21 20:38 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

On Sat, 2005-05-21 at 22:28 +0200, Andrej Kacian wrote:
> Are .keep files necessary in a live filesystem? AFAIK they're only there
> to keep portage from removing a directory from emerge-time image. Would it be
> possible to just remove them from live filesystem after package files are
> merged to / ?
> 
> Or do .keep files serve another purpose, not obvious to me?
> 

I always thought that they were to keep 'emerge unmerge' from removing
an empty directory, but I could be wrong...

-m

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] .keep files
  2005-05-21 20:38 ` marduk
@ 2005-05-22  0:34   ` Jason Stubbs
  2005-05-22  0:37   ` Drake Wyrm
  1 sibling, 0 replies; 6+ messages in thread
From: Jason Stubbs @ 2005-05-22  0:34 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]

On Sunday 22 May 2005 05:38, marduk wrote:
> On Sat, 2005-05-21 at 22:28 +0200, Andrej Kacian wrote:
> > Are .keep files necessary in a live filesystem? AFAIK they're only there
> > to keep portage from removing a directory from emerge-time image. Would
> > it be possible to just remove them from live filesystem after package
> > files are merged to / ?
> >
> > Or do .keep files serve another purpose, not obvious to me?
>
> I always thought that they were to keep 'emerge unmerge' from removing
> an empty directory, but I could be wrong...

You're pretty much right. If you look at updating a package as emerging the 
new version and then unmerging the old version, you'll see the reason. There 
is not yet any central database of installed files so unmerging the old 
version will find that the package installed a directory that is now empty 
(presumably because the files installed by that package have already been 
removed) and the directory is removed.

Regards,
Jason Stubbs

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] .keep files
  2005-05-21 20:38 ` marduk
  2005-05-22  0:34   ` Jason Stubbs
@ 2005-05-22  0:37   ` Drake Wyrm
  2005-05-22 19:19     ` Andrej Kacian
  1 sibling, 1 reply; 6+ messages in thread
From: Drake Wyrm @ 2005-05-22  0:37 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 939 bytes --]

marduk <marduk@gentoo.org> wrote:
> On Sat, 2005-05-21 at 22:28 +0200, Andrej Kacian wrote:
> > Are .keep files necessary in a live filesystem? AFAIK they're only
> > there to keep portage from removing a directory from emerge-time
> > image. Would it be possible to just remove them from live filesystem
> > after package files are merged to / ?
> > 
> > Or do .keep files serve another purpose, not obvious to me?
> > 
> 
> I always thought that they were to keep 'emerge unmerge' from removing
> an empty directory, but I could be wrong...

That, and to keep portage from removing empty directories during the
post-merge clean phase. Were it not for the .keep files, portage would
cheerfully remove any empty directories the first time the package was
upgraded.

-- 
Batou: Hey, Major... You ever hear of "human rights"?
Kusanagi: I understand the concept, but I've never seen it in action.
  --Ghost in the Shell

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] .keep files
  2005-05-22  0:37   ` Drake Wyrm
@ 2005-05-22 19:19     ` Andrej Kacian
  2005-05-22 21:31       ` Marius Mauch
  0 siblings, 1 reply; 6+ messages in thread
From: Andrej Kacian @ 2005-05-22 19:19 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 732 bytes --]

On Sat, 21 May 2005 17:37:53 -0700
Drake Wyrm <wyrm@haell.com> wrote:

> > I always thought that they were to keep 'emerge unmerge' from removing
> > an empty directory, but I could be wrong...
> 
> That, and to keep portage from removing empty directories during the
> post-merge clean phase. Were it not for the .keep files, portage would
> cheerfully remove any empty directories the first time the package was
> upgraded.

Wouldn't it be possible for portage to just compare a dir in live filesystem
and in the emerge image, and if the dir in image contains .keep file, the live
dir wouldn't get deleted?

-- 
Andrej "Ticho" Kacian <ticho at gentoo dot org>
Gentoo Linux Developer - net-mail, antivirus, amd64

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-dev] .keep files
  2005-05-22 19:19     ` Andrej Kacian
@ 2005-05-22 21:31       ` Marius Mauch
  0 siblings, 0 replies; 6+ messages in thread
From: Marius Mauch @ 2005-05-22 21:31 UTC (permalink / raw
  To: gentoo-dev

Andrej Kacian wrote:
> On Sat, 21 May 2005 17:37:53 -0700
> Drake Wyrm <wyrm@haell.com> wrote:
> 
> 
>>>I always thought that they were to keep 'emerge unmerge' from removing
>>>an empty directory, but I could be wrong...
>>
>>That, and to keep portage from removing empty directories during the
>>post-merge clean phase. Were it not for the .keep files, portage would
>>cheerfully remove any empty directories the first time the package was
>>upgraded.
> 
> 
> Wouldn't it be possible for portage to just compare a dir in live filesystem
> and in the emerge image, and if the dir in image contains .keep file, the live
> dir wouldn't get deleted?
> 

That dir isn't available at that point. And even if it would be, won't 
help as directories can be owned by multiple packages, and you 
definitely don't want to cross-check all installed packages for file 
ownership.

Marius
-- 
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-05-22 22:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-21 20:28 [gentoo-dev] .keep files Andrej Kacian
2005-05-21 20:38 ` marduk
2005-05-22  0:34   ` Jason Stubbs
2005-05-22  0:37   ` Drake Wyrm
2005-05-22 19:19     ` Andrej Kacian
2005-05-22 21:31       ` Marius Mauch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox