[OE-core] [PATCH] image_types.bbclass: fix link creation failure if the target already exists
Richard Purdie
richard.purdie at linuxfoundation.org
Fri Mar 2 13:20:40 UTC 2012
On Fri, 2012-03-02 at 13:48 +0100, Andreas Müller wrote:
> On Fri, Mar 2, 2012 at 1:38 PM, Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
> > On Fri, 2012-03-02 at 13:29 +0100, Andreas Müller wrote:
> >> On Thu, Mar 1, 2012 at 4:50 PM, Richard Purdie
> >> | ln: failed to create symbolic link
> >> `/home/andreas/tmp/oe-core-eglibc/deploy/images/overo/xfce-base-image-overo.tar.bz2':
> >> File exists
> >> NOTE: package xfce-base-image-1.0-r0: task do_rootfs: Failed
> >
> > Could you see what the IMAGE_FSTYPES variable contains please?
> >
> > (bitbake xfce-base-image -e | grep ^IMAGE_FSTYPES)
> >
> > The code shouldn't be trying to create this symlink more than once so
> > whilst I understand the intent of the patch adding -f, I'd like to
> > understand the root cause of the problem to ensure there isn't some
> > other issue.
> >
> Agreed:
>
> IMAGE_FSTYPES="tar.bz2 tar.bz2"
>
> Seems a 'sum' of local.conf
>
> IMAGE_FSTYPES = "tar.bz2"
>
> and machine.conf
>
> IMAGE_FSTYPES += "tar.bz2"
Thanks, that helps a lot. I'd tested "tar tar" and "tar.gz tar.bz2" but
not that :). I think something like:
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 681571d..1bf59a5 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -17,7 +17,8 @@ def get_imagecmds(d):
types.append(basetype)
if basetype not in cimages:
cimages[basetype] = []
- cimages[basetype].append(ctype)
+ if ctype not in cimages[basetype]:
+ cimages[basetype].append(ctype)
break
if not basetype and type not in types:
types.append(type)
should fix this?
Cheers,
Richard
More information about the Openembedded-core
mailing list