Makefile looks for info about 'jujud' before it builds it

Bug #1866658 reported by John A Meinel on 2020-03-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju
Medium
Harry Pidcock

Bug Description

Juju 2.7.3+ currently has this in the Makefile:
OPERATOR_IMAGE_TAG ?= $(shell ${JUJUD_BIN_DIR}/jujud version | grep -E -o "^[[:digit:]]{1,9}\.[[:digit:]]{1,9}(\.|-[[:alpha:]]+)[[:digit:]]{1,9}(\.[[:digit:]]{1,9}
)?")
# Legacy tags never have a build number.
OPERATOR_IMAGE_TAG_LEGACY ?= $(shell ${JUJUD_BIN_DIR}/jujud version | grep -E -o "^[[:digit:]]{1,9}\.[[:digit:]]{1,9}(\.|-[[:alpha:]]+)[[:digit:]]{1,9}")

However, those are evaluated with the jujud that is in your PATH, which happens long before it actually builds the jujud itself.
Which means if you are switching between 2.7 and develop, it will build an operator-image with the wrong juju version.

It also means that in a fresh Make, you end up getting a bunch of "jujud not found" error messages that look confusing.
These should really be deferred until after 'go-install' has been run.

Changed in juju:
assignee: nobody → Harry Pidcock (hpidcock)
Harry Pidcock (hpidcock) wrote :
Changed in juju:
status: Triaged → In Progress
Harry Pidcock (hpidcock) on 2020-03-14
Changed in juju:
status: In Progress → Fix Committed
milestone: none → 2.7.5
Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers