From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-portage-dev+bounces-2167-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1L4cSZ-0003fH-KD
	for garchives@archives.gentoo.org; Mon, 24 Nov 2008 14:30:43 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 42F24E0747;
	Mon, 24 Nov 2008 14:30:44 +0000 (UTC)
Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240])
	by pigeon.gentoo.org (Postfix) with ESMTP id 0C91EE0747
	for <gentoo-portage-dev@lists.gentoo.org>; Mon, 24 Nov 2008 14:30:44 +0000 (UTC)
Received: by an-out-0708.google.com with SMTP id d40so811509and.1
        for <gentoo-portage-dev@lists.gentoo.org>; Mon, 24 Nov 2008 06:30:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:received:received:message-id:date:from:to
         :subject:in-reply-to:mime-version:content-type:references;
        bh=h24ZjuXnL4bFwuh2kdnjn2Rg5sVqLh2E0fPsfndVIQA=;
        b=KoPM6NleRieaKYFWboiaLdDGmDJqCngMt5E7GEfy7IRu/H/u7esWPn+kZzFi0MPsXS
         qekV3FJpAjlHc4kHIj+vHCrHpZkd3+TUbkA5ocS7pbcxNSDJWterHRyr+01LnqeKgckt
         sjLqRne1MO3IMdhs1LX5bUa/WuqxQODmHuGaY=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=message-id:date:from:to:subject:in-reply-to:mime-version
         :content-type:references;
        b=XlLYDOWNOdBxJD0DFF/J4ZeVVUFv0j4BxwJbNlUFjeO1l3JdFOwPvAeoh7bhjMxoQA
         L++73pOhudMXBZxbiMzz4ll6gEyV+QALSca2ErrVaJs3FxGfYxicggc1RyVdyav582x/
         fhRjQvukeatW6FC1aLIf1SJnmbrNwltKPomes=
Received: by 10.143.36.15 with SMTP id o15mr441390wfj.206.1227537036308;
        Mon, 24 Nov 2008 06:30:36 -0800 (PST)
Received: by 10.142.84.1 with HTTP; Mon, 24 Nov 2008 06:30:36 -0800 (PST)
Message-ID: <cea53e3c0811240630v24fa279dl24914f9f22db98ed@mail.gmail.com>
Date: Mon, 24 Nov 2008 16:30:36 +0200
From: tvali <qtvali@gmail.com>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] search functionality in emerge
In-Reply-To: <20081124094820.GB7142@gentoo.org>
Precedence: bulk
List-Post: <mailto:gentoo-portage-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-portage-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-portage-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-portage-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-portage-dev.gentoo.org>
X-BeenThere: gentoo-portage-dev@lists.gentoo.org
Reply-to: gentoo-portage-dev@lists.gentoo.org
MIME-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_177788_15999674.1227537036305"
References: <5a8c638a0811230417r5bcf912fka14a18edc9c711b6@mail.gmail.com>
	 <1227450820.27501.0.camel@localhost>
	 <5a8c638a0811230643g63ebba1bkf6c7c4b7d6cc497a@mail.gmail.com>
	 <c4cdc1420811230856r7b324426x59fd53288df46e80@mail.gmail.com>
	 <5a8c638a0811231049g56506b9flc0986705a24094f0@mail.gmail.com>
	 <4929C911.6090006@gentoo.org> <4929D240.1070306@necoro.eu>
	 <cea53e3c0811231653q2d17eea2if95c8e2067f204c1@mail.gmail.com>
	 <492A7524.40108@necoro.eu> <20081124094820.GB7142@gentoo.org>
X-Archives-Salt: c0a792e9-59e7-483b-831c-a831d3cac0bf
X-Archives-Hash: a95ad761088cfeaa3253e2e1abf4fcfa

------=_Part_177788_15999674.1227537036305
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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 an=
d
that they should change smth in bios after adding and removing some parts o=
f
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 writ=
e
it as file path:
/cgi-bin/search/packagename/dependencies - and packagename can be encoded b=
y
replacing some characters with some codes and separating long strings with
/. Also, you could have API, which has one file in directory, from where yo=
u
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 i=
n
/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 nothin=
g
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 dynami=
c
   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 emergenc=
y,
   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=E9 '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
>
>


--=20
tvali

Kuskilt foorumist: http://www.cooltests.com - kui inglise keelt oskad.
Muide, =FCle 120 oled v=E4ga tark, =FCle 140 oled geenius, mingi 170 oled j=
u mingi
t=E4ica pea nagu pr=FCgikast...

------=_Part_177788_15999674.1227537036305
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

