RE: binding module definitions to the DB

"Gupta, Rita" <[email protected]> Thu, 12 Jan 2006 10:16:11 +0530
Newsgroups gmane.linux.lsb.test-suite
Message-ID <47B11D29BBB75A41A5E85352637F2500909814@bgsmsx404>
>
>Attached is a patch that auto generates a new header and struct
(modules.h
>and modules.c respectively) to resolve this- also, bit of an update to
the
>makefile involved, since it's not forcing regen when scripts used for
>generation change.
>
>Only potential con to this modification is that if the DB is screwed up
>(lacking Modules entries), it's possible to get compilation failures-
in my
>opinion, this is a bit of a pro however.  Fails in compilation, but
you're
>not using definitions that are no longer relevant essentially.
>
>Intend on tagging this change into cvs next few days assuming no
negative
>feedback.

Looks good to me. Another suggestion though ...
We could add a "product_type" member to the structure=20
struct lsb_module {
   char *name;
   unsigned int flag;
   char *product_type;
};
...and assign a product type corresponding to the LSB_PRODUCT env
variable. This would automate the module setting from the environment
variable as well. I'm assuming the product_type info is available in DB.

-Rita