[yocto] "File exists" exception when IMAGE_LINK_NAME is empty ("")

Vuille, Martin (Martin) vmartin at avaya.com
Sat Oct 25 14:12:07 PDT 2014


After successfully building an image, the second and subsequent
attempts at building the image were failing with a python "OSError:
File exists" exception in do_rootfs.

Even bitbake <image> -c clean did not fix the problem.

Eventually tracked it down to IMAGE_LINK_NAME having been
configured as "" (empty string).

I think the problem is that, in meta/lib/oe/image.py, symlinks are created
when "self.d.getVar('IMAGE_LINK_NAME', True) is not None" is true but
they are cleaned-up when "self.d.getVar('IMAGE_LINK_NAME', True)" is true.

If my very basic understanding of Python is correct, when
IMAGE_LINK_NAME is the empty string, symlinks will not be cleaned-
up (because "" maps to false) before attempting to create them again,
resulting in the exception.

Is an empty string considered a valid value for IMAGE_LINK_NAME?

Is this the right place to report this issue?

Personally, I feel the correct behavior would be to not create the
symlinks when IMAGE_LINK_NAME is the empty string.

MV





More information about the yocto mailing list