diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-08 22:32:43 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-13 12:15:28 +0000 |
commit | c54117458a19d05d404ec00907a8f3e9c73a416b (patch) | |
tree | 6cc5695742a1198668b022b35c8b2a456c4f3f4f /meta/classes/insane.bbclass | |
parent | 80d55bbd6ea2ff93510f3b87ea97322b0b02eaa8 (diff) | |
download | poky-c54117458a19d05d404ec00907a8f3e9c73a416b.tar.gz |
classes: Remove and sanitise import statements
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r-- | meta/classes/insane.bbclass | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 56d6a0b887..4b993b55d4 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -169,7 +169,6 @@ def package_qa_get_elf(path, bits32): | |||
169 | 169 | ||
170 | def package_qa_clean_path(path,d): | 170 | def package_qa_clean_path(path,d): |
171 | """ Remove the common prefix from the path. In this case it is the TMPDIR""" | 171 | """ Remove the common prefix from the path. In this case it is the TMPDIR""" |
172 | import bb | ||
173 | return path.replace(bb.data.getVar('TMPDIR',d,True),"") | 172 | return path.replace(bb.data.getVar('TMPDIR',d,True),"") |
174 | 173 | ||
175 | def package_qa_make_fatal_error(error_class, name, path,d): | 174 | def package_qa_make_fatal_error(error_class, name, path,d): |
@@ -184,7 +183,6 @@ def package_qa_write_error(error_class, name, path, d): | |||
184 | """ | 183 | """ |
185 | Log the error | 184 | Log the error |
186 | """ | 185 | """ |
187 | import bb, os | ||
188 | 186 | ||
189 | ERROR_NAMES =[ | 187 | ERROR_NAMES =[ |
190 | "non dev contains .so", | 188 | "non dev contains .so", |
@@ -214,7 +212,6 @@ def package_qa_write_error(error_class, name, path, d): | |||
214 | f.close() | 212 | f.close() |
215 | 213 | ||
216 | def package_qa_handle_error(error_class, error_msg, name, path, d): | 214 | def package_qa_handle_error(error_class, error_msg, name, path, d): |
217 | import bb | ||
218 | fatal = package_qa_make_fatal_error(error_class, name, path, d) | 215 | fatal = package_qa_make_fatal_error(error_class, name, path, d) |
219 | if fatal: | 216 | if fatal: |
220 | bb.error("QA Issue: %s" % error_msg) | 217 | bb.error("QA Issue: %s" % error_msg) |
@@ -229,7 +226,6 @@ def package_qa_check_rpath(file,name,d): | |||
229 | """ | 226 | """ |
230 | Check for dangerous RPATHs | 227 | Check for dangerous RPATHs |
231 | """ | 228 | """ |
232 | import bb, os | ||
233 | sane = True | 229 | sane = True |
234 | scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf') | 230 | scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf') |
235 | bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work" | 231 | bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work" |
@@ -255,7 +251,6 @@ def package_qa_check_devdbg(path, name,d): | |||
255 | non dev packages containing | 251 | non dev packages containing |
256 | """ | 252 | """ |
257 | 253 | ||
258 | import bb, os | ||
259 | sane = True | 254 | sane = True |
260 | 255 | ||
261 | if not "-dev" in name: | 256 | if not "-dev" in name: |
@@ -283,7 +278,6 @@ def package_qa_check_arch(path,name,d): | |||
283 | """ | 278 | """ |
284 | Check if archs are compatible | 279 | Check if archs are compatible |
285 | """ | 280 | """ |
286 | import bb, os | ||
287 | sane = True | 281 | sane = True |
288 | target_os = bb.data.getVar('TARGET_OS', d, True) | 282 | target_os = bb.data.getVar('TARGET_OS', d, True) |
289 | target_arch = bb.data.getVar('TARGET_ARCH', d, True) | 283 | target_arch = bb.data.getVar('TARGET_ARCH', d, True) |
@@ -322,7 +316,6 @@ def package_qa_check_desktop(path, name, d): | |||
322 | """ | 316 | """ |
323 | Run all desktop files through desktop-file-validate. | 317 | Run all desktop files through desktop-file-validate. |
324 | """ | 318 | """ |
325 | import bb, os | ||
326 | sane = True | 319 | sane = True |
327 | if path.endswith(".desktop"): | 320 | if path.endswith(".desktop"): |
328 | desktop_file_validate = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'desktop-file-validate') | 321 | desktop_file_validate = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'desktop-file-validate') |
@@ -337,7 +330,6 @@ def package_qa_check_buildpaths(path, name, d): | |||
337 | """ | 330 | """ |
338 | Check for build paths inside target files and error if not found in the whitelist | 331 | Check for build paths inside target files and error if not found in the whitelist |
339 | """ | 332 | """ |
340 | import bb, os | ||
341 | sane = True | 333 | sane = True |
342 | 334 | ||
343 | # Ignore .debug files, not interesting | 335 | # Ignore .debug files, not interesting |
@@ -364,7 +356,6 @@ def package_qa_check_staged(path,d): | |||
364 | to find the one responsible for the errors easily even | 356 | to find the one responsible for the errors easily even |
365 | if we look at every .pc and .la file | 357 | if we look at every .pc and .la file |
366 | """ | 358 | """ |
367 | import os, bb | ||
368 | 359 | ||
369 | sane = True | 360 | sane = True |
370 | tmpdir = bb.data.getVar('TMPDIR', d, True) | 361 | tmpdir = bb.data.getVar('TMPDIR', d, True) |
@@ -402,7 +393,6 @@ def package_qa_check_staged(path,d): | |||
402 | 393 | ||
403 | # Walk over all files in a directory and call func | 394 | # Walk over all files in a directory and call func |
404 | def package_qa_walk(path, funcs, package,d): | 395 | def package_qa_walk(path, funcs, package,d): |
405 | import os | ||
406 | sane = True | 396 | sane = True |
407 | 397 | ||
408 | for root, dirs, files in os.walk(path): | 398 | for root, dirs, files in os.walk(path): |
@@ -415,7 +405,6 @@ def package_qa_walk(path, funcs, package,d): | |||
415 | return sane | 405 | return sane |
416 | 406 | ||
417 | def package_qa_check_rdepends(pkg, workdir, d): | 407 | def package_qa_check_rdepends(pkg, workdir, d): |
418 | import bb | ||
419 | sane = True | 408 | sane = True |
420 | if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg: | 409 | if not "-dbg" in pkg and not "task-" in pkg and not "-image" in pkg: |
421 | # Copied from package_ipk.bbclass | 410 | # Copied from package_ipk.bbclass |
@@ -496,7 +485,6 @@ python do_qa_staging() { | |||
496 | addtask qa_configure after do_configure before do_compile | 485 | addtask qa_configure after do_configure before do_compile |
497 | python do_qa_configure() { | 486 | python do_qa_configure() { |
498 | bb.note("Checking sanity of the config.log file") | 487 | bb.note("Checking sanity of the config.log file") |
499 | import os | ||
500 | for root, dirs, files in os.walk(bb.data.getVar('WORKDIR', d, True)): | 488 | for root, dirs, files in os.walk(bb.data.getVar('WORKDIR', d, True)): |
501 | statement = "grep 'CROSS COMPILE Badness:' %s > /dev/null" % \ | 489 | statement = "grep 'CROSS COMPILE Badness:' %s > /dev/null" % \ |
502 | os.path.join(root,"config.log") | 490 | os.path.join(root,"config.log") |