コード例 #1
0
 def source(self, macros):
     def err(msg):
         raise error.general('%s' % (msg))
     _srcs = {}
     for p in sources.get_source_names(macros, err):
         if 'setup' in sources.get_source_keys(p, macros, err):
             _srcs[p] = \
                 [s for s in sources.get_sources(p, macros, err) if not s.startswith('%setup')]
             _srcs[p] = [macros.expand(s) for s in _srcs[p]]
     srcs = {}
     for p in _srcs:
         srcs[p] = [(s, sources.get_hash(path.basename(s).lower(), macros)) for s in _srcs[p]]
     return srcs
コード例 #2
0
 def source(self, macros):
     def err(msg):
         raise error.general('%s' % (msg))
     _srcs = {}
     for p in sources.get_source_names(macros, err):
         if 'setup' in sources.get_source_keys(p, macros, err):
             _srcs[p] = \
                 [s for s in sources.get_sources(p, macros, err) if not s.startswith('%setup')]
             _srcs[p] = [macros.expand(s) for s in _srcs[p]]
     srcs = {}
     for p in _srcs:
         srcs[p] = [(s, sources.get_hash(path.basename(s).lower(), macros)) for s in _srcs[p]]
     return srcs