[OpenSIPS-Devel] Package dependencies

Dan Pascu dan at ag-projects.com
Fri Mar 29 08:12:08 EDT 2019


Since migrating to the json format for MI, opensipsctl now uses json_pp which is part of perl. This would need ${perl:Depends} to be added to Depends (or at least Recommends) for opensips in debian/control.

Alternatively, since opensips already depends on python, json_pp can be replaced with:

python -c "import json,sys; print(json.dumps(json.loads(sys.stdin.read()), indent=3))"

which yields the same result. The advantage of the python version (besides avoiding an extra dependency) is that the order of the items in the output is always consistent (json_pp outputs items in a random order that differs from run to run).

Personally I prefer the python version since it offers 2 advantages while json_pp offers none. What do you think?

--
Dan







More information about the Devel mailing list