lxc / go-lxc

Go bindings for liblxc
https://linuxcontainers.org/lxc
Other
431 stars 76 forks source link

bindings: adapt to new liblxc version output #89

Closed brauner closed 7 years ago

brauner commented 7 years ago

liblxc will now append "-devel" (e.g. 2.1.0-devel") when LXC_DEVEL is true. From a semantic versioning perspective liblxc is doing a saner thing than go-lxc with appending "-devel" instead of " (devel)" but we shouldn't break existing user. They might already rely on " (devel)" so let's keep it.

Signed-off-by: Christian Brauner christian.brauner@ubuntu.com

stgraber commented 7 years ago

I'm assuming the next step for this is to change the version check function to understand the -devel suffix too?

stgraber commented 7 years ago

At which point we should rip out the LXC_DEVEL define check from the go-lxc code tree entirely as it'd just lead to false positives at this point.

brauner commented 7 years ago

So this is just part of a branch that wanted to implement runtime liblxc detection but it's not as easily done as it occurred to me at first because of conditional compilation requirements. This is tricky in so far as you always have the danger of having mismatch between what go-lxc was compiled against vs what it is currently using as runtime dependency.

brauner commented 7 years ago

I can show you the full branch, one sec.

brauner commented 7 years ago

@stgraber, https://github.com/brauner/go-lxc/commits/2017-10-12/dynamically_check_for_liblxc_version