diff --git a/elements/amphora-agent/install.d/amphora-agent-source-install/75-amphora-agent-install b/elements/amphora-agent/install.d/amphora-agent-source-install/75-amphora-agent-install index 0e2632d851..76f1a94cfd 100755 --- a/elements/amphora-agent/install.d/amphora-agent-source-install/75-amphora-agent-install +++ b/elements/amphora-agent/install.d/amphora-agent-source-install/75-amphora-agent-install @@ -16,6 +16,9 @@ $AMP_VENV/bin/pip install pip --upgrade $AMP_VENV/bin/pip install -U -c /opt/upper-constraints.txt /opt/amphora-agent +# Let's capture the git reference we installed in the venv +git --git-dir=/opt/amphora-agent/.git rev-parse HEAD >> /opt/amphora-agent.gitref + # Workaround https://github.com/svinota/pyroute2/issues/724 # TODO(johnsom) Remove once a that is resolved and 0.5.13 has been blocked in # global requirements. diff --git a/elements/amphora-agent/post-install.d/90-remove-build-deps b/elements/amphora-agent/post-install.d/90-remove-build-deps index 524a009e4e..1e10e23f33 100755 --- a/elements/amphora-agent/post-install.d/90-remove-build-deps +++ b/elements/amphora-agent/post-install.d/90-remove-build-deps @@ -9,7 +9,6 @@ set -o pipefail [ "${DIB_INSTALLTYPE_amphora_agent:-}" = "package" ] && exit 0 -awk 'FNR == 1 {print $1}' /opt/amphora-agent/.git/logs/HEAD >> /opt/amphora-agent.gitref rm -rf /opt/amphora-agent case $DISTRO_NAME in