Gentoo Archives: gentoo-dev

From: Brian Harring <ferringb@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: New category proposal
Date: Wed, 11 May 2005 15:32:50
Message-Id: 20050511153322.GD13132@exodus.wit.org
In Reply to: Re: [gentoo-dev] Re: New category proposal by Alec Warner
1 On Wed, May 11, 2005 at 11:11:02AM -0400, Alec Warner wrote:
2 > >>>Yes and no. You're assuming that people don't use the layout on disk for digging
3 > >>>around without calling portage. Personally, I do.
4 > Not need to be related, but shouldn't be related. In essence this
5 > allows people to put the tree where-ever, as long as that storage
6 > mechanism supports the database operations required ( stuffing
7 > everything in a SQL db fex ). I don't know why someone would....but hey ;)
8
9 Not a valid arguement for dropping categories however, since I'm
10 playing with sqlite based repository module atm locally :)
11 (don't ask for it, it's not even remotely ready for any use beyond
12 destroying things locally on my box at the moment)
13
14 Category is just a bit of info used for looking up a node (category="xyz"
15 and package="abc"). Shouldn't isn't applicable here; in this case,
16 category *is* required due to our atoms, unless people manage to push
17 flattening the namespace through. :)
18
19
20 > >>The fact that the directory where diffball is is easily deducable by its
21 > >>name. As it is, I'd be a bit lost if I had to guess whether diffball is
22 > >>in app-arch or dev-util. Even if I remembered it was something
23 > >>dev-related I'd still be inclined to look in sys-devel.
24 > >
25 > > dev-util is accurate (it's a compressor, but a specialized variant,
26 > > same as patch is). From it's current fs location/layout, we get thus-
27 > > quick lookup on the atom, and inference of it's intentions. This is
28 > > why we have xml at the category level, for example.
29 > >
30 > > One thing that's being unstated also- it's implicitly stated that this
31 > > directory structure is somehow easier to look up a package. If you
32 > > know the _exact_ package name, maybe. Otherwise, you're falling back
33 > > to a search tool (which defeats to some degree the whole arguement for
34 > > flattened namespace).
35 > > Some quicky python, grouping by first char of the package name, and
36 > > you wind up with (top 8)-
37 > > 421, 521, 571, 582, 657, 663, 664, 746
38 > Assuming the directories are ordered by letter, ( a,b,c,d ) and
39 > subdirectories if present as well, a bsearch wouldn't be bad. Both are
40 > ordered sets and you can quickly determine the location of a package in
41 > log(n) time. I don't see a big deal here.
42
43 Dodging my point though. I was pointing out that the categories
44 approach decreases the number of directories/packages within each
45 grouping, while first letter approach jacks up the # of dirs w/in dirs
46 (in some cases, of course). basically, a category fs layout is easier
47 on the human who is digging in if they don't know what they're exactly
48 hunting for, point still stands. :)
49
50 Regarding bsearch, ehh. listdir returns a list (not an iterable over
51 the (open|read|close)dir syscall), so you'd have to either resort to a
52 linear search, or sort then bsearch it. Like I said, the issue isn't
53 how we code things to make it speedy, my concern outlined above is
54 purely the human factor in dealing with the proposed tree
55 structure.
56
57
58 > > I know the path as sys-apps/portage already though. Doesn't that
59 > > count for something? :)
60 > >
61 > > Or, a bit more likely case, I know the type of the package, the
62 > > category, but don't recall it's exact name. What y'all are proposing
63 > > forces the user to use a tool, rather then just a quicky ls.
64 >
65 > *tongue in cheek* and what is ls but another tool for listing the
66 > contents of a directory :)
67
68 ls does no good if you're trying to see all packages of a category,
69 under this proposal, which is what I'm driving at. It forces the user
70 to use scripts/tools to do querying.
71
72 > >>I personally want to see the category part *disappear* from the *DEPEND
73 > >>which is one of the reasons to advocate a flat tree. If the category (or
74 > >>part of it) goes in the package name, so be it, but at least there will
75 > >>be no package moves to break older ebuilds or outdated overlays.
76 > >
77 > > Frankly, you need to give a *really* damn good reason for why this is
78 > > better. I don't think it is, convince me otherwise.
79 > >
80 > > What do we gain from a flat namespace?
81 > > Right now, I can infer an atom out of a DEPEND string's purpose to
82 > > some degree, based upon it's category. To head off the "well you
83 > > don't need to know the category, you should know the packages
84 > > intentions if you're modifying the ebuild", that dodges the point; via
85 > > the category portion of an atom, I can infer at least -intention- of a
86 > > package.
87 >
88 > The CPV thing.....is a big fix :(
89 >
90 > > Ignoring changes required (have stated them already, no point in
91 > > sniping ya over it), what _exactly_ do we gain from the change?
92
93 So... what do we gain? Like I said, ignore for a second that massive
94 overhaul required; if work is required to gain something, and what's
95 gained is worth it over the work, sure. I'm not seeing the gain
96 though :)
97
98 The original request was having a package turn up in multiple
99 categories for searching, right? I don't like it, but metadata.xml at
100 the package level could probably be extended for that, *strictly* for
101 searching. It cannot, *ever* be used for satisfying an atom imo.
102 Reason being it allows for the cpv conflict, rather then just package
103 conflicts we have now.
104 ~Brian
105 --
106 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Re: New category proposal Georgi Georgiev <chutz@×××.net>