Some new stuff

Joël Vennin jol at
Sat Aug 13 20:43:45 UTC 2005

Hello every one, I've taken sometime (this afternoon) to make a new set of 
functions for lunar. In fact, since a long time I was interesing to 
accelerate the lunar update step and other stuff around. 

So, my script need to use sqlite (last version available from moonbase, 
without any depend). Ok, it creates a database to store some information of 
the moonbase. Like the list
of module,version,updated fields and store inside the depends information of 
each modules.

Next, the script is able to update the database with the status of your 
already installed module (like the MODULE_STATUS file and the DEPENDS_STATUS 

So what's news ? It just really really fast ... So for now the script does 
nothing, it just a test to see if your insterested about it. So if your are 
insterested we could start to hack the lunar code to insert it.

To test it:

Before you start, just edit the DEPENDS file of netutils-profile module

and change this line:   "for the \"ping\" command" by "for the ping command"

you should be in the lsh script:
#> lsh

next you should load the database.lunar
#> source database.lunar

the first is to create the database:
#> create_db /tmp/lunar.db

the idea is now to initialize the database with your current system
#> init_with_current_install_db /tmp/lunar.db

now you can update the db with the moonbase
#> populate_from_moonbase_db /tmp/lunar.db

ok so now, i've just make two interesting query
get removed module
#> get_remoule_db /tmp/lunar.db 

get module that should be updated
#> get_updated_module_db /tmp/lunar.db

Ok so you can see that the two get method are really fast. However someone can 
say that "populate_from_moonbase" take some time, ok i agree with you.

But to solve this problem i've a solution:
before generate the moonbase every hour on the server, we should launch a 
script which do the same thing that "populate_from_moonbase" and dump the 
database, so the moonbase module should also contains a new file 

In this way, when someone launchs lunar update, the moonbase module is 
downloading as usual, and we can get the dump and update the database.
This operation takes not time, and after the thing can continue as usual using 
the new function provided by the database script ...

Ok it is just a proposition, i would like to known if you're interested by 
this thought.

I know that every function can be improved, sorry for my poor skill in bash 

Another avantage, if we use a database, we could remove a lots of complex 
script of the moonbase. Keep in mind that sqlite is really light :p



Standing on head makes smile of frown, but rest of face also upside down.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: database.lunar
Type: application/x-shellscript
Size: 7241 bytes
Desc: not available
Url :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the Lunar-dev mailing list