[OE-core] (morty) Python exception during rootfs

Mike Looijmans mike.looijmans at topic.nl
Tue Feb 7 16:08:01 UTC 2017


Found it. A rootfs post-process function was misspelled, and that caused it.

I'll make a patch to improve the error message here, to make it just say that 
it cannot find "func".


On 07-02-17 15:21, Mike Looijmans wrote:
> I get this stacktrace from bitbake. No idea what's wrong. Apparently,
> d.getVarFlags(func) returns None and the code cannot handle that. Is this a
> bug in bitbake, or should 'flags' never evaluate to None?
>
>
>
> The stack trace of python calls that resulted in this exception/failure was:
> File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
>      0001:
>  *** 0002:do_rootfs(d)
>      0003:
> File: '/home/mike/projects/zynq-platform/oe-core/meta/classes/image.bbclass',
> lineno: 249, function: do_rootfs
>      0245:
>      0246:    progress_reporter.next_stage()
>      0247:
>      0248:    # generate rootfs
>  *** 0249:    create_rootfs(d, progress_reporter=progress_reporter)
>      0250:
>      0251:    progress_reporter.finish()
>      0252:}
>      0253:do_rootfs[dirs] = "${TOPDIR}"
> File: '/home/mike/projects/zynq-platform/oe-core/meta/lib/oe/rootfs.py',
> lineno: 1006, function: create_rootfs
>      1002:    img_type = d.getVar('IMAGE_PKGTYPE', True)
>      1003:    if img_type == "rpm":
>      1004:        RpmRootfs(d, manifest_dir, progress_reporter).create()
>      1005:    elif img_type == "ipk":
>  *** 1006:        OpkgRootfs(d, manifest_dir, progress_reporter).create()
>      1007:    elif img_type == "deb":
>      1008:        DpkgRootfs(d, manifest_dir, progress_reporter).create()
>      1009:
>      1010:    os.environ.clear()
> File: '/home/mike/projects/zynq-platform/oe-core/meta/lib/oe/rootfs.py',
> lineno: 210, function: create
>      0206:        execute_pre_post_process(self.d, rootfs_post_install_cmds)
>      0207:
>      0208:        self._run_intercepts()
>      0209:
>  *** 0210:        execute_pre_post_process(self.d, post_process_cmds)
>      0211:
>      0212:        if self.progress_reporter:
>      0213:            self.progress_reporter.next_stage()
>      0214:
> File: '/home/mike/projects/zynq-platform/oe-core/meta/lib/oe/utils.py',
> lineno: 176, function: execute_pre_post_process
>      0172:    for cmd in cmds.strip().split(';'):
>      0173:        cmd = cmd.strip()
>      0174:        if cmd != '':
>      0175:            bb.note("Executing %s ..." % cmd)
>  *** 0176:            bb.build.exec_func(cmd, d)
>      0177:
>      0178:def multiprocess_exec(commands, function):
>      0179:    import signal
>      0180:    import multiprocessing
> File: '/home/mike/projects/zynq-platform/bitbake/lib/bb/build.py', lineno:
> 197, function: exec_func
>      0193:    except:
>      0194:        oldcwd = None
>      0195:
>      0196:    flags = d.getVarFlags(func)
>  *** 0197:    cleandirs = flags.get('cleandirs')
>      0198:    if cleandirs:
>      0199:        for cdir in d.expand(cleandirs).split():
>      0200:            bb.utils.remove(cdir, True)
>      0201:            bb.utils.mkdirhier(cdir)
> Exception: AttributeError: 'NoneType' object has no attribute 'get'
>
> ERROR: pr-demo-image-1.0-r0 do_rootfs: Function failed: do_rootfs
> ERROR: Logfile of failure stored in:
> /home/mike/projects/zynq-platform/build/tmp-glibc/work/topic_miami_florida_gen-oe-linux-gnueabi/pr-demo-image/1.0-r0/temp/log.do_rootfs.28716
>
> ERROR: Task
> (/home/mike/projects/zynq-platform/meta-topic-internal/recipes-topic/embedded-world/pr-demo-image.bb:do_rootfs)
> failed with exit code '1'
>
>
>
>
>
> Kind regards,
>
> Mike Looijmans
> System Expert
>
> TOPIC Products
> Materiaalweg 4, NL-5681 RJ Best
> Postbus 440, NL-5680 AK Best
> Telefoon: +31 (0) 499 33 69 79
> E-mail: mike.looijmans at topicproducts.com
> Website: www.topicproducts.com
>
> Please consider the environment before printing this e-mail
>
>
>
>
>



Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: mike.looijmans at topicproducts.com
Website: www.topicproducts.com

Please consider the environment before printing this e-mail








More information about the Openembedded-core mailing list