[Libosinfo] [PATCHv4 08/11] Use OS-specific config in OsinfoInstallScript

Christophe Fergeau cfergeau at redhat.com
Tue Dec 18 17:28:07 UTC 2012


On Tue, Dec 18, 2012 at 07:21:30PM +0200, Zeeshan Ali (Khattak) wrote:
> OK but don't think of it as something I want you to implement. :) The
> idea was simply to move this function to Entity class as virtual (and
> internal) and then have Config override it.. but now that I said it, I
> just realized that would be impossible to implement without breaking
> ABI. :(

Well, been there (without breaking the ABI, thanks to Marc-André), and went
back to this approach. You need to be able to get both the transformed and
untransformed value depending on the situation (transformed when generating
the OsinfoInstallScript, untransformed for example when cloning the
OsinfoInstallConfig object).
Given that we need 2 methods anyway, it seemed better not be too smart, and
to keep OsinfoEntity behaviour consistent
(osinfo_entity_set(entity, "A", "B"); followed by osinfo_entity_get(entity,
"A") will always return "B").

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20121218/ffab1580/attachment.sig>


More information about the Libosinfo mailing list