← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~ruinedyourlife/launchpad-buildd:feat-source-build-base into launchpad-buildd:master

 

Quentin Debhi has proposed merging ~ruinedyourlife/launchpad-buildd:feat-source-build-base into launchpad-buildd:master.

Commit message:
Source builds with temporary edge channel & archive gathering

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~ruinedyourlife/launchpad-buildd/+git/launchpad-buildd/+merge/472135

The installation channel for the sourcecraft snap will end up changing in the future, but it is the current working one we need.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~ruinedyourlife/launchpad-buildd:feat-source-build-base into launchpad-buildd:master.
diff --git a/lpbuildd/source.py b/lpbuildd/source.py
index b0aac67..740afd5 100644
--- a/lpbuildd/source.py
+++ b/lpbuildd/source.py
@@ -92,5 +92,5 @@ class SourceBuildManager(BuildManagerProxyMixin, DebianBuildManager):
                 path = os.path.join(output_path, entry)
                 if self.backend.islink(path):
                     continue
-                # 
-                self.addWaitingFileFromBackend(path)
+                if entry.endswith(".tar.xz"):
+                    self.addWaitingFileFromBackend(path)
diff --git a/lpbuildd/target/build_source.py b/lpbuildd/target/build_source.py
index 59b7d5f..7fedebe 100644
--- a/lpbuildd/target/build_source.py
+++ b/lpbuildd/target/build_source.py
@@ -82,7 +82,7 @@ class BuildSource(
                 ]
             )
         else:
-            self.backend.run(["snap", "install", "--classic", "--beta", "sourcecraft"])
+            self.backend.run(["snap", "install", "--classic", "--channel=latest/edge/craftctl", "sourcecraft"])
         # With classic confinement, the snap can access the whole system.
         # We could build the source in /build, but we are using /home/buildd
         # for consistency with other build types.
diff --git a/lpbuildd/target/tests/test_build_source.py b/lpbuildd/target/tests/test_build_source.py
index ba7eb28..e67cf9e 100644
--- a/lpbuildd/target/tests/test_build_source.py
+++ b/lpbuildd/target/tests/test_build_source.py
@@ -131,7 +131,7 @@ class TestBuildSource(TestCase):
                     RanAptGet(
                         "install", "bzr"
                     ),
-                    RanSnap("install", "--classic", "--beta", "sourcecraft"),
+                    RanSnap("install", "--classic", "--channel=latest/edge/craftctl", "sourcecraft"),
                     RanCommand(["mkdir", "-p", "/home/buildd"]),
                 ]
             ),
@@ -157,7 +157,7 @@ class TestBuildSource(TestCase):
                     RanAptGet(
                         "install", "git"
                     ),
-                    RanSnap("install", "--classic", "--beta", "sourcecraft"),
+                    RanSnap("install", "--classic", "--channel=latest/edge/craftctl", "sourcecraft"),
                     RanCommand(["mkdir", "-p", "/home/buildd"]),
                 ]
             ),
@@ -211,7 +211,7 @@ class TestBuildSource(TestCase):
                     RanCommand(
                         ["snap", "set", "core", "proxy.store=store-id"]
                     ),
-                    RanSnap("install", "--classic", "--beta", "sourcecraft"),
+                    RanSnap("install", "--classic", "--channel=latest/edge/craftctl", "sourcecraft"),
                     RanCommand(["mkdir", "-p", "/home/buildd"]),
                 ]
             ),
@@ -248,7 +248,7 @@ class TestBuildSource(TestCase):
                         "socat",
                         "git",
                     ),
-                    RanSnap("install", "--classic", "--beta", "sourcecraft"),
+                    RanSnap("install", "--classic", "--channel=latest/edge/craftctl", "sourcecraft"),
                     RanCommand(["mkdir", "-p", "/home/buildd"]),
                 ]
             ),
diff --git a/lpbuildd/tests/test_source.py b/lpbuildd/tests/test_source.py
index 06d9ff7..0f99fbe 100644
--- a/lpbuildd/tests/test_source.py
+++ b/lpbuildd/tests/test_source.py
@@ -120,7 +120,7 @@ class TestSourceBuildManagerIteration(TestCase):
             log.write("I am a build log.")
 
         self.buildmanager.backend.add_file(
-            "/home/buildd/test-source/test-source_0_all.source", b"I am sourceing."
+            "/home/buildd/test-source/test-source_0_all.tar.xz", b"I am sourceing."
         )
 
         # After building the package, reap processes.
@@ -145,7 +145,7 @@ class TestSourceBuildManagerIteration(TestCase):
             self.builder,
             HasWaitingFiles.byEquality(
                 {
-                    "test-source_0_all.source": b"I am sourceing.",
+                    "test-source_0_all.tar.xz": b"I am sourceing.",
                 }
             ),
         )
@@ -192,7 +192,7 @@ class TestSourceBuildManagerIteration(TestCase):
             log.write("I am a build log.")
 
         self.buildmanager.backend.add_file(
-            "/home/buildd/test-source/source/test-source_0_all.source",
+            "/home/buildd/test-source/source/test-source_0_all.tar.xz",
             b"I am sourceing.",
         )
 
@@ -218,7 +218,7 @@ class TestSourceBuildManagerIteration(TestCase):
             self.builder,
             HasWaitingFiles.byEquality(
                 {
-                    "test-source_0_all.source": b"I am sourceing.",
+                    "test-source_0_all.tar.xz": b"I am sourceing.",
                 }
             ),
         )