Merge lp:~sergiusens/snapcraft/1500857 into lp:~snappy-dev/snapcraft/core

Proposed by Sergio Schvezov
Status: Merged
Approved by: Sergio Schvezov
Approved revision: 217
Merged at revision: 217
Proposed branch: lp:~sergiusens/snapcraft/1500857
Merge into: lp:~snappy-dev/snapcraft/core
Diff against target: 589 lines (+72/-72)
29 files modified
docs/intro.md (+5/-5)
docs/your-first-snap.md (+8/-8)
examples/downloader-with-wiki-parts/snapcraft.yaml (+1/-1)
examples/godd/snapcraft.yaml (+1/-1)
examples/gopaste/snapcraft.yaml (+1/-1)
examples/java-hello-world/snapcraft.yaml (+2/-2)
examples/libpipeline/snapcraft.yaml (+2/-2)
examples/py2-project/snapcraft.yaml (+1/-1)
examples/py3-project/snapcraft.yaml (+2/-2)
examples/qmldemo/snapcraft.yaml (+2/-2)
examples/tomcat-maven-webapp/snapcraft.yaml (+3/-3)
examples/webcam-webui/snapcraft.yaml (+3/-3)
integration-tests/data/bzr-head/snapcraft.yaml (+1/-1)
integration-tests/data/bzr-tag/snapcraft.yaml (+1/-1)
integration-tests/data/conflicts/snapcraft.yaml (+2/-2)
integration-tests/data/dependencies/snapcraft.yaml (+3/-3)
integration-tests/data/git-branch/snapcraft.yaml (+1/-1)
integration-tests/data/git-head/snapcraft.yaml (+1/-1)
integration-tests/data/git-tag/snapcraft.yaml (+1/-1)
integration-tests/data/hg-branch/snapcraft.yaml (+1/-1)
integration-tests/data/hg-head/snapcraft.yaml (+1/-1)
integration-tests/data/hg-tag/snapcraft.yaml (+1/-1)
integration-tests/data/pip-requirements/snapcraft.yaml (+2/-2)
integration-tests/data/pypi-config/snapcraft.yaml (+1/-1)
integration-tests/data/simple-copy/snapcraft.yaml (+1/-1)
integration-tests/data/simple-scons/snapcraft.yaml (+1/-1)
integration-tests/data/simple-tar/snapcraft.yaml (+9/-9)
snapcraft/tests/test_yaml.py (+11/-11)
snapcraft/yaml.py (+3/-3)
To merge this branch: bzr merge lp:~sergiusens/snapcraft/1500857
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
Zygmunt Krynicki Approve
Review via email: mp+272752@code.launchpad.net

Commit message

Revert type to plugin

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+1, looks good

