Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo Question
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
lunarg
Guru
Guru


Joined: 07 Jan 2004
Posts: 508
Location: Peer, Belgium

PostPosted: Wed Jan 05, 2005 4:28 pm    Post subject: Reply with quote

ThinkingInBinary wrote:
dabicho wrote:
i.e. my reiserfs has a blocksize of 4kb, so each .keep file takes 4kb plus an entry in the inode table.


Um... unless you use "notail" in your fstab, reiserfs will pack multiple small files into one block and put tiny files in the slack space of the last block of larger files. Blocks become simply an addressing system rather than the way space is partitioned.


Moreover, reiserfs, doesn't use inodes...
_________________
Registered linux user #341804
Visit Black Manticore: http://www.blackmanticore.com/
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8862
Location: beyond the rim

PostPosted: Wed Jan 05, 2005 5:37 pm    Post subject: Reply with quote

chemmett wrote:
FWIW, I think those are a result of the gentoo developers using CVS. Unlike tar, CVS won't save and create empty directories.

wrong. They are just there to stop portage from removing empty directories.
Back to top
View user's profile Send private message
g4c9z
Apprentice
Apprentice


Joined: 03 Jun 2004
Posts: 178

PostPosted: Tue Feb 08, 2005 12:19 am    Post subject: Reply with quote

Um, I'm wondering - wouldn't a better design be to query the ebuild when removing folders, to see whether the folder should be kept, instead of checking whether there's a .keep? It was said that the ebuild contains information on whether to create the .keep file - why not just use that information when uninstalling?

Hidden junk files are utterly annoying to me, and I hate the way most operating systems put some of them around - Mac <=9 was the worst I've come across.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8862
Location: beyond the rim

PostPosted: Tue Feb 08, 2005 12:39 am    Post subject: Reply with quote

Lets just say there are technical reasons that aren't easy to fix (in a compatible way).
Back to top
View user's profile Send private message
supermihi
Guru
Guru


Joined: 09 Feb 2005
Posts: 348

PostPosted: Fri Mar 04, 2005 8:31 pm    Post subject: Reply with quote

Quote:
A 0 bytes file takes an entry in the inodes table of your file system, and also is asigned one block, whose size demends on what you set it when you created the filesystem.

You should consider using reiser4, which is more effective in using hard disc space with many very small files than with medium sized ones. Thus the .keep files could even increase the efficiency off your filesystem - maybe that's the magic reason for that files!
:wink:
_________________
"You may say I'm a dreamer, but I'm not the only one."
Back to top
View user's profile Send private message
assaf
Tux's lil' helper
Tux's lil' helper


Joined: 14 Feb 2005
Posts: 146
Location: http://localhost

PostPosted: Tue Mar 22, 2005 9:19 am    Post subject: Reply with quote

Only guessing but in order to do that you'd have to check each and every one of the ebuilds to see if they use that specific dir, because it's enough that any one package uses this dir. That might slow things down a bit.

g4c9z wrote:
Um, I'm wondering - wouldn't a better design be to query the ebuild when removing folders, to see whether the folder should be kept, instead of checking whether there's a .keep? It was said that the ebuild contains information on whether to create the .keep file - why not just use that information when uninstalling?

Hidden junk files are utterly annoying to me, and I hate the way most operating systems put some of them around - Mac <=9 was the worst I've come across.




LOL vvvvv

supermihi wrote:
... Thus the .keep files could even increase the efficiency off your filesystem - maybe that's the magic reason for that files!
:wink:
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1322
Location: London

PostPosted: Mon May 23, 2005 12:23 pm    Post subject: Reply with quote

rofl, classic - I think we need this in portage, so the 'new' .keep files are automatically links rather than 'fresh' files. if it saves a couple of meg on a few thousand machines it might even not be a bad idea... stick a 'reference' .keep file in /usr/lib or somewhere & have them all symlinked to there at install time whenever a new one would have been created.

I'm worryingly close to being serious here, I mean it's not much but it is avoidable wastage...
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8862
Location: beyond the rim

PostPosted: Mon May 23, 2005 12:48 pm    Post subject: Reply with quote

You can't use hardlinks for this (as things can be spread across filesystems).
Back to top
View user's profile Send private message
drwook
Veteran
Veteran


Joined: 30 Mar 2005
Posts: 1322
Location: London

PostPosted: Mon May 23, 2005 3:55 pm    Post subject: Reply with quote

Genone wrote:
You can't use hardlinks for this (as things can be spread across filesystems).


Didn't think of that... Guess you can't really get around that in any managable way (e.g. reference .keep being pointed to by an environment variable, 1 variable per HFS directory off the root, or a 'global' one?)

frikkin valid reasons... ;)
Back to top
View user's profile Send private message
matthies
n00b
n00b


Joined: 12 Dec 2004
Posts: 16

PostPosted: Tue Jul 12, 2005 11:35 am    Post subject: Reply with quote

why the .keep?
portage automatically cleans up for you after unmerging packages, also removing empty unneeded directories. but some directories are vital to your system, and they are therefore protected from autmatic removal by having a zero length file there, .keep.

Honestly, if you're worried about disk-space, do this for a little perspective:
Code:

du /usr/portage

On my system, this uses up ~4G, meaning the .keep files are a whopping 0.025% of that (allowing for a generous 1M for the .keep files)
So I doubt you're using Gentoo if 1M diskspace wastage is giving you nightmares. And yes, it makes sense to have those 4G there if you have the diskspace, in case you're thinking about cleaning that up. Most of that diskspace is saved downloads (/usr/portage/distfiles), saving network bandwidth on the mirror servers if a simple patch has to be applied for a security fix or something else.

Another fun fact:
disregarding reiserfs tail packing, every file on your system is wasting on average half the block size... just do the math and be surprised...
reducing the block size will slow down your disk though - as will tail packing with reiser, so do you want more diskspace or a faster disk? TANSTAAFL :wink:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum