Skip to content

Fixes #742: Put the fakemodules source in a directory within Kresus' data

Benjamin Bouvier requested to merge fix-weboob-moduleslist into master

This implements the naive thing:

  • when writing the list of sources, it will also copy the fakemodules source and paste it into KRESUS_DIR/fakemodules, instead of relying on the source. This happens because weboob wants to be able to write the modules.list within this directory itself, and we might not have permissions to do so if kresus has been installed with npm install -g kresus.
  • since we want the fake module to update itself, we need to clobber (that is, remove and rewrite) the entire directory every single time we need to create the list of sources... which happens every single time the Connector is created, so on fetch/update, etc.

This is unfortunate, but shouldn't be too noticeable, I guess? Also, when we have one weboob process in the background, the issue will be mitigated because we'll need to create the list of sources only very rarely.

Another solution would be to create the modules.list and embed it in production builds ourselves, but this seems rather complicated and could be a source of duplication of state (between the actual content that would be produced and the one we ship). Also, this would make it not quite future-proof if Weboob decides to change the format of the modules.list file; in particular, we'd need to ship a new (dotfix) version every time this file's format changes. So I'd rather not go down that road.

@ZeHiro or @phyks, can you try it on one of your devices, and let me know how it slows down the weboob fetch/update operations, please?

Merge request reports

Loading