review: Approve
Revision history for this message
Sergio Schvezov (sergiusens) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/intro.md'
2--- docs/intro.md 2015-09-24 17:06:18 +0000
3+++ docs/intro.md 2015-09-29 13:38:14 +0000
4@@ -32,12 +32,12 @@
5 build other parts. Each part is managed by a snapcraft plugin and parts
6 are usually independent of each other.
7
8-## Type of a Part
9+## Plugin
10
11-Each part has a `type` associated to it, this `type` provides the mechanism
12-to handle it. The `type` a part has is extendable through plugins, there are
13-a variety of plugins already included for python 2 and 3, go, java, and cmake or
14-autotools based projects.
15+Each part has a `plugin` associated to it, this `plugin` provides the mechanism
16+to handle it. Parts are driven through plugins, there are a variety of plugins
17+already included for python 2 and 3, go, java, and cmake or autotools based
18+projects.
19
20 ## Lifecycle
21
22
23=== modified file 'docs/your-first-snap.md'
24--- docs/your-first-snap.md 2015-09-22 12:54:13 +0000
25+++ docs/your-first-snap.md 2015-09-29 13:38:14 +0000
26@@ -104,11 +104,11 @@
27
28 parts:
29 cam:
30- type: go-project
31+ plugin: go-project
32 source: git://github.com/mikix/golang-static-http
33
34 You've just defined a `part` inside `parts` named `cam`, but you
35-could call it anything. That part has a two options: A `type` option that
36+could call it anything. That part has a two options: A `plugin` option that
37 tells Snapcraft how to interpret the part (in this case, it's a Go project),
38 and a `source` option telling Snapcraft where to download the code.
39
40@@ -138,7 +138,7 @@
41
42 parts:
43 cam:
44- type: go-project
45+ plugin: go-project
46 source: git://github.com/mikix/golang-static-http
47 stage-packages:
48 - fswebcam
49@@ -185,16 +185,16 @@
50
51 parts:
52 cam:
53- type: go-project
54+ plugin: go-project
55 source: git://github.com/mikix/golang-static-http
56 stage-packages:
57 - fswebcam
58 glue:
59- type: copy
60+ plugin: copy
61 files:
62 webcam-webui: bin/webcam-webui
63
64-A part of type `copy` takes a list of files to just directly copy without
65+The `copy` plugin takes a list of files to just directly copy without
66 building or downloading anything. In this case, we just want to put our glue
67 script in the `bin/` directory.
68
69@@ -219,7 +219,7 @@
70
71 parts:
72 cam:
73- type: go-project
74+ plugin: go-project
75 source: git://github.com/mikix/golang-static-http
76 stage-packages:
77 - fswebcam
78@@ -234,7 +234,7 @@
79 - $fswebcam
80 - $go-server
81 glue:
82- type: copy
83+ plugin: copy
84 files:
85 webcam-webui: bin/webcam-webui
86
87
88=== modified file 'examples/downloader-with-wiki-parts/snapcraft.yaml'
89--- examples/downloader-with-wiki-parts/snapcraft.yaml 2015-09-22 08:24:33 +0000
90+++ examples/downloader-with-wiki-parts/snapcraft.yaml 2015-09-29 13:38:14 +0000
91@@ -10,7 +10,7 @@
92
93 parts:
94 main:
95- type: make-project
96+ plugin: make-project
97 source: .
98 after:
99 - curl
100
101=== modified file 'examples/godd/snapcraft.yaml'
102--- examples/godd/snapcraft.yaml 2015-09-22 13:27:11 +0000
103+++ examples/godd/snapcraft.yaml 2015-09-29 13:38:14 +0000
104@@ -10,7 +10,7 @@
105
106 parts:
107 godd:
108- type: go-project
109+ plugin: go-project
110 source: git://github.com/mvo5/godd
111 stage-packages: [libgudev-1.0-dev]
112 snap:
113
114=== modified file 'examples/gopaste/snapcraft.yaml'
115--- examples/gopaste/snapcraft.yaml 2015-09-21 05:04:31 +0000
116+++ examples/gopaste/snapcraft.yaml 2015-09-29 13:38:14 +0000
117@@ -11,5 +11,5 @@
118
119 parts:
120 gopaste:
121- type: go-project
122+ plugin: go-project
123 source: git://github.com/wisnij/gopaste/gopasted
124
125=== modified file 'examples/java-hello-world/snapcraft.yaml'
126--- examples/java-hello-world/snapcraft.yaml 2015-09-21 05:04:31 +0000
127+++ examples/java-hello-world/snapcraft.yaml 2015-09-29 13:38:14 +0000
128@@ -10,8 +10,8 @@
129
130 parts:
131 local:
132- type: ant-project
133+ plugin: ant-project
134 source: .
135 wrapper:
136- type: make-project
137+ plugin: make-project
138 source: .
139
140=== modified file 'examples/libpipeline/snapcraft.yaml'
141--- examples/libpipeline/snapcraft.yaml 2015-09-21 05:04:31 +0000
142+++ examples/libpipeline/snapcraft.yaml 2015-09-29 13:38:14 +0000
143@@ -10,10 +10,10 @@
144
145 parts:
146 pipelinetest:
147- type: make-project
148+ plugin: make-project
149 source: lp:~mterry/+junk/pipelinetest
150 after:
151 - libpipeline
152 libpipeline:
153- type: autotools-project
154+ plugin: autotools-project
155 source: lp:~mterry/libpipeline/printf
156
157=== modified file 'examples/py2-project/snapcraft.yaml'
158--- examples/py2-project/snapcraft.yaml 2015-09-21 05:04:31 +0000
159+++ examples/py2-project/snapcraft.yaml 2015-09-29 13:38:14 +0000
160@@ -10,7 +10,7 @@
161
162 parts:
163 spongeshaker:
164- type: python2-project
165+ plugin: python2-project
166 source: git://github.com/markokr/spongeshaker.git
167 make-project:
168 source: .
169
170=== modified file 'examples/py3-project/snapcraft.yaml'
171--- examples/py3-project/snapcraft.yaml 2015-09-21 05:04:31 +0000
172+++ examples/py3-project/snapcraft.yaml 2015-09-29 13:38:14 +0000
173@@ -10,9 +10,9 @@
174
175 parts:
176 spongeshaker:
177- type: python3-project
178+ plugin: python3-project
179 source: git://github.com/markokr/spongeshaker.git
180 sha3:
181- type: copy
182+ plugin: copy
183 files:
184 sha3sum.py: bin/sha3sum
185
186=== modified file 'examples/qmldemo/snapcraft.yaml'
187--- examples/qmldemo/snapcraft.yaml 2015-09-21 05:04:31 +0000
188+++ examples/qmldemo/snapcraft.yaml 2015-09-29 13:38:14 +0000
189@@ -15,8 +15,8 @@
190
191 parts:
192 qml:
193- type: qml
194+ plugin: qml
195 qmldemo:
196- type: copy
197+ plugin: copy
198 files:
199 demo.qml: demo.qml
200
201=== modified file 'examples/tomcat-maven-webapp/snapcraft.yaml'
202--- examples/tomcat-maven-webapp/snapcraft.yaml 2015-09-21 05:04:31 +0000
203+++ examples/tomcat-maven-webapp/snapcraft.yaml 2015-09-29 13:38:14 +0000
204@@ -15,11 +15,11 @@
205
206 parts:
207 webapp:
208- type: maven-project
209+ plugin: maven-project
210 source: git://github.com/lool/snappy-mvn-demo.git
211 tomcat:
212- type: tar-content
213+ plugin: tar-content
214 source: http://mirrors.ircam.fr/pub/apache/tomcat/tomcat-8/v8.0.26/bin/apache-tomcat-8.0.26.tar.gz
215 local-files:
216- type: make-project
217+ plugin: make-project
218 source: .
219
220=== modified file 'examples/webcam-webui/snapcraft.yaml'
221--- examples/webcam-webui/snapcraft.yaml 2015-09-21 05:04:31 +0000
222+++ examples/webcam-webui/snapcraft.yaml 2015-09-29 13:38:14 +0000
223@@ -11,7 +11,7 @@
224
225 parts:
226 cam:
227- type: go-project
228+ plugin: go-project
229 source: git://github.com/mikix/golang-static-http
230 stage-packages:
231 - fswebcam
232@@ -30,9 +30,9 @@
233 - $go-server
234 - -usr/share/doc
235 glue:
236- type: copy
237+ plugin: copy
238 files:
239 webcam-webui: bin/webcam-webui
240 config:
241- type: python3-project
242+ plugin: python3-project
243 source: .
244
245=== modified file 'integration-tests/data/bzr-head/snapcraft.yaml'
246--- integration-tests/data/bzr-head/snapcraft.yaml 2015-09-08 11:48:30 +0000
247+++ integration-tests/data/bzr-head/snapcraft.yaml 2015-09-29 13:38:14 +0000
248@@ -7,6 +7,6 @@
249
250 parts:
251 bzr:
252- type: make-project
253+ plugin: make-project
254 source: .
255 source-type: bzr
256
257=== modified file 'integration-tests/data/bzr-tag/snapcraft.yaml'
258--- integration-tests/data/bzr-tag/snapcraft.yaml 2015-09-08 11:48:30 +0000
259+++ integration-tests/data/bzr-tag/snapcraft.yaml 2015-09-29 13:38:14 +0000
260@@ -7,7 +7,7 @@
261
262 parts:
263 bzr:
264- type: make-project
265+ plugin: make-project
266 source: .
267 source-type: bzr
268 source-tag: initial
269
270=== modified file 'integration-tests/data/conflicts/snapcraft.yaml'
271--- integration-tests/data/conflicts/snapcraft.yaml 2015-09-17 06:24:37 +0000
272+++ integration-tests/data/conflicts/snapcraft.yaml 2015-09-29 13:38:14 +0000
273@@ -7,9 +7,9 @@
274
275 parts:
276 p1:
277- type: make-project
278+ plugin: make-project
279 source: .
280 p2:
281- type: make-project
282+ plugin: make-project
283 source: ./p2
284 after: [p1]
285
286=== modified file 'integration-tests/data/dependencies/snapcraft.yaml'
287--- integration-tests/data/dependencies/snapcraft.yaml 2015-09-08 11:48:30 +0000
288+++ integration-tests/data/dependencies/snapcraft.yaml 2015-09-29 13:38:14 +0000
289@@ -7,13 +7,13 @@
290
291 parts:
292 p1:
293- type: make-project
294+ plugin: make-project
295 source: p1
296 p2:
297- type: make-project
298+ plugin: make-project
299 source: p2
300 after: [p1]
301 p3:
302- type: make-project
303+ plugin: make-project
304 source: p3
305 after: [p2]
306
307=== modified file 'integration-tests/data/git-branch/snapcraft.yaml'
308--- integration-tests/data/git-branch/snapcraft.yaml 2015-09-08 11:48:30 +0000
309+++ integration-tests/data/git-branch/snapcraft.yaml 2015-09-29 13:38:14 +0000
310@@ -7,7 +7,7 @@
311
312 parts:
313 git:
314- type: make-project
315+ plugin: make-project
316 source: .
317 source-type: git
318 source-branch: second
319
320=== modified file 'integration-tests/data/git-head/snapcraft.yaml'
321--- integration-tests/data/git-head/snapcraft.yaml 2015-09-08 11:48:30 +0000
322+++ integration-tests/data/git-head/snapcraft.yaml 2015-09-29 13:38:14 +0000
323@@ -7,6 +7,6 @@
324
325 parts:
326 git:
327- type: make-project
328+ plugin: make-project
329 source: .
330 source-type: git
331
332=== modified file 'integration-tests/data/git-tag/snapcraft.yaml'
333--- integration-tests/data/git-tag/snapcraft.yaml 2015-09-08 11:48:30 +0000
334+++ integration-tests/data/git-tag/snapcraft.yaml 2015-09-29 13:38:14 +0000
335@@ -7,7 +7,7 @@
336
337 parts:
338 git:
339- type: make-project
340+ plugin: make-project
341 source: .
342 source-type: git
343 source-tag: initial
344
345=== modified file 'integration-tests/data/hg-branch/snapcraft.yaml'
346--- integration-tests/data/hg-branch/snapcraft.yaml 2015-09-08 11:48:30 +0000
347+++ integration-tests/data/hg-branch/snapcraft.yaml 2015-09-29 13:38:14 +0000
348@@ -7,7 +7,7 @@
349
350 parts:
351 mercurial:
352- type: make-project
353+ plugin: make-project
354 source: .
355 source-type: hg
356 source-branch: second
357
358=== modified file 'integration-tests/data/hg-head/snapcraft.yaml'
359--- integration-tests/data/hg-head/snapcraft.yaml 2015-09-08 11:48:30 +0000
360+++ integration-tests/data/hg-head/snapcraft.yaml 2015-09-29 13:38:14 +0000
361@@ -7,6 +7,6 @@
362
363 parts:
364 mercurial:
365- type: make-project
366+ plugin: make-project
367 source: .
368 source-type: hg
369
370=== modified file 'integration-tests/data/hg-tag/snapcraft.yaml'
371--- integration-tests/data/hg-tag/snapcraft.yaml 2015-09-08 11:48:30 +0000
372+++ integration-tests/data/hg-tag/snapcraft.yaml 2015-09-29 13:38:14 +0000
373@@ -7,7 +7,7 @@
374
375 parts:
376 mercurial:
377- type: make-project
378+ plugin: make-project
379 source: .
380 source-type: hg
381 source-tag: initial
382
383=== modified file 'integration-tests/data/pip-requirements/snapcraft.yaml'
384--- integration-tests/data/pip-requirements/snapcraft.yaml 2015-09-23 04:14:51 +0000
385+++ integration-tests/data/pip-requirements/snapcraft.yaml 2015-09-29 13:38:14 +0000
386@@ -7,8 +7,8 @@
387
388 parts:
389 python2:
390- type: python2-project
391+ plugin: python2-project
392 requirements: requirements.txt
393 python3:
394- type: python3-project
395+ plugin: python3-project
396 requirements: requirements.txt
397
398=== modified file 'integration-tests/data/pypi-config/snapcraft.yaml'
399--- integration-tests/data/pypi-config/snapcraft.yaml 2015-09-20 14:34:08 +0000
400+++ integration-tests/data/pypi-config/snapcraft.yaml 2015-09-29 13:38:14 +0000
401@@ -12,5 +12,5 @@
402
403 parts:
404 config:
405- type: python3-project
406+ plugin: python3-project
407 source: .
408
409=== modified file 'integration-tests/data/simple-copy/snapcraft.yaml'
410--- integration-tests/data/simple-copy/snapcraft.yaml 2015-09-08 11:48:30 +0000
411+++ integration-tests/data/simple-copy/snapcraft.yaml 2015-09-29 13:38:14 +0000
412@@ -7,6 +7,6 @@
413
414 parts:
415 copy-example:
416- type: copy
417+ plugin: copy
418 files:
419 src: dst
420
421=== modified file 'integration-tests/data/simple-scons/snapcraft.yaml'
422--- integration-tests/data/simple-scons/snapcraft.yaml 2015-09-29 10:42:52 +0000
423+++ integration-tests/data/simple-scons/snapcraft.yaml 2015-09-29 13:38:14 +0000
424@@ -7,5 +7,5 @@
425
426 parts:
427 scons-project:
428- type: scons-project
429+ plugin: scons-project
430 source: .
431
432=== modified file 'integration-tests/data/simple-tar/snapcraft.yaml'
433--- integration-tests/data/simple-tar/snapcraft.yaml 2015-09-29 07:15:17 +0000
434+++ integration-tests/data/simple-tar/snapcraft.yaml 2015-09-29 13:38:14 +0000
435@@ -7,30 +7,30 @@
436
437 parts:
438 oneflat:
439- type: tar-content
440+ plugin: tar-content
441 source: oneflat.tar.bz2
442 onedeep:
443- type: tar-content
444+ plugin: tar-content
445 source: onedeep.tar.gz
446 nodir:
447- type: tar-content
448+ plugin: tar-content
449 source: nodir.tar.xz
450 flat:
451- type: tar-content
452+ plugin: tar-content
453 source: flat.tar.xz
454 simple:
455- type: tar-content
456+ plugin: tar-content
457 source: simple.tar.bz2
458 evil-parent:
459- type: tar-content
460+ plugin: tar-content
461 source: evil-parent.tar.gz
462 evil-slash:
463- type: tar-content
464+ plugin: tar-content
465 source: evil-slash.tar.gz
466 readonly-files:
467- type: tar-content
468+ plugin: tar-content
469 source: readonly-files.tar.gz
470 project:
471- type: make-project
472+ plugin: make-project
473 source: project.tar.xz
474 source-type: tar
475
476=== modified file 'snapcraft/tests/test_yaml.py'
477--- snapcraft/tests/test_yaml.py 2015-09-21 05:04:31 +0000
478+++ snapcraft/tests/test_yaml.py 2015-09-29 13:38:14 +0000
479@@ -61,7 +61,7 @@
480
481 parts:
482 part1:
483- type: go
484+ plugin: go
485 stage-packages: [fswebcam]
486 """)
487 snapcraft.yaml.Config()
488@@ -85,7 +85,7 @@
489 part1:
490 after:
491 - part2wiki
492- type: go
493+ plugin: go
494 stage-packages: [fswebcam]
495 """)
496 snapcraft.yaml.Config()
497@@ -119,10 +119,10 @@
498
499 parts:
500 p1:
501- type: go
502+ plugin: go
503 after: [p2]
504 p2:
505- type: go
506+ plugin: go
507 after: [p1]
508 """)
509 with self.assertRaises(snapcraft.yaml.SnapcraftLogicError) as raised:
510@@ -145,7 +145,7 @@
511
512 parts:
513 part1:
514- type: go
515+ plugin: go
516 stage-packages: [fswebcam]
517 """)
518 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:
519@@ -167,7 +167,7 @@
520
521 parts:
522 part1:
523- type: go
524+ plugin: go
525 stage-packages: [fswebcam]
526 """)
527 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:
528@@ -189,7 +189,7 @@
529
530 parts:
531 part1:
532- type: go
533+ plugin: go
534 stage-packages: [fswebcam]
535 """)
536 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:
537@@ -210,7 +210,7 @@
538
539 parts:
540 part1:
541- type: go
542+ plugin: go
543 stage-packages: [fswebcam]
544 """)
545 with self.assertRaises(snapcraft.yaml.SnapcraftSchemaError) as raised:
546@@ -231,7 +231,7 @@
547
548 parts:
549 part1:
550- type: go
551+ plugin: go
552 stage-packages: [fswebcam]
553 """)
554
555@@ -254,7 +254,7 @@
556
557 parts:
558 part1:
559- type: go
560+ plugin: go
561 stage-packages: [fswebcam]
562 filesets:
563 wget:
564@@ -298,7 +298,7 @@
565 'icon': 'my-icon.png',
566 'parts': {
567 'part1': {
568- 'type': 'project',
569+ 'plugin': 'project',
570 },
571 },
572 }
573
574=== modified file 'snapcraft/yaml.py'
575--- snapcraft/yaml.py 2015-09-23 15:54:52 +0000
576+++ snapcraft/yaml.py 2015-09-29 13:38:14 +0000
577@@ -80,9 +80,9 @@
578 for part_name in self.data.get("parts", []):
579 properties = self.data["parts"][part_name] or {}
580
581- plugin_name = properties.get("type", part_name)
582- if "type" in properties:
583- del properties["type"]
584+ plugin_name = properties.get("plugin", part_name)
585+ if "plugin" in properties:
586+ del properties["plugin"]
587
588 if "after" in properties:
589 after_requests[part_name] = properties["after"]

Subscribers

People subscribed via source and target branches