Gentoo Archives: gentoo-dev

From: Einar Karttunen <ekarttun@×××××××××××.fi>
To: gentoo-dev@g.o
Subject: [gentoo-dev] A new category scheme idea
Date: Mon, 04 Feb 2002 01:21:30
Message-Id: 20020204071906.GB30127@shellak.helsinki.fi
1 Hello
2
3 I have thought about a new way of categorise ebuilds in gentoo. The
4 new scheme would be based on category files which would be just a
5 list of dependencys as portage understands them. Each package could
6 be in many categories and categories may include categories (but there
7 may be no circular references).
8
9 So the category files would be essentially just the contents of the directories
10 initially, but they are easily extensible. For example the dev-lisp category
11 could be represented by the following file:
12 ecls
13 gcl
14 sbcl
15
16 Of course in additional to these categories we may create additional categories
17 for example we could create a web-server-apps category which would include
18 all apps needed for a typical web-server. Also we could have a suggested
19 base system category which would include all apps which are essential
20 in creating a functional system...
21
22 This scheme grows even more attractive if there is a gui-installer, because
23 it has just to understand categories. This would also solve all gnome/kde-apps
24 vs. other categories problems, as the applications could be included
25 in both categories.
26
27 But how much worl would this be? I am not entirely familiar with the portage
28 source code, but it seems quite modular, so there should be no large problems.
29 Things that would have to be done:
30 * switch /var/db/pkg not to use categories, but just package names. This
31 should be simple to implement.
32 * flatten /usr/portage all apps would be moved from their category directories
33 to a common directory
34 * remove category directories from portage, should be quite simple
35 * add support for category files to emerge. The algorithm could
36 be if the target is an application/ebuild proceed as before
37 if it is a category merge all files in that category (this could
38 be handled using the existing dependency code). Support also syntax
39 like emerge category/abc which should also be quite easy to implement
40 (open category file and fed the line matching abc to the dependency
41 handling mechanism).
42 * replace DEPEND="a/b c/d" in all ebuilds by DEPEND="b d".
43 * make changes in gentolkit
44 * make something for new users with menus
45
46 This sould also make portage faster than now when emerging a build
47 without a category name, because all applications are in the same
48 directory. Of course we sould move /usr/portage to /var/portage,
49 because /usr should contain only read-only data :-)
50 It may seem that directories are more clear for manual operations
51 but they would have their own operations like:
52 ls /usr/portage/app-admin => cat /vat/portage/app-admin.cat
53
54
55 - Einar Karttunen

Replies

Subject Author
Re: [gentoo-dev] A new category scheme idea gentoo-user@××××××××.net