From 8aee2ec76d8d9734df77a8b5f27391f29ef7643a Mon Sep 17 00:00:00 2001 From: Matthias Stecher Date: Mon, 7 Mar 2022 15:27:26 +0100 Subject: [PATCH] __netbox: pass handling of requirements.txt to pip3 Previous handling passed a list of pip packages from the requirements.txt via xargs to the pip install directly. This is error-prone, as shown with the major 3 Netbox release. This type breaks cause of comments inside of it. This commit fixes it, while keeping the compatibility to install gnuicorn separate. --- type/__netbox/gencode-remote | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/type/__netbox/gencode-remote b/type/__netbox/gencode-remote index 5d4b7be..2206b03 100755 --- a/type/__netbox/gencode-remote +++ b/type/__netbox/gencode-remote @@ -51,7 +51,9 @@ fi # Install python dependencies. # avoid gunicorn, because it will be done in an other type grep -v "^gunicorn==" "\$tmpdir/$src/requirements.txt" \ - | xargs /opt/netbox/venv/bin/pip3 install -q + > "\$tmpdir/$src/requirements.txt.new" +/opt/netbox/venv/bin/pip3 install -q -r "\$tmpdir/$src/requirements.txt.new" + EOF if [ -f "$__object/parameter/ldap-server" ]; then