Merge lp:~cjwatson/launchpad/snap-source-tarball into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 18623
Proposed branch: lp:~cjwatson/launchpad/snap-source-tarball
Merge into: lp:launchpad
Diff against target: 388 lines (+91/-9)
11 files modified
lib/lp/snappy/browser/snap.py (+4/-0)
lib/lp/snappy/browser/tests/test_snap.py (+27/-0)
lib/lp/snappy/interfaces/snap.py (+7/-0)
lib/lp/snappy/model/snap.py (+10/-4)
lib/lp/snappy/model/snapbuildbehaviour.py (+1/-0)
lib/lp/snappy/templates/snap-edit.pt (+4/-0)
lib/lp/snappy/templates/snap-index.pt (+9/-0)
lib/lp/snappy/templates/snap-new.pt (+3/-0)
lib/lp/snappy/tests/test_snap.py (+4/-0)
lib/lp/snappy/tests/test_snapbuildbehaviour.py (+14/-0)
lib/lp/testing/factory.py (+8/-5)
To merge this branch: bzr merge lp:~cjwatson/launchpad/snap-source-tarball
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+343727@code.launchpad.net

Commit message

Add an option to build source tarballs for snaps.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/snappy/browser/snap.py'
--- lib/lp/snappy/browser/snap.py 2018-04-04 13:28:28 +0000
+++ lib/lp/snappy/browser/snap.py 2018-04-21 10:15:59 +0000
@@ -320,6 +320,7 @@
320 'private',320 'private',
321 'require_virtualized',321 'require_virtualized',
322 'allow_internet',322 'allow_internet',
323 'build_source_tarball',
323 'auto_build',324 'auto_build',
324 'store_upload',325 'store_upload',
325 ])326 ])
@@ -374,6 +375,7 @@
374 'owner',375 'owner',
375 'name',376 'name',
376 'store_distro_series',377 'store_distro_series',
378 'build_source_tarball',
377 'auto_build',379 'auto_build',
378 'auto_build_archive',380 'auto_build_archive',
379 'auto_build_pocket',381 'auto_build_pocket',
@@ -511,6 +513,7 @@
511 auto_build_archive=data['auto_build_archive'],513 auto_build_archive=data['auto_build_archive'],
512 auto_build_pocket=data['auto_build_pocket'],514 auto_build_pocket=data['auto_build_pocket'],
513 processors=data['processors'], private=private,515 processors=data['processors'], private=private,
516 build_source_tarball=data['build_source_tarball'],
514 store_upload=data['store_upload'],517 store_upload=data['store_upload'],
515 store_series=data['store_distro_series'].snappy_series,518 store_series=data['store_distro_series'].snappy_series,
516 store_name=data['store_name'],519 store_name=data['store_name'],
@@ -681,6 +684,7 @@
681 'vcs',684 'vcs',
682 'branch',685 'branch',
683 'git_ref',686 'git_ref',
687 'build_source_tarball',
684 'auto_build',688 'auto_build',
685 'auto_build_archive',689 'auto_build_archive',
686 'auto_build_pocket',690 'auto_build_pocket',
687691
=== modified file 'lib/lp/snappy/browser/tests/test_snap.py'
--- lib/lp/snappy/browser/tests/test_snap.py 2018-04-04 14:14:30 +0000
+++ lib/lp/snappy/browser/tests/test_snap.py 2018-04-21 10:15:59 +0000
@@ -243,6 +243,9 @@
243 "Source:\n%s\nEdit snap package" % source_display,243 "Source:\n%s\nEdit snap package" % source_display,
244 MatchesTagText(content, "source"))244 MatchesTagText(content, "source"))
245 self.assertThat(245 self.assertThat(
246 "Build source tarball:\nNo\nEdit snap package",
247 MatchesTagText(content, "build_source_tarball"))
248 self.assertThat(
246 "Build schedule:\n(?)\nBuilt on request\nEdit snap package\n",249 "Build schedule:\n(?)\nBuilt on request\nEdit snap package\n",
247 MatchesTagText(content, "auto_build"))250 MatchesTagText(content, "auto_build"))
248 self.assertThat(251 self.assertThat(
@@ -277,6 +280,9 @@
277 "Source:\n%s\nEdit snap package" % source_display,280 "Source:\n%s\nEdit snap package" % source_display,
278 MatchesTagText(content, "source"))281 MatchesTagText(content, "source"))
279 self.assertThat(282 self.assertThat(
283 "Build source tarball:\nNo\nEdit snap package",
284 MatchesTagText(content, "build_source_tarball"))
285 self.assertThat(
280 "Build schedule:\n(?)\nBuilt on request\nEdit snap package\n",286 "Build schedule:\n(?)\nBuilt on request\nEdit snap package\n",
281 MatchesTagText(content, "auto_build"))287 MatchesTagText(content, "auto_build"))
282 self.assertThat(288 self.assertThat(
@@ -355,6 +361,20 @@
355 extract_text(find_tag_by_id(browser.contents, "privacy"))361 extract_text(find_tag_by_id(browser.contents, "privacy"))
356 )362 )
357363
364 def test_create_new_snap_build_source_tarball(self):
365 # We can create a new snap and ask for it to build a source tarball.
366 branch = self.factory.makeAnyBranch()
367 browser = self.getViewBrowser(
368 branch, view_name="+new-snap", user=self.person)
369 browser.getControl(name="field.name").value = "snap-name"
370 browser.getControl("Build source tarball").selected = True
371 browser.getControl("Create snap package").click()
372
373 content = find_main_content(browser.contents)
374 self.assertThat(
375 "Build source tarball:\nYes\nEdit snap package",
376 MatchesTagText(content, "build_source_tarball"))
377
358 def test_create_new_snap_auto_build(self):378 def test_create_new_snap_auto_build(self):
359 # Creating a new snap and asking for it to be automatically built379 # Creating a new snap and asking for it to be automatically built
360 # sets all the appropriate fields.380 # sets all the appropriate fields.
@@ -686,6 +706,7 @@
686 browser.getControl("Git repository").value = (706 browser.getControl("Git repository").value = (
687 new_git_ref.repository.identity)707 new_git_ref.repository.identity)
688 browser.getControl("Git branch").value = new_git_ref.path708 browser.getControl("Git branch").value = new_git_ref.path
709 browser.getControl("Build source tarball").selected = True
689 browser.getControl(710 browser.getControl(
690 "Automatically build when branch changes").selected = True711 "Automatically build when branch changes").selected = True
691 browser.getControl("PPA").click()712 browser.getControl("PPA").click()
@@ -705,6 +726,9 @@
705 "Source:\n%s\nEdit snap package" % new_git_ref.display_name,726 "Source:\n%s\nEdit snap package" % new_git_ref.display_name,
706 MatchesTagText(content, "source"))727 MatchesTagText(content, "source"))
707 self.assertThat(728 self.assertThat(
729 "Build source tarball:\nYes\nEdit snap package",
730 MatchesTagText(content, "build_source_tarball"))
731 self.assertThat(
708 "Build schedule:\n(?)\nBuilt automatically\nEdit snap package\n",732 "Build schedule:\n(?)\nBuilt automatically\nEdit snap package\n",
709 MatchesTagText(content, "auto_build"))733 MatchesTagText(content, "auto_build"))
710 self.assertThat(734 self.assertThat(
@@ -1223,6 +1247,7 @@
1223 Owner: Test Person1247 Owner: Test Person
1224 Distribution series: Ubuntu Shiny1248 Distribution series: Ubuntu Shiny
1225 Source: lp://dev/~test-person/\\+junk/snap-branch1249 Source: lp://dev/~test-person/\\+junk/snap-branch
1250 Build source tarball: No
1226 Build schedule: \(\?\)1251 Build schedule: \(\?\)
1227 Built on request1252 Built on request
1228 Source archive for automatic builds:1253 Source archive for automatic builds:
@@ -1250,6 +1275,7 @@
1250 Owner: Test Person1275 Owner: Test Person
1251 Distribution series: Ubuntu Shiny1276 Distribution series: Ubuntu Shiny
1252 Source: ~test-person/\\+git/snap-repository:master1277 Source: ~test-person/\\+git/snap-repository:master
1278 Build source tarball: No
1253 Build schedule: \(\?\)1279 Build schedule: \(\?\)
1254 Built on request1280 Built on request
1255 Source archive for automatic builds:1281 Source archive for automatic builds:
@@ -1277,6 +1303,7 @@
1277 Owner: Test Person1303 Owner: Test Person
1278 Distribution series: Ubuntu Shiny1304 Distribution series: Ubuntu Shiny
1279 Source: https://git.example.org/foo master1305 Source: https://git.example.org/foo master
1306 Build source tarball: No
1280 Build schedule: \(\?\)1307 Build schedule: \(\?\)
1281 Built on request1308 Built on request
1282 Source archive for automatic builds:1309 Source archive for automatic builds:
12831310
=== modified file 'lib/lp/snappy/interfaces/snap.py'
--- lib/lp/snappy/interfaces/snap.py 2018-04-15 16:23:14 +0000
+++ lib/lp/snappy/interfaces/snap.py 2018-04-21 10:15:59 +0000
@@ -498,6 +498,13 @@
498 "The Git branch containing a snap/snapcraft.yaml, snapcraft.yaml, "498 "The Git branch containing a snap/snapcraft.yaml, snapcraft.yaml, "
499 "or .snapcraft.yaml recipe at the top level.")))499 "or .snapcraft.yaml recipe at the top level.")))
500500
501 build_source_tarball = exported(Bool(
502 title=_("Build source tarball"),
503 required=True, readonly=False,
504 description=_(
505 "Whether builds of this snap package should also build a tarball "
506 "containing all source code, including external dependencies.")))
507
501 auto_build = exported(Bool(508 auto_build = exported(Bool(
502 title=_("Automatically build when branch changes"),509 title=_("Automatically build when branch changes"),
503 required=True, readonly=False,510 required=True, readonly=False,
504511
=== modified file 'lib/lp/snappy/model/snap.py'
--- lib/lp/snappy/model/snap.py 2018-04-04 14:14:30 +0000
+++ lib/lp/snappy/model/snap.py 2018-04-21 10:15:59 +0000
@@ -200,6 +200,8 @@
200200
201 allow_internet = Bool(name='allow_internet', allow_none=False)201 allow_internet = Bool(name='allow_internet', allow_none=False)
202202
203 build_source_tarball = Bool(name='build_source_tarball', allow_none=False)
204
203 store_upload = Bool(name='store_upload', allow_none=False)205 store_upload = Bool(name='store_upload', allow_none=False)
204206
205 store_series_id = Int(name='store_series', allow_none=True)207 store_series_id = Int(name='store_series', allow_none=True)
@@ -216,8 +218,9 @@
216 auto_build_archive=None, auto_build_pocket=None,218 auto_build_archive=None, auto_build_pocket=None,
217 auto_build_channels=None, require_virtualized=True,219 auto_build_channels=None, require_virtualized=True,
218 date_created=DEFAULT, private=False, allow_internet=True,220 date_created=DEFAULT, private=False, allow_internet=True,
219 store_upload=False, store_series=None, store_name=None,221 build_source_tarball=False, store_upload=False,
220 store_secrets=None, store_channels=None):222 store_series=None, store_name=None, store_secrets=None,
223 store_channels=None):
221 """Construct a `Snap`."""224 """Construct a `Snap`."""
222 super(Snap, self).__init__()225 super(Snap, self).__init__()
223 self.registrant = registrant226 self.registrant = registrant
@@ -236,6 +239,7 @@
236 self.date_last_modified = date_created239 self.date_last_modified = date_created
237 self.private = private240 self.private = private
238 self.allow_internet = allow_internet241 self.allow_internet = allow_internet
242 self.build_source_tarball = build_source_tarball
239 self.store_upload = store_upload243 self.store_upload = store_upload
240 self.store_series = store_series244 self.store_series = store_series
241 self.store_name = store_name245 self.store_name = store_name
@@ -672,8 +676,9 @@
672 auto_build_archive=None, auto_build_pocket=None,676 auto_build_archive=None, auto_build_pocket=None,
673 auto_build_channels=None, require_virtualized=True,677 auto_build_channels=None, require_virtualized=True,
674 processors=None, date_created=DEFAULT, private=False,678 processors=None, date_created=DEFAULT, private=False,
675 allow_internet=True, store_upload=False, store_series=None,679 allow_internet=True, build_source_tarball=False,
676 store_name=None, store_secrets=None, store_channels=None):680 store_upload=False, store_series=None, store_name=None,
681 store_secrets=None, store_channels=None):
677 """See `ISnapSet`."""682 """See `ISnapSet`."""
678 if not registrant.inTeam(owner):683 if not registrant.inTeam(owner):
679 if owner.is_team:684 if owner.is_team:
@@ -717,6 +722,7 @@
717 auto_build_channels=auto_build_channels,722 auto_build_channels=auto_build_channels,
718 require_virtualized=require_virtualized, date_created=date_created,723 require_virtualized=require_virtualized, date_created=date_created,
719 private=private, allow_internet=allow_internet,724 private=private, allow_internet=allow_internet,
725 build_source_tarball=build_source_tarball,
720 store_upload=store_upload, store_series=store_series,726 store_upload=store_upload, store_series=store_series,
721 store_name=store_name, store_secrets=store_secrets,727 store_name=store_name, store_secrets=store_secrets,
722 store_channels=store_channels)728 store_channels=store_channels)
723729
=== modified file 'lib/lp/snappy/model/snapbuildbehaviour.py'
--- lib/lp/snappy/model/snapbuildbehaviour.py 2018-04-04 14:14:30 +0000
+++ lib/lp/snappy/model/snapbuildbehaviour.py 2018-04-21 10:15:59 +0000
@@ -132,6 +132,7 @@
132 raise CannotBuild(132 raise CannotBuild(
133 "Source branch/repository for ~%s/%s has been deleted." %133 "Source branch/repository for ~%s/%s has been deleted." %
134 (build.snap.owner.name, build.snap.name))134 (build.snap.owner.name, build.snap.name))
135 args["build_source_tarball"] = build.snap.build_source_tarball
135 defer.returnValue(args)136 defer.returnValue(args)
136137
137 @defer.inlineCallbacks138 @defer.inlineCallbacks
138139
=== modified file 'lib/lp/snappy/templates/snap-edit.pt'
--- lib/lp/snappy/templates/snap-edit.pt 2017-03-27 19:28:36 +0000
+++ lib/lp/snappy/templates/snap-edit.pt 2018-04-21 10:15:59 +0000
@@ -60,6 +60,10 @@
60 </td>60 </td>
61 </tr>61 </tr>
6262
63 <tal:widget define="widget nocall:view/widgets/build_source_tarball">
64 <metal:block use-macro="context/@@launchpad_form/widget_row" />
65 </tal:widget>
66
63 <tal:widget define="widget nocall:view/widgets/auto_build">67 <tal:widget define="widget nocall:view/widgets/auto_build">
64 <metal:block use-macro="context/@@launchpad_form/widget_row" />68 <metal:block use-macro="context/@@launchpad_form/widget_row" />
65 </tal:widget>69 </tal:widget>
6670
=== modified file 'lib/lp/snappy/templates/snap-index.pt'
--- lib/lp/snappy/templates/snap-index.pt 2017-01-04 20:52:12 +0000
+++ lib/lp/snappy/templates/snap-index.pt 2018-04-21 10:15:59 +0000
@@ -61,6 +61,15 @@
61 <a tal:replace="structure view/menu:overview/edit/fmt:icon"/>61 <a tal:replace="structure view/menu:overview/edit/fmt:icon"/>
62 </dd>62 </dd>
63 </dl>63 </dl>
64 <dl id="build_source_tarball"
65 tal:define="build_source_tarball context/build_source_tarball">
66 <dt>Build source tarball:</dt>
67 <dd>
68 <span tal:condition="build_source_tarball">Yes</span>
69 <span tal:condition="not: build_source_tarball">No</span>
70 <a tal:replace="structure view/menu:overview/edit/fmt:icon"/>
71 </dd>
72 </dl>
6473
65 <dl id="auto_build">74 <dl id="auto_build">
66 <dt>Build schedule:75 <dt>Build schedule:
6776
=== modified file 'lib/lp/snappy/templates/snap-new.pt'
--- lib/lp/snappy/templates/snap-new.pt 2017-03-27 19:28:36 +0000
+++ lib/lp/snappy/templates/snap-new.pt 2018-04-21 10:15:59 +0000
@@ -35,6 +35,9 @@
35 <tal:widget define="widget nocall:view/widgets/processors">35 <tal:widget define="widget nocall:view/widgets/processors">
36 <metal:block use-macro="context/@@launchpad_form/widget_row" />36 <metal:block use-macro="context/@@launchpad_form/widget_row" />
37 </tal:widget>37 </tal:widget>
38 <tal:widget define="widget nocall:view/widgets/build_source_tarball">
39 <metal:block use-macro="context/@@launchpad_form/widget_row" />
40 </tal:widget>
3841
39 <tal:widget define="widget nocall:view/widgets/auto_build">42 <tal:widget define="widget nocall:view/widgets/auto_build">
40 <metal:block use-macro="context/@@launchpad_form/widget_row" />43 <metal:block use-macro="context/@@launchpad_form/widget_row" />
4144
=== modified file 'lib/lp/snappy/tests/test_snap.py'
--- lib/lp/snappy/tests/test_snap.py 2018-04-15 16:23:14 +0000
+++ lib/lp/snappy/tests/test_snap.py 2018-04-21 10:15:59 +0000
@@ -654,6 +654,7 @@
654 self.assertTrue(snap.require_virtualized)654 self.assertTrue(snap.require_virtualized)
655 self.assertFalse(snap.private)655 self.assertFalse(snap.private)
656 self.assertTrue(snap.allow_internet)656 self.assertTrue(snap.allow_internet)
657 self.assertFalse(snap.build_source_tarball)
657658
658 def test_creation_git(self):659 def test_creation_git(self):
659 # The metadata entries supplied when a Snap is created for a Git660 # The metadata entries supplied when a Snap is created for a Git
@@ -676,6 +677,7 @@
676 self.assertTrue(snap.require_virtualized)677 self.assertTrue(snap.require_virtualized)
677 self.assertFalse(snap.private)678 self.assertFalse(snap.private)
678 self.assertTrue(snap.allow_internet)679 self.assertTrue(snap.allow_internet)
680 self.assertFalse(snap.build_source_tarball)
679681
680 def test_creation_git_url(self):682 def test_creation_git_url(self):
681 # A Snap can be backed directly by a URL for an external Git683 # A Snap can be backed directly by a URL for an external Git
@@ -1381,6 +1383,7 @@
1381 self.assertIsNone(snap["git_ref_link"])1383 self.assertIsNone(snap["git_ref_link"])
1382 self.assertTrue(snap["require_virtualized"])1384 self.assertTrue(snap["require_virtualized"])
1383 self.assertTrue(snap["allow_internet"])1385 self.assertTrue(snap["allow_internet"])
1386 self.assertFalse(snap["build_source_tarball"])
13841387
1385 def test_new_git(self):1388 def test_new_git(self):
1386 # Ensure Snap creation based on a Git branch works.1389 # Ensure Snap creation based on a Git branch works.
@@ -1402,6 +1405,7 @@
1402 self.assertEqual(self.getURL(ref), snap["git_ref_link"])1405 self.assertEqual(self.getURL(ref), snap["git_ref_link"])
1403 self.assertTrue(snap["require_virtualized"])1406 self.assertTrue(snap["require_virtualized"])
1404 self.assertTrue(snap["allow_internet"])1407 self.assertTrue(snap["allow_internet"])
1408 self.assertFalse(snap["build_source_tarball"])
14051409
1406 def test_new_private(self):1410 def test_new_private(self):
1407 # Ensure private Snap creation works.1411 # Ensure private Snap creation works.
14081412
=== modified file 'lib/lp/snappy/tests/test_snapbuildbehaviour.py'
--- lib/lp/snappy/tests/test_snapbuildbehaviour.py 2018-04-04 14:14:30 +0000
+++ lib/lp/snappy/tests/test_snapbuildbehaviour.py 2018-04-21 10:15:59 +0000
@@ -278,6 +278,7 @@
278 "archives": expected_archives,278 "archives": expected_archives,
279 "arch_tag": "i386",279 "arch_tag": "i386",
280 "branch": branch.bzr_identity,280 "branch": branch.bzr_identity,
281 "build_source_tarball": False,
281 "build_url": canonical_url(job.build),282 "build_url": canonical_url(job.build),
282 "name": "test-snap",283 "name": "test-snap",
283 "proxy_url": self.proxy_url,284 "proxy_url": self.proxy_url,
@@ -300,6 +301,7 @@
300 "archive_private": False,301 "archive_private": False,
301 "archives": expected_archives,302 "archives": expected_archives,
302 "arch_tag": "i386",303 "arch_tag": "i386",
304 "build_source_tarball": False,
303 "build_url": canonical_url(job.build),305 "build_url": canonical_url(job.build),
304 "git_repository": ref.repository.git_https_url,306 "git_repository": ref.repository.git_https_url,
305 "git_path": ref.name,307 "git_path": ref.name,
@@ -325,6 +327,7 @@
325 "archive_private": False,327 "archive_private": False,
326 "archives": expected_archives,328 "archives": expected_archives,
327 "arch_tag": "i386",329 "arch_tag": "i386",
330 "build_source_tarball": False,
328 "build_url": canonical_url(job.build),331 "build_url": canonical_url(job.build),
329 "git_repository": ref.repository.git_https_url,332 "git_repository": ref.repository.git_https_url,
330 "name": "test-snap",333 "name": "test-snap",
@@ -350,6 +353,7 @@
350 "archive_private": False,353 "archive_private": False,
351 "archives": expected_archives,354 "archives": expected_archives,
352 "arch_tag": "i386",355 "arch_tag": "i386",
356 "build_source_tarball": False,
353 "build_url": canonical_url(job.build),357 "build_url": canonical_url(job.build),
354 "git_repository": url,358 "git_repository": url,
355 "git_path": "master",359 "git_path": "master",
@@ -375,6 +379,7 @@
375 "archive_private": False,379 "archive_private": False,
376 "archives": expected_archives,380 "archives": expected_archives,
377 "arch_tag": "i386",381 "arch_tag": "i386",
382 "build_source_tarball": False,
378 "build_url": canonical_url(job.build),383 "build_url": canonical_url(job.build),
379 "git_repository": url,384 "git_repository": url,
380 "name": "test-snap",385 "name": "test-snap",
@@ -414,6 +419,7 @@
414 self.assertFalse(isProxy(args["channels"]))419 self.assertFalse(isProxy(args["channels"]))
415 self.assertEqual({"snapcraft": "edge"}, args["channels"])420 self.assertEqual({"snapcraft": "edge"}, args["channels"])
416421
422 @defer.inlineCallbacks
417 def test_extraBuildArgs_disallow_internet(self):423 def test_extraBuildArgs_disallow_internet(self):
418 # If external network access is not allowed for the snap,424 # If external network access is not allowed for the snap,
419 # _extraBuildArgs does not dispatch a proxy token.425 # _extraBuildArgs does not dispatch a proxy token.
@@ -423,6 +429,14 @@
423 self.assertNotIn("revocation_endpoint", args)429 self.assertNotIn("revocation_endpoint", args)
424430
425 @defer.inlineCallbacks431 @defer.inlineCallbacks
432 def test_extraBuildArgs_build_source_tarball(self):
433 # If the snap requests building of a source tarball, _extraBuildArgs
434 # sends the appropriate arguments.
435 job = self.makeJob(build_source_tarball=True)
436 args = yield job._extraBuildArgs()
437 self.assertTrue(args["build_source_tarball"])
438
439 @defer.inlineCallbacks
426 def test_composeBuildRequest_proxy_url_set(self):440 def test_composeBuildRequest_proxy_url_set(self):
427 job = self.makeJob()441 job = self.makeJob()
428 build_request = yield job.composeBuildRequest(None)442 build_request = yield job.composeBuildRequest(None)
429443
=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py 2018-04-04 14:14:30 +0000
+++ lib/lp/testing/factory.py 2018-04-21 10:15:59 +0000
@@ -4673,8 +4673,9 @@
4673 auto_build_channels=None, is_stale=None,4673 auto_build_channels=None, is_stale=None,
4674 require_virtualized=True, processors=None,4674 require_virtualized=True, processors=None,
4675 date_created=DEFAULT, private=False, allow_internet=True,4675 date_created=DEFAULT, private=False, allow_internet=True,
4676 store_upload=False, store_series=None, store_name=None,4676 build_source_tarball=False, store_upload=False,
4677 store_secrets=None, store_channels=None):4677 store_series=None, store_name=None, store_secrets=None,
4678 store_channels=None):
4678 """Make a new Snap."""4679 """Make a new Snap."""
4679 if registrant is None:4680 if registrant is None:
4680 registrant = self.makePerson()4681 registrant = self.makePerson()
@@ -4699,9 +4700,11 @@
4699 auto_build=auto_build, auto_build_archive=auto_build_archive,4700 auto_build=auto_build, auto_build_archive=auto_build_archive,
4700 auto_build_pocket=auto_build_pocket,4701 auto_build_pocket=auto_build_pocket,
4701 auto_build_channels=auto_build_channels, private=private,4702 auto_build_channels=auto_build_channels, private=private,
4702 allow_internet=allow_internet, store_upload=store_upload,4703 allow_internet=allow_internet,
4703 store_series=store_series, store_name=store_name,4704 build_source_tarball=build_source_tarball,
4704 store_secrets=store_secrets, store_channels=store_channels)4705 store_upload=store_upload, store_series=store_series,
4706 store_name=store_name, store_secrets=store_secrets,
4707 store_channels=store_channels)
4705 if is_stale is not None:4708 if is_stale is not None:
4706 removeSecurityProxy(snap).is_stale = is_stale4709 removeSecurityProxy(snap).is_stale = is_stale
4707 IStore(snap).flush()4710 IStore(snap).flush()