Hi developers!

I just have implemented compile time type check in package callbacks (see fate#302296 or bnc#51913). In short: function references are now used instead of strings (e.g. Pkg::CallbackProgressDownload(PackageCallbacks::ProgressDownload) instead of Pkg::CallbackProgressDownload("PackageCallbacks::ProgressDownload") which was error prone).

The advantage is that registering an invalid function is found at compile time now. Thanks to this feature I have found some problems and fixed them (missing callback functions, wrong parameters etc...)

The disadvantage is that the binary compatibility of *.ybc files is broken now.
Use 'y2tool y2compile' from yast2-devtools to recompile the modules after installing new yast2-pkg-bindings, yast2-packager and yast2.

The implementation of the package callbacks has been moved to yast2.rpm to break cyclic dependency between yast2 and yast2-packager. Another change is that PackageCallbacksInit.ycp module is obsoleted now, but remains for backward compatibility. Use PackageCallbacks::InitPackageCallbacks() instead of PackageCallbacksInit::InitPackageCallbacks() in your modules.


I have also adapted the other yast packages which register their own callbacks (autoinstallation, online-update, product-creator), please check my changes and submit the new package.

The change was quite large (and spread across 6 packages), if you find any problem with the new callbacks then contact me.


        Ladislav


--

Best Regards

Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o.                              e-mail: [EMAIL PROTECTED]
Lihovarská 1060/12                              tel: +420 284 028 960
190 00 Prague 9                                 fax: +420 284 028 951
Czech Republic                                  http://www.suse.cz/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to