Hi,
I'm working on adding .db support to the pkg_tools( i.e. pkg_add,
pkg_info, etc. ) as part of SoC 2008. The database api used is BerkeleyDB
that comes with the base system (/usr/src/include/db.h). BerkeleyDB is not
you're typical relational db, and can only save key/value pairs. The way
I'm thinking of storing information to the .db is to name the keys as the
directory names in /var/db/pkg. And save the +* files in the directories
to the value element in the db, separated with a special character or
similar.
One problem lies with the +* files which is scripts (e.g., +INSTALL,
+DEINSTALL). I've gotten some input that it's bad to save scripts in the
db, but if it's not going to be saved there, then where? Isn't it possible
to execute a script without saving a file to disk? Like using "sh -c
'string'". In my personal opinion it should not be a hybrid solution where
you save the script files in an old fashion way, for example
/var/db/pkg/someport-1.2_1/+INSTALL, and the rest of the information lies
in the .db file. Because then you have redundancy and that could lead to
inconsistencies.
Let me hear your opinions =)
- Anders Nore
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"