[wpkg-users] chained packages are ignored. Bug in wpkg?

Rainer Meier r.meier at wpkg.org
Tue May 3 18:31:36 CEST 2016


Hi Holger,

On 03.05.2016 14:43, Holger Kröber wrote:
> Hello,
>
> i would like to use the chaining feature of wpkg, so if i install package A,
> package B will also be installed.
> This works for me if i run package A for the first time (install mode). But if i
> run it again, e.g. after making
> some changes and increasing the version number, package B is ignored and no
> longer chained to package A
> (even if i also change the version number of package B).
> Maybe this is because the package is then running in upgrade mode and i use
> precheck-upgrade="always" in all of my packages.

In fact by definition "chained" means that if package A is processed, then it 
will (and only after processing A) process package B too.

In your case you are using precheck-upgrade which means WPKG will actually 
detect that package A is to be updated, then runs the pre-checks and very likely 
detects that the checks succeeds and there is no need to perform any actions on 
package A. Therefore it makes WPKG skip the installation of package A. As a 
result there is also nothing to be chained as package A does not actually get 
executed as you checks instruct WPKG not to do anything with package a.

The idea of chaining was to perform some changes or add additional packages to 
be executed right after some action in some other package is done. As your 
package A likely does not do any change, there is no need for WPKG to perform 
changes on package B. At least not if package B is only added to the 
host/profile via this chain. If you add package B directly to the profile, then 
WPKG should also detect this change and upgrade B. But there is no point in 
upgrading B if A is detected unchanged/unnecessary due to the precheck-upgrade.


> Also see here: https://marc.info/?l=wpkg-users&m=132982313114127
> In my opinion, the precheck-upgrade option makes absolutely sense, so i want to
> keep using this option.
> At the same time i want to use the chaining feature, but it seems, that there is
> a conflict.

I would have to check the code and I would say in case package A is upgraded 
(i.e. pre-checks enabled with false result so package A upgrade is performed) 
and no package B upgrade takes place (requires package B to be changed too) then 
it's a bug.

However in your situation you might be better off going for dependencies rather 
than chained packages. Dependencies will pull the package into the dependency 
tree rather than just executing a chain.


best regards,
Rainer



More information about the wpkg-users mailing list