Skip to content

drivers: fix installation of multiple packages

Karel Koci requested to merge bugfix/drivers-fix-multiple-packages into develop

This fixes install requests for those devices requesting multiple packages. The issue here is that the second package was being ignored. This fixes the issue.

In depth explanation of what was happening: The Lua seems to be implementing arguments parsing in such a way that it takes value and pushes it to stack of arguments to specific position it is parsed from. The unpack seems to use this and it simply pushes arguments to position it is specified on and upward. Here that is the first position and for two packages that is first and second argument. The second argument here was { priority = 40 } and as it seems the interpreter simply set this dictionary to position of second argument thus rewriting the argument injected by unpack. Simply said: unpack seems to work only if it is the last argument in the function call.

Merge request reports