diff options
| author | Laurentiu Palcu <laurentiu.palcu@intel.com> | 2014-01-13 10:16:43 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-11 11:53:39 +0000 |
| commit | f52391a919ec4969d3a0254513d4e0c971dd611f (patch) | |
| tree | d6ab2af1f45a39cd5056934a15f86feed612df2d /meta/classes/image.bbclass | |
| parent | 31906d8e916f72da8493655672bd6731e46b20f5 (diff) | |
| download | poky-f52391a919ec4969d3a0254513d4e0c971dd611f.tar.gz | |
Cleanup image,rootfs_ipk,package_ipk bbclass files
This commit cleans up the functions that were ported to python.
(From OE-Core rev: d950ef40a3eae4b54cc62828e66d84a62d78c447)
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
| -rw-r--r-- | meta/classes/image.bbclass | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 0b35c719fd..ffe05c9040 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
| @@ -287,44 +287,6 @@ MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${l | |||
| 287 | MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" | 287 | MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py" |
| 288 | MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" | 288 | MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" |
| 289 | 289 | ||
| 290 | multilib_generate_python_file() { | ||
| 291 | cat >${MULTILIB_CHECK_FILE} <<EOF | ||
| 292 | import sys, os, os.path | ||
| 293 | import re,filecmp | ||
| 294 | |||
| 295 | allow_rep=re.compile(re.sub("\|$","","${MULTILIBRE_ALLOW_REP}")) | ||
| 296 | error_prompt="Multilib check error:" | ||
| 297 | |||
| 298 | files={} | ||
| 299 | dirs=raw_input() | ||
| 300 | for dir in dirs.split(): | ||
| 301 | for root, subfolders, subfiles in os.walk(dir): | ||
| 302 | for file in subfiles: | ||
| 303 | item=os.path.join(root,file) | ||
| 304 | key=str(os.path.join("/",os.path.relpath(item,dir))) | ||
| 305 | |||
| 306 | valid=True; | ||
| 307 | if key in files: | ||
| 308 | #check whether the file is allow to replace | ||
| 309 | if allow_rep.match(key): | ||
| 310 | valid=True | ||
| 311 | else: | ||
| 312 | if not filecmp.cmp(files[key],item): | ||
| 313 | valid=False | ||
| 314 | print("%s duplicate files %s %s is not the same\n" % (error_prompt, item, files[key])) | ||
| 315 | sys.exit(1) | ||
| 316 | |||
| 317 | #pass the check, add to list | ||
| 318 | if valid: | ||
| 319 | files[key]=item | ||
| 320 | EOF | ||
| 321 | } | ||
| 322 | |||
| 323 | multilib_sanity_check() { | ||
| 324 | multilib_generate_python_file | ||
| 325 | echo $@ | python ${MULTILIB_CHECK_FILE} | ||
| 326 | } | ||
| 327 | |||
| 328 | # This function is intended to disallow empty root password if 'debug-tweaks' is not in IMAGE_FEATURES. | 290 | # This function is intended to disallow empty root password if 'debug-tweaks' is not in IMAGE_FEATURES. |
| 329 | zap_empty_root_password () { | 291 | zap_empty_root_password () { |
| 330 | if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then | 292 | if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then |
