~longsleep/snapcraft/snapcraft-debs-plugin

« back to all changes in this revision

Viewing changes to snapcraft/yaml.py

  • Committer: Snappy Tarmac
  • Author(s): Sergio Schvezov
  • Date: 2015-09-16 00:31:54 UTC
  • mfrom: (165.1.5 snapcraft)
  • Revision ID: snappy_tarmac-20150916003154-l9kg6xjz85nsbh3z
Try to use wiki when after in part is not local by sergiusens approved by sergiusens,chipaca,dholbach

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import os.path
23
23
 
24
24
import snapcraft.plugin
 
25
import snapcraft.wiki
25
26
from snapcraft import common
26
27
 
27
28
 
114
115
 
115
116
    def _compute_part_dependencies(self, after_requests):
116
117
        '''Gather the lists of dependencies and adds to all_parts.'''
 
118
        w = snapcraft.wiki.Wiki()
117
119
 
118
120
        for part in self.all_parts:
119
121
            dep_names = part.config.get('requires', []) + after_requests.get(part.names()[0], [])
125
127
                        found = True
126
128
                        break
127
129
                if not found:
 
130
                    wiki_part = w.get_part(dep)
 
131
                    found = True if wiki_part else False
 
132
                    if found:
 
133
                        part.deps.append(self.load_plugin(dep, wiki_part['type'], wiki_part))
 
134
                if not found:
128
135
                    raise SnapcraftLogicError('part name missing {}'.format(dep))
129
136
 
130
137
    def _sort_parts(self):