All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] image_types.bbclass: fix link creation failure if the target already exists
Date: Fri, 02 Mar 2012 13:20:40 +0000	[thread overview]
Message-ID: <1330694440.18076.1.camel@ted> (raw)
In-Reply-To: <CALbNGRSJMFZ03x25xE+d_Sj6H2g6=gFx5OX15GAO2sRAGKrsSg@mail.gmail.com>

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@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





  reply	other threads:[~2012-03-02 13:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-29 20:33 [PATCH] image_types.bbclass: fix link creation failure if the target already exists Petr Štetiar
2012-03-01 15:50 ` Richard Purdie
2012-03-02 12:29   ` Andreas Müller
2012-03-02 12:38     ` Richard Purdie
2012-03-02 12:48       ` Andreas Müller
2012-03-02 13:20         ` Richard Purdie [this message]
2012-03-02 22:01           ` Petr Štetiar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330694440.18076.1.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.