The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd-pkg-snap/pull/57

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
If available, use project._get_build_base() to get the project's
build base.

If _get_build_base() is not available (snapcraft < 4.0), then
resort to using project.info.base, which is safe to use for this
project as it specifies a base.  ProjectInfo will eventually be
removed, so this prioritizes the new interface.

Signed-off-by: LXD snap builder <nore...@linuxcontainers.org>
From 05027d811a0f1fc6be266afc2507a0f7a1d10eaa Mon Sep 17 00:00:00 2001
From: LXD snap builder <nore...@linuxcontainers.org>
Date: Fri, 29 May 2020 13:41:58 +0000
Subject: [PATCH] nogogetgo: fix getting build base on snapcraft 4.0+

If available, use project._get_build_base() to get the project's
build base.

If _get_build_base() is not available (snapcraft < 4.0), then
resort to using project.info.base, which is safe to use for this
project as it specifies a base.  ProjectInfo will eventually be
removed, so this prioritizes the new interface.

Signed-off-by: LXD snap builder <nore...@linuxcontainers.org>
---
 snap/plugins/nogetgo.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/snap/plugins/nogetgo.py b/snap/plugins/nogetgo.py
index 7005580..b527ca3 100644
--- a/snap/plugins/nogetgo.py
+++ b/snap/plugins/nogetgo.py
@@ -140,7 +140,12 @@ def get_pull_properties(cls) -> List[str]:
     def __init__(self, name: str, options, project: "Project") -> None:
         super().__init__(name, options, project)
 
-        self._setup_base_tools(options.go_channel, 
project.info.get_build_base())
+        if hasattr(project, "_get_build_base"):
+            base = project._get_build_base()
+        else:
+            base = project.info.base
+
+        self._setup_base_tools(options.go_channel, base)
         self._is_classic = project.info.confinement == "classic"
 
         self._install_bin_dir = os.path.join(self.installdir, "bin")
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to