summaryrefslogtreecommitdiffstats
path: root/scripts/find_packages.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/find_packages.py')
-rwxr-xr-xscripts/find_packages.py55
1 files changed, 30 insertions, 25 deletions
diff --git a/scripts/find_packages.py b/scripts/find_packages.py
index 53b3ca7..893ad85 100755
--- a/scripts/find_packages.py
+++ b/scripts/find_packages.py
@@ -159,7 +159,7 @@ def main():
159 parser.add_argument('recipe', metavar='recipe', help='a recipe to investigate') 159 parser.add_argument('recipe', metavar='recipe', help='a recipe to investigate')
160 args = parser.parse_args() 160 args = parser.parse_args()
161 rn = args.recipe 161 rn = args.recipe
162 with open(rn + '-dependencies.yml', "w") as manifest_file, bb.tinfoil.Tinfoil() as tinfoil: 162 with bb.tinfoil.Tinfoil() as tinfoil:
163 tinfoil.prepare() 163 tinfoil.prepare()
164 # These are the packages that bitbake assumes are provided by the host 164 # These are the packages that bitbake assumes are provided by the host
165 # system. They do not have recipes, so searching tinfoil for them will 165 # system. They do not have recipes, so searching tinfoil for them will
@@ -169,31 +169,36 @@ def main():
169 if SKIP_BUILD_TOOLS: 169 if SKIP_BUILD_TOOLS:
170 assume_provided.extend(KNOWN_BUILD_TOOLS) 170 assume_provided.extend(KNOWN_BUILD_TOOLS)
171 171
172 manifest_file.write('project:\n')
173 data = get_recipe_info(tinfoil, rn) 172 data = get_recipe_info(tinfoil, rn)
174 data.depends = [] 173 if not data:
175 depends = data.getVar('DEPENDS').split() 174 print('Nothing to do!')
176 for dep in depends: 175 return
177 if dep not in assume_provided: 176
178 data.depends.append(dep) 177 with open(rn + '-dependencies.yml', "w") as manifest_file:
179 print_package(manifest_file, data, is_project=True) 178 manifest_file.write('project:\n')
180 manifest_file.write(' scopes:\n') 179 data.depends = []
181 manifest_file.write(' - name: "all"\n') 180 depends = data.getVar('DEPENDS').split()
182 manifest_file.write(' delivered: true\n') 181 for dep in depends:
183 manifest_file.write(' dependencies:\n') 182 if dep not in assume_provided:
184 183 data.depends.append(dep)
185 recipe_info = dict([(rn, data)]) 184 print_package(manifest_file, data, is_project=True)
186 packages = [] 185 manifest_file.write(' scopes:\n')
187 find_dependencies(manifest_file, tinfoil, assume_provided, recipe_info, packages, rn, order=1) 186 manifest_file.write(' - name: "all"\n')
188 187 manifest_file.write(' delivered: true\n')
189 manifest_file.write('packages:\n') 188 manifest_file.write(' dependencies:\n')
190 189
191 # Iterate through the list of packages found to print out their full 190 recipe_info = dict([(rn, data)])
192 # information. Skip the initial recipe since we already printed it out. 191 packages = []
193 for p in packages: 192 find_dependencies(manifest_file, tinfoil, assume_provided, recipe_info, packages, rn, order=1)
194 if p is not rn: 193
195 data = recipe_info[p] 194 manifest_file.write('packages:\n')
196 print_package(manifest_file, data, is_project=False) 195
196 # Iterate through the list of packages found to print out their full
197 # information. Skip the initial recipe since we already printed it out.
198 for p in packages:
199 if p is not rn:
200 data = recipe_info[p]
201 print_package(manifest_file, data, is_project=False)
197 202
198 203
199if __name__ == "__main__": 204if __name__ == "__main__":