From: tvali <qtvali@gmail.com>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] search functionality in emerge
Date: Mon, 24 Nov 2008 16:30:36 +0200 [thread overview]
Message-ID: <cea53e3c0811240630v24fa279dl24914f9f22db98ed@mail.gmail.com> (raw)
In-Reply-To: <20081124094820.GB7142@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 4413 bytes --]
So, mornings are smarter than evenings (it's Estonian saying) ...at night, I
thought more about this filesystem thing and found that it simply answers
all needs, actually. Now I did read some messages here and thought how it
could be made real simple, at least as I understand this word. Yesterday I
searched if custom filesystems could have custom functionality and did not
find any, so I wrote this list of big bunch of classes, which might be
overkill as I think now.
First thing about that indexing - if you dont create daemon nor filesystem,
you can create commands "emerge --indexon", "emerge --indexoff", "emerge
--indexrenew". Then, index is renewed on "emerge --sync" and such, but when
user changes files manually, she has to renew index manually - not much
asked, isn't it? If someone is going to open the cover of her computer, she
will take the responsibility to know some basic things about electricity and
that they should change smth in bios after adding and removing some parts of
computer. Maybe it should even be "emerge --commithandmadechanges", which
will index or do some other things, which are needed after handmade changes.
More such things might emerge in future, I guess.
But about filesystem...
Consider such thing that when you have filesystem, you might have some
directory, which you could not list, but where you can read files. Imagine
some function, which is able to encode and decode queryes into filesystem
format.
If you have such function: search(packagename, "dependencies") you can write
it as file path:
/cgi-bin/search/packagename/dependencies - and packagename can be encoded by
replacing some characters with some codes and separating long strings with
/. Also, you could have API, which has one file in directory, from where you
can read some tmp filename, then write your query to that file and read the
result from the same or similarly-named file with different extension. So,
FS provides some ways to create custom queries - actually that idea came
because there was idea of creating FS as cgi server on LUFS page, thus this
"cgi-bin" starting here is to simplify. I think it's similar to how files in
/dev/ directory behave - you open some file and start writing and reading,
but this file actually is zero-sized and contains nothing.
Under such case, API could be written to provide this filesystem and nothing
more. If it is custom-mapped filesystem, then it could provide search and
such directories, which can be used by portage and others. If not, it would
work as it used to.
So, having filesystem, which contains such stuff (i call this subdir "dev"
here):
- /dev/search - write your query here and read the result.
- /dev/search/searchstring - another way for user to just read some
listings with her custom script.
- /portage/directory/category/packagename/depslist.dev - contains dynamic
list of package dependencies.
- /dev/version - some integer, which will grow every time any change to
portage tree is made.
Then, other functions would be added eventually.
Now, things simple:
- Create standard filesystem, which can be used to contain portage tree.
- Add all nessecary notifications to change and update files.
- *Mount this filesystem to the same dir, where actual files are placed -
if it's not mounted, portage will almost not notice this (so in emergency,
things are just slower). You can navigate to a directory, then mount new one
- I am not on linux box right now, but if I remember correctly, you can use
files in real directory after mounting smth other there in such way.*
- Create indexes and other stuff.
2008/11/24 Fabian Groffen <grobian@gentoo.org>
> On 24-11-2008 10:34:28 +0100, René 'Necoro' Neumann wrote:
> > tvali schrieb:
> > > There is daemon, which notices about filesystem changes -
> > > http://pyinotify.sourceforge.net/ would be a good choice.
> >
> > Disadvantage: Has to run all the time (I see already some people crying:
> > "oh noez. not yet another daemon...").
>
> ... and it is Linux only, which spoils the fun.
>
>
> --
> Fabian Groffen
> Gentoo on a different level
>
>
--
tvali
Kuskilt foorumist: http://www.cooltests.com - kui inglise keelt oskad.
Muide, üle 120 oled väga tark, üle 140 oled geenius, mingi 170 oled ju mingi
täica pea nagu prügikast...
[-- Attachment #2: Type: text/html, Size: 5097 bytes --]
next prev parent reply other threads:[~2008-11-24 14:30 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-23 12:17 [gentoo-portage-dev] search functionality in emerge Emma Strubell
2008-11-23 14:01 ` tvali
2008-11-23 14:33 ` Pacho Ramos
2008-11-23 14:43 ` Emma Strubell
2008-11-23 16:56 ` Lucian Poston
2008-11-23 18:49 ` Emma Strubell
2008-11-23 20:00 ` tvali
2008-11-23 21:20 ` Mike Auty
2008-11-23 21:59 ` René 'Necoro' Neumann
2008-11-24 0:53 ` tvali
2008-11-24 9:34 ` René 'Necoro' Neumann
2008-11-24 9:48 ` Fabian Groffen
2008-11-24 14:30 ` tvali [this message]
2008-11-24 15:14 ` tvali
2008-11-24 15:15 ` René 'Necoro' Neumann
2008-11-24 15:18 ` tvali
2008-11-24 17:15 ` tvali
2008-11-30 23:42 ` Emma Strubell
2008-12-01 7:34 ` [gentoo-portage-dev] " Duncan
2008-12-01 10:40 ` Emma Strubell
2008-12-01 17:52 ` Zac Medico
2008-12-01 21:25 ` Emma Strubell
2008-12-01 21:52 ` Tambet
2008-12-01 22:08 ` Emma Strubell
2008-12-01 22:17 ` René 'Necoro' Neumann
2008-12-01 22:47 ` Emma Strubell
2008-12-02 0:20 ` Tambet
2008-12-02 2:23 ` Emma Strubell
2008-12-02 10:21 ` Alec Warner
2008-12-02 12:42 ` Tambet
2008-12-02 13:51 ` Tambet
2008-12-02 19:54 ` Alec Warner
2008-12-02 21:47 ` Tambet
2008-12-02 17:42 ` Tambet
2008-11-23 14:56 ` [gentoo-portage-dev] " Douglas Anderson
2008-11-24 3:12 ` Marius Mauch
2008-11-24 5:01 ` devsk
2008-11-24 6:25 ` Marius Mauch
2008-11-24 6:47 ` [gentoo-portage-dev] " Duncan
2009-02-12 19:16 ` [gentoo-portage-dev] " René 'Necoro' Neumann
[not found] ` <5a8c638a0902121258s7402d9d7l1ad2b9a8ecf9820d@mail.gmail.com>
2009-02-12 21:01 ` Fwd: " Emma Strubell
2009-02-12 21:05 ` Mike Auty
2009-02-12 21:14 ` Emma Strubell
2009-02-13 13:37 ` Marijn Schouten (hkBst)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cea53e3c0811240630v24fa279dl24914f9f22db98ed@mail.gmail.com \
--to=qtvali@gmail.com \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox