Gentoo Archives: gentoo-dev

From: "Robin H. Johnson" <robbat2@g.o>
To: Gentoo Developers <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] Portage Subcategory Capabilities?
Date: Mon, 04 Oct 2004 06:05:52
Message-Id: 20041004060455.GB25124@curie-int.orbis-terrarum.net
In Reply to: Re: [gentoo-dev] Portage Subcategory Capabilities? by Andrew Gaffney
1 On Mon, Oct 04, 2004 at 12:34:50AM -0500, Andrew Gaffney wrote:
2 > 1) this will cause a performance hit no matter how it is done
3 A performance hit yes, but a lot less of a performance hit than you
4 might expect, provided one requirement is met:
5 - A directory cannot be both a category and a package ever. (This means
6 no renaming packages to categories too).
7
8 > 2) how will Portage know the difference between a package and another
9 > sub-category when it is walking the tree? It could do something
10 > like walking all the way to the end of the
11 > category/sub-category/sub-category tree until it finds .ebuild
12 > files and then backing up a level or 2 to determine the category,
13 > but again this would cause an enormous performance hit due to the
14 > additional required I/O.
15 Portage already has an explicit list of all valid categories that it
16 uses to check paths (see profiles/categories). Simply split the provided
17 package atom into two components by looking for the very last slash.
18 That gives you (category,pn), which can then be verified for existence
19 by comparing the category against the list, and then checking it's
20 directory for the package name. I believe it works in a very similar
21 fashion to this already.
22
23 > 3) the many additional directories would cause an 'emerge sync' to take
24 > longer than it does now.
25 Rsync would not be the bottleneck, and performance would actually
26 improve on any system that has trouble coping with very large numbers of
27 files in a single directory. Go and time 'ls' in your $DISTDIR. None of
28 our package directories have reached that point yet, but I sincerely
29 hope they never do.
30
31 --
32 Robin Hugh Johnson
33 E-Mail : robbat2@××××××××××××××.net
34 Home Page : http://www.orbis-terrarum.net/?l=people.robbat2
35 ICQ# : 30269588 or 41961639
36 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85