Gentoo Archives: gentoo-portage-dev

From: "René 'Necoro' Neumann" <lists@××××××.eu>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] search functionality in emerge
Date: Mon, 24 Nov 2008 09:34:42
Message-Id: 492A7524.40108@necoro.eu
In Reply to: Re: [gentoo-portage-dev] search functionality in emerge by tvali
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 tvali schrieb:
5 > There is daemon, which notices about filesystem changes -
6 > http://pyinotify.sourceforge.net/ would be a good choice.
7
8 Disadvantage: Has to run all the time (I see already some people crying:
9 "oh noez. not yet another daemon..."). Problem with offline changes
10 (which might be overcome by a one-time check on daemon-startup ... but
11 this would really increase the startup time).
12
13 I have built an algorithm, which does sth like:
14 for overlay in OVERLAYS + PORTDIR:
15 db[overlay] = md5("".join(f.st_mtime for files(overlay)))
16
17 and then compare the MD5-values on later runs.
18 This is fast if the portage stuff is already cached - else it is quite
19 slow ;). Another disadvantage is, that it does not know, WHAT changes do
20 have occurred and thus has to re-read the complete overlay.
21
22 I like the filesystem idea more, than the one with the daemon :). Write
23 a new FS (using FUSE f.ex. (LUFS is deprecated)) which provides a
24 logfile. This logfile can either just contain the time of the latest
25 change in the complete subtree, or even some kind of log stating WHICH
26 files have been changed.
27
28 I think, this should even be possible, if the tree is not on its own
29 partition.
30
31 Of course, this should be clearly an opt-in solution: If the user does
32 not modify the trees by hand, or does so seldomly, the "create index
33 after sync" (similarly to 'eix-sync') is sufficient.
34
35 Regards,
36 René
37 -----BEGIN PGP SIGNATURE-----
38 Version: GnuPG v2.0.9 (GNU/Linux)
39 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
40
41 iEYEARECAAYFAkkqdSMACgkQ4UOg/zhYFuDFLACaAn7skiCsy9pHutXf5ETa5db5
42 BP8AnR8lqj7c6u8HPKVbOsHVTFuGAqfG
43 =G+lV
44 -----END PGP SIGNATURE-----

Replies

Subject Author
Re: [gentoo-portage-dev] search functionality in emerge Fabian Groffen <grobian@g.o>