* [PATCH] image_types.bbclass: fix link creation failure if the target already exists
@ 2012-02-29 20:33 Petr Štetiar
2012-03-01 15:50 ` Richard Purdie
0 siblings, 1 reply; 7+ messages in thread
From: Petr Štetiar @ 2012-02-29 20:33 UTC (permalink / raw)
To: openembedded-core
| ln: failed to create symbolic link `beagleboard/systemd-image-beagleboard.tar.bz2': File exists
NOTE: package systemd-image-1.0-r0: task do_rootfs: Failed
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
meta/classes/image_types.bbclass | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 5b48a09..adab573 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -61,7 +61,7 @@ runimagecmd () {
# And create the symlinks
if [ -n "${IMAGE_LINK_NAME}" ]; then
for type in ${subimages}; do
- ln -s ${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type
+ ln -fs ${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type
done
fi
}
--
1.7.9
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] image_types.bbclass: fix link creation failure if the target already exists
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
0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2012-03-01 15:50 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Wed, 2012-02-29 at 21:33 +0100, Petr Štetiar wrote:
> | ln: failed to create symbolic link `beagleboard/systemd-image-beagleboard.tar.bz2': File exists
> NOTE: package systemd-image-1.0-r0: task do_rootfs: Failed
>
> Signed-off-by: Petr Štetiar <ynezz@true.cz>
> ---
> meta/classes/image_types.bbclass | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Is this still necessary after the recent image_types.bbclass fixes?
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] image_types.bbclass: fix link creation failure if the target already exists
2012-03-01 15:50 ` Richard Purdie
@ 2012-03-02 12:29 ` Andreas Müller
2012-03-02 12:38 ` Richard Purdie
0 siblings, 1 reply; 7+ messages in thread
From: Andreas Müller @ 2012-03-02 12:29 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Thu, Mar 1, 2012 at 4:50 PM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Wed, 2012-02-29 at 21:33 +0100, Petr Štetiar wrote:
>> | ln: failed to create symbolic link `beagleboard/systemd-image-beagleboard.tar.bz2': File exists
>> NOTE: package systemd-image-1.0-r0: task do_rootfs: Failed
>>
>> Signed-off-by: Petr Štetiar <ynezz@true.cz>
>> ---
>> meta/classes/image_types.bbclass | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> Is this still necessary after the recent image_types.bbclass fixes?
>
I pulled ~3-4 hours ago and the error persists. I don't know if it is
important for this problem but I am using opkg and get:
| 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
Cheers
Andreas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] image_types.bbclass: fix link creation failure if the target already exists
2012-03-02 12:29 ` Andreas Müller
@ 2012-03-02 12:38 ` Richard Purdie
2012-03-02 12:48 ` Andreas Müller
0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2012-03-02 12:38 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Fri, 2012-03-02 at 13:29 +0100, Andreas Müller wrote:
> On Thu, Mar 1, 2012 at 4:50 PM, Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > On Wed, 2012-02-29 at 21:33 +0100, Petr Štetiar wrote:
> >> | ln: failed to create symbolic link `beagleboard/systemd-image-beagleboard.tar.bz2': File exists
> >> NOTE: package systemd-image-1.0-r0: task do_rootfs: Failed
> >>
> >> Signed-off-by: Petr Štetiar <ynezz@true.cz>
> >> ---
> >> meta/classes/image_types.bbclass | 2 +-
> >> 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > Is this still necessary after the recent image_types.bbclass fixes?
> >
> I pulled ~3-4 hours ago and the error persists. I don't know if it is
> important for this problem but I am using opkg and get:
>
> | 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.
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] image_types.bbclass: fix link creation failure if the target already exists
2012-03-02 12:38 ` Richard Purdie
@ 2012-03-02 12:48 ` Andreas Müller
2012-03-02 13:20 ` Richard Purdie
0 siblings, 1 reply; 7+ messages in thread
From: Andreas Müller @ 2012-03-02 12:48 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
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
>> <richard.purdie@linuxfoundation.org> wrote:
>> > On Wed, 2012-02-29 at 21:33 +0100, Petr Štetiar wrote:
>> >> | ln: failed to create symbolic link `beagleboard/systemd-image-beagleboard.tar.bz2': File exists
>> >> NOTE: package systemd-image-1.0-r0: task do_rootfs: Failed
>> >>
>> >> Signed-off-by: Petr Štetiar <ynezz@true.cz>
>> >> ---
>> >> meta/classes/image_types.bbclass | 2 +-
>> >> 1 files changed, 1 insertions(+), 1 deletions(-)
>> >
>> > Is this still necessary after the recent image_types.bbclass fixes?
>> >
>> I pulled ~3-4 hours ago and the error persists. I don't know if it is
>> important for this problem but I am using opkg and get:
>>
>> | 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"
Andreas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] image_types.bbclass: fix link creation failure if the target already exists
2012-03-02 12:48 ` Andreas Müller
@ 2012-03-02 13:20 ` Richard Purdie
2012-03-02 22:01 ` Petr Štetiar
0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2012-03-02 13:20 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] image_types.bbclass: fix link creation failure if the target already exists
2012-03-02 13:20 ` Richard Purdie
@ 2012-03-02 22:01 ` Petr Štetiar
0 siblings, 0 replies; 7+ messages in thread
From: Petr Štetiar @ 2012-03-02 22:01 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
Richard Purdie <richard.purdie@linuxfoundation.org> [2012-03-02 13:20:40]:
> 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?
It's ok now. Thanks.
-- ynezz
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-02 22:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-03-02 22:01 ` Petr Štetiar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox