[haiku-development] Re: index_server some questions

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 17 Jan 2017 07:51:59 +0000

17 janvier 2017 08:30 "Matthias Lindner" <two4god@xxxxxxxxx> a écrit:

Hi,


regarding index_server i have some questions

since introducing the packagemanagement some things need to be rewritten

to make it work properly (e.g. using find_directory). So i have some 
questions there.

Clemens Zeidler implemented it, that way that at every writable volumen there 
was a

./IndexServer folder created at the root wich contained all Informations for 
the index_server.

Since it dont follow the BeOS way, from my oppinion, and since 
packagemangement the folder
structure are mor regulated (wich i learned to like -> thanks Ingo :-D) I 
decided to write all data
from the index_server into

/boot/home/config/settings/index_server of the boot volumen.

For every Volume i create a subfolder, named after this volumen and store all 
indexed data in
there.

Thats what i implemented at the moment (any pro or cons are welcome)

But this is not fully optimale since it could happen that you mount two 
different volumes with the
same name (maybe a usb device)

There is also the problem that if a computer indexes an USB device, and you 
move the device to another comuter, the index is not moved along with it.
Something to consider would be using the same logic as for the "trash" folder. 
This one is stored directly on the volume, so the metadata moves with the data 
from one computer to the other.

However, do we want to index read-only volumes? For example, indexing CDs could 
be nice. And in that use case, having the index on the boot drive means you can 
search it, and the system can tell you which CD to insert to access the file. 
This can be a pretty nice feature.

Talking about the settings file - is there any "settingsfile-engine" like the 
api for the driver
settings around so that we can have "common" settings format ?

You can use the "driver settings" API outside of drivers. An alternative is to 
use flatenned BMessages, for settings files which don't need to be 
user-editable.


Two other questions came to my mind:
1. How do i identify Volumes only "created" by the packagemangement? I now 
have the index_server
creating a "system" volumen folder e.g. and scanning a lot of "empty" refs 
(Clemens already checked
Capacity for 0 to avid / and /dev volumes)

It sounds like it would be better to detect the filesystem type. Scan BFS, 
FAT32 etc, but ignore packagefs, rootfs and devfs.

2. What folders should be disabled by default?

For "normal" volumes, ignore the trash and scan everything else.
For the boot volume, scan /home excluding /home/config, and scan everything 
else except /system?

-- 
Adrien.

Other related posts: