← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~andrey-fedoseev/launchpad-buildd:snap-target-architectures into launchpad-buildd:master

 

Andrey Fedoseev has proposed merging ~andrey-fedoseev/launchpad-buildd:snap-target-architectures into launchpad-buildd:master.

Commit message:
Replace SNAPCRAFT_BUILD_TO with SNAPCRAFT_BUILD_FOR

according to the updated snapcraft specification

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~andrey-fedoseev/launchpad-buildd/+git/launchpad-buildd/+merge/426571
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~andrey-fedoseev/launchpad-buildd:snap-target-architectures into launchpad-buildd:master.
diff --git a/debian/changelog b/debian/changelog
index 8b90a45..7a37ee9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ launchpad-buildd (216) UNRELEASED; urgency=medium
 
   [ Andrey Fedoseev ]
   * Allow specifying target architecture for snaps via
-    SNAPCRAFT_BUILD_TO environment variable
+    SNAPCRAFT_BUILD_FOR environment variable
 
   [ Colin Watson ]
   * Add a timeout when revoking proxy tokens.
diff --git a/lpbuildd/target/build_snap.py b/lpbuildd/target/build_snap.py
index 751bb61..9a8efec 100644
--- a/lpbuildd/target/build_snap.py
+++ b/lpbuildd/target/build_snap.py
@@ -186,7 +186,7 @@ class BuildSnap(BuilderProxyOperationMixin, VCSOperationMixin,
         env["SNAPCRAFT_IMAGE_INFO"] = self.image_info
         env["SNAPCRAFT_BUILD_ENVIRONMENT"] = "host"
         if self.args.target_architectures:
-            env["SNAPCRAFT_BUILD_TO"] = self.args.target_architectures[0]
+            env["SNAPCRAFT_BUILD_FOR"] = self.args.target_architectures[0]
         output_path = os.path.join("/build", self.args.name)
         self.run_build_command(["snapcraft"], cwd=output_path, env=env)
         for entry in sorted(self.backend.listdir(output_path)):
diff --git a/lpbuildd/target/tests/test_build_snap.py b/lpbuildd/target/tests/test_build_snap.py
index 644a2c2..5d94d8d 100644
--- a/lpbuildd/target/tests/test_build_snap.py
+++ b/lpbuildd/target/tests/test_build_snap.py
@@ -521,7 +521,7 @@ class TestBuildSnap(TestCase):
             RanBuildCommand(
                 ["snapcraft"], cwd="/build/test-snap",
                 SNAPCRAFT_BUILD_INFO="1", SNAPCRAFT_IMAGE_INFO="{}",
-                SNAPCRAFT_BUILD_ENVIRONMENT="host", SNAPCRAFT_BUILD_TO="i386"),
+                SNAPCRAFT_BUILD_ENVIRONMENT="host", SNAPCRAFT_BUILD_FOR="i386"),
             ]))
 
     # XXX cjwatson 2017-08-07: Test revoke_token.  It may be easiest to