zeek / package-manager

A package manager for Zeek
https://docs.zeek.org/projects/package-manager
Other
43 stars 27 forks source link

Overriden `ZKG_DEFAULT_TEMPLATE` ignored if also using `--configfile` #144

Open bbannier opened 2 years ago

bbannier commented 2 years ago

One should be able to override a configured templates by setting ZKG_DEFAULT_TEMPLATE. This seems not to work when also using --configfile.

Reproducer in zeekurity/zeek:5.0.2 image:

ckreibich commented 2 years ago

Good catch, yep! This is a simple logic bug in zkg's setup. Fix forthcoming.

ckreibich commented 2 years ago

This does not just affect ZKG_DEFAULT_TEMPLATE ... a related problem applies to ZKG_DEFAULT_SOURCE: it just gets ignored:

$ export ZKG_DEFAULT_SOURCE=nonsense
$ zkg refresh
Refresh package source: zeek
        No membership changes
Refresh installed packages
        No new outdated packages

So here it doesn't even matter whether you explicitly provide a config. I'm not sure when this happened, but these are clearly holes in the testsuite. I'll take a look.