So, mornings are smarter than evenings (it&#39;s Estonian saying) ...at nig=
ht, I thought more about this filesystem thing and found that it simply ans=
wers 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. Yesterda=
y 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.<br>
<br>First thing about that indexing - if you dont create daemon nor filesys=
tem, you can create commands &quot;emerge --indexon&quot;, &quot;emerge --i=
ndexoff&quot;, &quot;emerge --indexrenew&quot;. Then, index is renewed on &=
quot;emerge --sync&quot; and such, but when user changes files manually, sh=
e has to renew index manually - not much asked, isn&#39;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 smt=
h in bios after adding and removing some parts of computer. Maybe it should=
 even be &quot;emerge --commithandmadechanges&quot;, which will index or do=
 some other things, which are needed after handmade changes. More such thin=
gs might emerge in future, I guess.<br>
<br>But about filesystem...<br><br>Consider such thing that when you have f=
ilesystem, you might have some directory, which you could not list, but whe=
re you can read files. Imagine some function, which is able to encode and d=
ecode queryes into filesystem format.<br>
<br>If you have such function: search(packagename, &quot;dependencies&quot;=
) you can write it as file path:<br>/cgi-bin/search/packagename/dependencie=
s - and packagename can be encoded by replacing some characters with some c=
odes and separating long strings with /. Also, you could have API, which ha=
s one file in directory, from where you can read some tmp filename, then wr=
ite 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 cu=
stom queries - actually that idea came because there was idea of creating F=
S as cgi server on LUFS page, thus this &quot;cgi-bin&quot; starting here i=
s to simplify. I think it&#39;s similar to how files in /dev/ directory beh=
ave - you open some file and start writing and reading, but this file actua=
lly is zero-sized and contains nothing.<br>
<br>Under such case, API could be written to provide this filesystem and no=
thing 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.<br>
<br>So, having filesystem, which contains such stuff (i call this subdir &q=
uot;dev&quot; here):<br><ul><li>/dev/search - write your query here and rea=
d the result.</li><li>/dev/search/searchstring - another way for user to ju=
st read some listings with her custom script.</li>
<li><span class=3D"code">/portage/directory/category/packagename/depslist.d=
ev - contains dynamic list of package dependencies.</span></li><li><span cl=
ass=3D"code">/dev/version - some integer, which will grow every time any ch=
ange to portage tree is made.<br>
</span></li></ul>Then, other functions would be added eventually.<br><br>No=
w, things simple:<br><ul><li>Create standard filesystem, which can be used =
to contain portage tree.</li><li>Add all nessecary notifications to change =
and update files.</li>
<li><i>Mount this filesystem to the same dir, where actual files are placed=
 - if it&#39;s not mounted, portage will almost not notice this (so in emer=
gency, 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, yo=
u can use files in real directory after mounting smth other there in such w=
ay.</i></li>
<li>Create indexes and other stuff.<br></li></ul><div class=3D"gmail_quote"=
>2008/11/24 Fabian Groffen <span dir=3D"ltr">&lt;<a href=3D"mailto:grobian@=
gentoo.org">grobian@gentoo.org</a>&gt;</span><br><blockquote class=3D"gmail=
_quote" style=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt=
 0pt 0.8ex; padding-left: 1ex;">
<div class=3D"Ih2E3d">On 24-11-2008 10:34:28 +0100, Ren=E9 &#39;Necoro&#39;=
 Neumann wrote:<br>
&gt; tvali schrieb:<br>
&gt; &gt; There is daemon, which notices about filesystem changes -<br>
&gt; &gt; <a href=3D"http://pyinotify.sourceforge.net/" target=3D"_blank">h=
ttp://pyinotify.sourceforge.net/</a> would be a good choice.<br>
&gt;<br>
&gt; Disadvantage: Has to run all the time (I see already some people cryin=
g:<br>
&gt; &quot;oh noez. not yet another daemon...&quot;).<br>
<br>
</div>... and it is Linux only, which spoils the fun.<br>
<font color=3D"#888888"><br>
<br>
--<br>
Fabian Groffen<br>
Gentoo on a different level<br>
<br>
</font></blockquote></div><br><br clear=3D"all"><br>-- <br>tvali<br><br>Kus=
kilt foorumist: <a href=3D"http://www.cooltests.com">http://www.cooltests.c=
om</a> - kui inglise keelt oskad. Muide, =FCle 120 oled v=E4ga tark, =FCle =
140 oled geenius, mingi 170 oled ju mingi t=E4ica pea nagu pr=FCgikast...<b=
r>


------=_Part_177788_15999674.1227537036305--