Gentoo Archives: gentoo-portage-dev

From: Emma Strubell <emma.strubell@×××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Re: search functionality in emerge
Date: Mon, 01 Dec 2008 22:13:11
Message-Id: 5a8c638a0812011408j792bbda4r3716d04088efab4f@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] Re: search functionality in emerge by Tambet
1 Good point. I may just ignore overlays completely because 1) I don't use
2 them and 2) does anyone really need to search an overlay anyway? aren't any
3 packages added via an overlay added deliberately?
4
5 On Mon, Dec 1, 2008 at 4:52 PM, Tambet <qtvali@×××××.com> wrote:
6
7 > I would suggest a different way of updates. When you manually change
8 > portage tree, you have to make an overlay. Overlay, as it's updated and
9 > managed by human being, will be always small (unless someone makes a script,
10 > which creates million overlay updates, but I dont think it would be
11 > efficient way to do anything). So, when you search, you can search Portage
12 > tree with index, which is updated with --sync and then search overlay, which
13 > is small and fast to search anyway. Overlay should not have index in such
14 > case. If anyone is going to change portage tree by hand, those changes will
15 > be lost with next --sync and thus noone should do it anyway - this case
16 > should not be considered at all.
17 >
18 > Tambet - technique evolves to art, art evolves to magic, magic evolves to
19 > just doing.
20 >
21 >
22 > 2008/12/1 Emma Strubell <emma.strubell@×××××.com>
23 >
24 > Thanks for the clarification. I was planning on forcing an update of the
25 >> index as a part of emerge --sync, and implementing a command that would
26 >> update the search index (leaving it up to the user to update after making
27 >> any manual changes to the portage tree). That way the search index should
28 >> always be up-to-date when emerge -s is called. It does make sense for the
29 >> update upon --sync to be optional, but I guess I don't see why the update
30 >> should always be SO slow. Of course the first population of the tree will
31 >> take quite a while, but assuming regular (daily?) --syncs (and therefore
32 >> updates to the index), subsequent updates shouldn't take very long, since
33 >> there will only be a few (hundred?) changes to be made to the tree.
34 >>
35 >> And I do plan on using a pickling the search tree :]
36 >>
37 >> Emma
38 >>
39 >>
40 >> On Mon, Dec 1, 2008 at 12:52 PM, Zac Medico <zmedico@g.o> wrote:
41 >>
42 >>> -----BEGIN PGP SIGNED MESSAGE-----
43 >>> Hash: SHA1
44 >>>
45 >>> Emma Strubell wrote:
46 >>> > I completely forgot about Google's Summer of Code! Thanks for reminding
47 >>> me.
48 >>> > Hopefully I won't forget again by the time summer rolls around,
49 >>> obviously I
50 >>> > wouldn't mind getting a little extra money for doing something I'd do
51 >>> for
52 >>> > free anyway.
53 >>> >
54 >>> > On a more related note: What, exactly, does porttree.py do? And am I
55 >>> correct
56 >>> > in thinking that my suffix tree(s) should somewhat replace porttree.py?
57 >>> Or,
58 >>> > should I be using porttree.py in order to populate my tree?
59 >>>
60 >>> You should use portree.py to populate it. Specifically, you should
61 >>> use portdbapi.aux_get() calls to access the package metadata that
62 >>> you'll need, similar to how the code in the existing search class
63 >>> accesses it.
64 >>>
65 >>> > I think I have
66 >>> > the suffix tree sufficiently figured out, I'm just trying to determine
67 >>> > where, exactly, the tree will fit in to the portage code, and what the
68 >>> best
69 >>> > way to populate it (with package names and some corresponding metadata)
70 >>> > would be.
71 >>>
72 >>> There are there possible times that I imagine a person might want to
73 >>> populate it:
74 >>>
75 >>> 1) Automatically after emerge --sync. This should not be mandatory
76 >>> since it will be somewhat time consuming and some users are very
77 >>> sensitive about --sync time. Note that FEATURES=metadate-transfer is
78 >>> disabled by default in the latest versions of portage, specifically
79 >>> to reduce --sync time.
80 >>>
81 >>> 2) On demand, when emerge --search is invoked. The calling user will
82 >>> need appropriate file system permissions in order to update the
83 >>> search index.
84 >>>
85 >>> 3) On request, by calling a command that is specifically designed to
86 >>> generate the search index. This could be a subcommand of emaint.
87 >>>
88 >>> For the index file format, it would be simplest to use a python
89 >>> pickle file, but you might choose another format if you'd like the
90 >>> index to be accessible without python and the portage API (probably
91 >>> not necessary).
92 >>> - --
93 >>> Thanks,
94 >>> Zac
95 >>> -----BEGIN PGP SIGNATURE-----
96 >>> Version: GnuPG v2.0.9 (GNU/Linux)
97 >>>
98 >>> iEYEARECAAYFAkk0JFAACgkQ/ejvha5XGaONDACgixnmCh9Ei6MyUGIZXpiFt7F2
99 >>> gqMAoOhf5H2uZHB7xhjecOcL0G3w/cqR
100 >>> =hFNz
101 >>> -----END PGP SIGNATURE-----
102 >>>
103 >>>
104 >>
105 >

Replies

Subject Author
Re: [gentoo-portage-dev] Re: search functionality in emerge "René 'Necoro' Neumann" <lists@××××××.eu>