cmake icon indicating copy to clipboard operation
cmake copied to clipboard

scripts not added through zeek_plugin_script are still added to packaging

Open ottobackwards opened this issue 2 years ago • 0 comments

zeek_plugin_script was created to help with dependency issues when rebuilding.

The issue was if you only changed a script, and did a new build ( without clean ) you would not get the changes in the new package/ install.

While zeek_plugin_script lets you add scripts, that are then tracked now as dependencies to solve the above behavior, it is not completely correct, or perhaps not intuitively correct.

The way zeek_plugin_script should currently be understood is "Scripts added through zeek_plugin_script will be tracked for changes such that any changes to them alone can trigger a repackaging of all scripts"

It is perhaps unintuitive that zeek_plugin_script does not define the complete script set ( in the same way that you would have to add a .cc file to having it built ) but instead is a trigger where even undefined scripts will be packaged.

This is because the script to create the package is not aware of these definitions and just takes the whole script directory.

It would be more correct if the zeek_plugin_script -> _plugin_scripts var was honored by the packaging script IF PRESENT and only those scripts where included in the package.

Thus making the descriptions:

  • zeek_plugin_script is optional, but when used defines the complete set of scripts that will be packaged with the plugin, and whose changes will be enough to cause a re-packaging in and of themselves.
  • If it is not used at all then all scripts in the scripts directory will be packaged, but changes will not be tracked without a make clean.

ottobackwards avatar Nov 18 '21 16:11 ottobackwards