[yast-devel] Pkg::SourceFinishAll() - new sematics in 11.1
Hi all, I have changed semantics of Pkg::SourceFinishAll() call in yast2-pkg-bindings-2.17.0. In the past it saved all known repositories and disabled them. Due to bug #395738 (and similar #155459, #176013) we need to separate saving and finishing the repositories. Another problem is that after Pkg::SourceFinishAll() reloading was not possible - this was also fixed, the sources are removed instead of disabling, so the next reload (Pkg::SourceStartManager()) will be successful. For YCP scripts that means that they should use Pkg::SourceSaveAll() when they add a new repository. Pkg::SourceFinishAll() should be used when the module finishes. (But all repositories are destroyed automatically in Pkg:: destructor, so nothing wrong happens when it's missing.) I have adapted and submitted all affected yast modules, just check your code when you use Pkg::SourceFinishAll() if it is OK. -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz 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: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Ladislav Slezak wrote:
Hi all,
I have changed semantics of Pkg::SourceFinishAll() call in yast2-pkg-bindings-2.17.0.
In the past it saved all known repositories and disabled them.
Due to bug #395738 (and similar #155459, #176013) we need to separate saving and finishing the repositories. Another problem is that after Pkg::SourceFinishAll() reloading was not possible - this was also fixed, the sources are removed instead of disabling, so the next reload (Pkg::SourceStartManager()) will be successful.
Great :) thanks! This means that a lot of possible issues during installation will vanish...
For YCP scripts that means that they should use Pkg::SourceSaveAll() when they add a new repository. Pkg::SourceFinishAll() should be used when the module finishes. (But all repositories are destroyed automatically in Pkg:: destructor, so nothing wrong happens when it's missing.)
Which means Pkg::SourceFinishAll() stays just for backward compatibility or does it do anything else that makes it better for us to still call it, e.g., free some resources?
I have adapted and submitted all affected yast modules, just check your code when you use Pkg::SourceFinishAll() if it is OK.
Thanks :) Bye L.
Lukas Ocilka wrote: [...]
Which means Pkg::SourceFinishAll() stays just for backward compatibility or does it do anything else that makes it better for us to still call it, e.g., free some resources?
It should free some resources (it removes all resolvables from the zypp pool). But it's usually called at the end, so it doesn't help much. To save some memory it should be called when the package manager will not be used anymore, e.g. just after installing packages. -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz 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: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Ladislav Slezak
-
Lukas Ocilka