All of lore.kernel.org
 help / color / mirror / Atom feed
* Where should I append Yocto bitbake task to create work folder symlink ?
@ 2016-02-03 10:13 Woronicz, Bartosz ( NSN - PL/Wroclaw)
  2016-02-03 10:28 ` Burton, Ross
  2016-02-03 11:05 ` Maciek Borzecki
  0 siblings, 2 replies; 14+ messages in thread
From: Woronicz, Bartosz ( NSN - PL/Wroclaw) @ 2016-02-03 10:13 UTC (permalink / raw)
  To: yocto

Let's say I have my package at

     host-64/tmp/work/x86_64-poky-linux/mypackage/1.2.3-r4/

I would like to have symlink created

     host-64/tmp/work/x86_64-poky-linux/mypackage/latest -> 1.2.3-r4/

each time the new version is fetched and unpacked. How can I achieve 
that ? Which class, task should I append, extend ?

Optionally, I would like to have that for all packages or at least 
packages in my meta.


P.S. I asked the same question here: 
http://stackoverflow.com/questions/35158764/where-should-i-append-yocto-bitbake-task-to-create-work-folder-symlink

-- 
Kind regards,
Bartosz Woronicz
Engineer, Software Configuration (SCM)
NSN - PL/Wroclaw



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-03 10:13 Where should I append Yocto bitbake task to create work folder symlink ? Woronicz, Bartosz ( NSN - PL/Wroclaw)
@ 2016-02-03 10:28 ` Burton, Ross
  2016-02-03 14:16   ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  2016-02-03 11:05 ` Maciek Borzecki
  1 sibling, 1 reply; 14+ messages in thread
From: Burton, Ross @ 2016-02-03 10:28 UTC (permalink / raw)
  To: Woronicz, Bartosz ( NSN - PL/Wroclaw); +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

On 3 February 2016 at 10:13, Woronicz, Bartosz ( NSN - PL/Wroclaw) <
bartosz.woronicz@nokia.com> wrote:

> Let's say I have my package at
>
>     host-64/tmp/work/x86_64-poky-linux/mypackage/1.2.3-r4/
>
> I would like to have symlink created
>
>     host-64/tmp/work/x86_64-poky-linux/mypackage/latest -> 1.2.3-r4/
>
> each time the new version is fetched and unpacked. How can I achieve that
> ? Which class, task should I append, extend ?
>

One way would be to create a new task that comes after unpack and creates
the symlink.

You may be interested in the rm_old_work class that can remove old work
trees so there's only ever one work tree, and I believe due to how master
does sysroot cleanup there's only ever one version in work/ now.

Ross

[-- Attachment #2: Type: text/html, Size: 1274 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-03 10:13 Where should I append Yocto bitbake task to create work folder symlink ? Woronicz, Bartosz ( NSN - PL/Wroclaw)
  2016-02-03 10:28 ` Burton, Ross
@ 2016-02-03 11:05 ` Maciek Borzecki
  2016-02-04 11:07   ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  1 sibling, 1 reply; 14+ messages in thread
From: Maciek Borzecki @ 2016-02-03 11:05 UTC (permalink / raw)
  To: Woronicz, Bartosz ( NSN - PL/Wroclaw), yocto

On śro, 2016-02-03 at 11:13 +0100, Woronicz, Bartosz ( NSN - PL/Wroclaw) wrote:
> Let's say I have my package at
> 
>      host-64/tmp/work/x86_64-poky-linux/mypackage/1.2.3-r4/
> 
> I would like to have symlink created
> 
>      host-64/tmp/work/x86_64-poky-linux/mypackage/latest -> 1.2.3-r4/
> 
> each time the new version is fetched and unpacked. How can I achieve 
> that ? Which class, task should I append, extend ?
> 
> Optionally, I would like to have that for all packages or at least 
> packages in my meta.
> 
> 
> P.S. I asked the same question here: 
> http://stackoverflow.com/questions/35158764/where-should-i-append-yocto-bitbake-task-to-
> create-work-folder-symlink
> 

Put that into a class in your layer, ex. latest-link.bbclass (untested):

do_latest_link() {
	if [ -n "${WORKDIR}" ]; then
		linkname="$(dirname ${WORKDIR})/latest"
		rm -f $linkname
		ln -s ${WORKDIR} $linkname
	fi
}
addtask latest_link after do_unpack


If you want that applied to all the recipes then add INHERIT += "latest-link" in your
local.conf. The other way is just to 'inherit latest-link' in individual recipes.


-- 
Maciej Borzęcki
Senior Software Developer at Open-RnD Sp. z o.o., Poland
www.open-rnd.pl
mobile: +48 889 117 365, fax: +48 42 657 9079

Niniejsza wiadomość wraz z załącznikami może zawierać chronione prawem
lub poufne informacje i została wysłana wyłącznie do wiadomości i
użytku osób, do których została zaadresowana. Jeśli wiadomość została
otrzymana przypadkowo zabrania się jej kopiowania lub rozsyłania do
osób trzecich. W takim przypadku uprasza się o natychmiastowe
zniszczenie wiadomości oraz poinformowanie nadawcy o zaistniałej
sytuacji za pomocą wiadomości zwrotnej. Dziękujemy.

This message, including any attachments hereto, may contain privileged
or confidential information and is sent solely for the attention and
use of the intended addressee(s). If you are not an intended addressee,
you may neither use this message nor copy or deliver it to anyone. In
such case, you should immediately destroy this message and kindly notify
the sender by reply email. Thank you.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-03 10:28 ` Burton, Ross
@ 2016-02-03 14:16   ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  2016-02-03 15:40     ` Burton, Ross
  0 siblings, 1 reply; 14+ messages in thread
From: Woronicz, Bartosz ( NSN - PL/Wroclaw) @ 2016-02-03 14:16 UTC (permalink / raw)
  To: EXT Burton, Ross; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]


On 03.02.2016 11:28, EXT Burton, Ross wrote:
>
> On 3 February 2016 at 10:13, Woronicz, Bartosz ( NSN - PL/Wroclaw) 
> <bartosz.woronicz@nokia.com <mailto:bartosz.woronicz@nokia.com>> wrote:
>
>     Let's say I have my package at
>
>     host-64/tmp/work/x86_64-poky-linux/mypackage/1.2.3-r4/
>
>     I would like to have symlink created
>
>         host-64/tmp/work/x86_64-poky-linux/mypackage/latest -> 1.2.3-r4/
>
>     each time the new version is fetched and unpacked. How can I
>     achieve that ? Which class, task should I append, extend ?
>
>
> One way would be to create a new task that comes after unpack and 
> creates the symlink.
>
> You may be interested in the rm_old_work class that can remove old 
> work trees so there's only ever one work tree, and I believe due to 
> how master does sysroot cleanup there's only ever one version in work/ 
> now.
>
> Ross
But I need to the sysroot cleanup deliberately, right ?


----

Kind regards,
Bartosz Woronicz
Engineer, Software Configuration (SCM)
NSN - PL/Wroclaw



[-- Attachment #2: Type: text/html, Size: 2574 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-03 14:16   ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
@ 2016-02-03 15:40     ` Burton, Ross
  2016-02-04 11:03       ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  0 siblings, 1 reply; 14+ messages in thread
From: Burton, Ross @ 2016-02-03 15:40 UTC (permalink / raw)
  To: Woronicz, Bartosz ( NSN - PL/Wroclaw); +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 245 bytes --]

On 3 February 2016 at 14:16, Woronicz, Bartosz ( NSN - PL/Wroclaw) <
bartosz.woronicz@nokia.com> wrote:

> But I need to the sysroot cleanup deliberately, right ?
>

No, that happens on startup (in master and the jethro release).

Ross

[-- Attachment #2: Type: text/html, Size: 643 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-03 15:40     ` Burton, Ross
@ 2016-02-04 11:03       ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  0 siblings, 0 replies; 14+ messages in thread
From: Woronicz, Bartosz ( NSN - PL/Wroclaw) @ 2016-02-04 11:03 UTC (permalink / raw)
  To: EXT Burton, Ross; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

I will check that out, thanks!

Kind regards,
Bartosz Woronicz
Engineer, Software Configuration (SCM)
NSN - PL/Wroclaw

On 03.02.2016 16:40, EXT Burton, Ross wrote:
>
> On 3 February 2016 at 14:16, Woronicz, Bartosz ( NSN - PL/Wroclaw) 
> <bartosz.woronicz@nokia.com <mailto:bartosz.woronicz@nokia.com>> wrote:
>
>     But I need to the sysroot cleanup deliberately, right ?
>
>
> No, that happens on startup (in master and the jethro release).
>
> Ross


[-- Attachment #2: Type: text/html, Size: 1707 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-03 11:05 ` Maciek Borzecki
@ 2016-02-04 11:07   ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  2016-02-08 13:20     ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  0 siblings, 1 reply; 14+ messages in thread
From: Woronicz, Bartosz ( NSN - PL/Wroclaw) @ 2016-02-04 11:07 UTC (permalink / raw)
  To: maciej.borzecki, yocto

Whoa,

That's great! However I modified it, so the link will be relative

The problem is that it works until you have sstate cache empty, because 
after that it doesn't fetch and unpack when already have it in

do_latest_link() {
	if [ -n "${WORKDIR}" ]; then
		linkname="$(basename $(dirname ${WORKDIR}))/latest"
		rm -f $linkname
		ln -s ${WORKDIR} $linkname
	fi
}
addtask latest_link after do_unpack


Kind regards,
Bartosz Woronicz
Engineer, Software Configuration (SCM)
NSN - PL/Wroclaw

On 03.02.2016 12:05, EXT Maciek Borzecki wrote:
> On śro, 2016-02-03 at 11:13 +0100, Woronicz, Bartosz ( NSN - PL/Wroclaw) wrote:
>> Let's say I have my package at
>>
>>       host-64/tmp/work/x86_64-poky-linux/mypackage/1.2.3-r4/
>>
>> I would like to have symlink created
>>
>>       host-64/tmp/work/x86_64-poky-linux/mypackage/latest -> 1.2.3-r4/
>>
>> each time the new version is fetched and unpacked. How can I achieve
>> that ? Which class, task should I append, extend ?
>>
>> Optionally, I would like to have that for all packages or at least
>> packages in my meta.
>>
>>
>> P.S. I asked the same question here:
>> http://stackoverflow.com/questions/35158764/where-should-i-append-yocto-bitbake-task-to-
>> create-work-folder-symlink
>>
> Put that into a class in your layer, ex. latest-link.bbclass (untested):
>
> do_latest_link() {
> 	if [ -n "${WORKDIR}" ]; then
> 		linkname="$(dirname ${WORKDIR})/latest"
> 		rm -f $linkname
> 		ln -s ${WORKDIR} $linkname
> 	fi
> }
> addtask latest_link after do_unpack
>
>
> If you want that applied to all the recipes then add INHERIT += "latest-link" in your
> local.conf. The other way is just to 'inherit latest-link' in individual recipes.
>
>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-04 11:07   ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
@ 2016-02-08 13:20     ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  2016-02-08 13:44       ` Maciek Borzecki
  0 siblings, 1 reply; 14+ messages in thread
From: Woronicz, Bartosz ( NSN - PL/Wroclaw) @ 2016-02-08 13:20 UTC (permalink / raw)
  To: yocto

The problem is, it doesn't doit delirebately,

when I run

bitbake -f -c latest_link myrecipe , it works

when the process is in the tasks batch running
bitbake myrecipe
it doesn't
What am I doing wrong ?

Kind regards,
Bartosz Woronicz
Engineer, Software Configuration (SCM)
NSN - PL/Wroclaw

On 04.02.2016 12:07, EXT Woronicz, Bartosz ( NSN - PL/Wroclaw) wrote:
> Whoa,
>
> That's great! However I modified it, so the link will be relative
>
> The problem is that it works until you have sstate cache empty, 
> because after that it doesn't fetch and unpack when already have it in
>
> do_latest_link() {
>     if [ -n "${WORKDIR}" ]; then
>         linkname="$(basename $(dirname ${WORKDIR}))/latest"
>         rm -f $linkname
>         ln -s ${WORKDIR} $linkname
>     fi
> }
> addtask latest_link after do_unpack
>
>
> Kind regards,
> Bartosz Woronicz
> Engineer, Software Configuration (SCM)
> NSN - PL/Wroclaw
>
> On 03.02.2016 12:05, EXT Maciek Borzecki wrote:
>> On śro, 2016-02-03 at 11:13 +0100, Woronicz, Bartosz ( NSN - 
>> PL/Wroclaw) wrote:
>>> Let's say I have my package at
>>>
>>>       host-64/tmp/work/x86_64-poky-linux/mypackage/1.2.3-r4/
>>>
>>> I would like to have symlink created
>>>
>>>       host-64/tmp/work/x86_64-poky-linux/mypackage/latest -> 1.2.3-r4/
>>>
>>> each time the new version is fetched and unpacked. How can I achieve
>>> that ? Which class, task should I append, extend ?
>>>
>>> Optionally, I would like to have that for all packages or at least
>>> packages in my meta.
>>>
>>>
>>> P.S. I asked the same question here:
>>> http://stackoverflow.com/questions/35158764/where-should-i-append-yocto-bitbake-task-to- 
>>>
>>> create-work-folder-symlink
>>>
>> Put that into a class in your layer, ex. latest-link.bbclass (untested):
>>
>> do_latest_link() {
>>     if [ -n "${WORKDIR}" ]; then
>>         linkname="$(dirname ${WORKDIR})/latest"
>>         rm -f $linkname
>>         ln -s ${WORKDIR} $linkname
>>     fi
>> }
>> addtask latest_link after do_unpack
>>
>>
>> If you want that applied to all the recipes then add INHERIT += 
>> "latest-link" in your
>> local.conf. The other way is just to 'inherit latest-link' in 
>> individual recipes.
>>
>>
>



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-08 13:20     ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
@ 2016-02-08 13:44       ` Maciek Borzecki
  2016-02-09  8:37         ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  0 siblings, 1 reply; 14+ messages in thread
From: Maciek Borzecki @ 2016-02-08 13:44 UTC (permalink / raw)
  To: Woronicz, Bartosz ( NSN - PL/Wroclaw), yocto

On pon, 2016-02-08 at 14:20 +0100, Woronicz, Bartosz ( NSN - PL/Wroclaw) wrote:
> The problem is, it doesn't doit delirebately,
> 
> when I run
> 
> bitbake -f -c latest_link myrecipe , it works
> 
> when the process is in the tasks batch running
> bitbake myrecipe
> it doesn't
> What am I doing wrong ?

Try adding:

do_latest_link[nostamp] = "1"

This should cause the task to be run each time.

-- 
Maciej Borzęcki
Senior Software Developer at Open-RnD Sp. z o.o., Poland
www.open-rnd.pl
mobile: +48 889 117 365, fax: +48 42 657 9079

Niniejsza wiadomość wraz z załącznikami może zawierać chronione prawem
lub poufne informacje i została wysłana wyłącznie do wiadomości i
użytku osób, do których została zaadresowana. Jeśli wiadomość została
otrzymana przypadkowo zabrania się jej kopiowania lub rozsyłania do
osób trzecich. W takim przypadku uprasza się o natychmiastowe
zniszczenie wiadomości oraz poinformowanie nadawcy o zaistniałej
sytuacji za pomocą wiadomości zwrotnej. Dziękujemy.

This message, including any attachments hereto, may contain privileged
or confidential information and is sent solely for the attention and
use of the intended addressee(s). If you are not an intended addressee,
you may neither use this message nor copy or deliver it to anyone. In
such case, you should immediately destroy this message and kindly notify
the sender by reply email. Thank you.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-08 13:44       ` Maciek Borzecki
@ 2016-02-09  8:37         ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  2016-02-09  9:10           ` Burton, Ross
  0 siblings, 1 reply; 14+ messages in thread
From: Woronicz, Bartosz ( NSN - PL/Wroclaw) @ 2016-02-09  8:37 UTC (permalink / raw)
  To: maciej.borzecki, yocto


On 08.02.2016 14:44, EXT Maciek Borzecki wrote:
> On pon, 2016-02-08 at 14:20 +0100, Woronicz, Bartosz ( NSN - PL/Wroclaw) wrote:
>> The problem is, it doesn't doit delirebately,
>>
>> when I run
>>
>> bitbake -f -c latest_link myrecipe , it works
>>
>> when the process is in the tasks batch running
>> bitbake myrecipe
>> it doesn't
>> What am I doing wrong ?
> Try adding:
>
> do_latest_link[nostamp] = "1"
>
> This should cause the task to be run each time.
>
Ok, but I don't want to run it everytime, just after the do_unpack. What 
I need to put it in requirements for each recipe ?
Maybe something like

do_unpack[require] = "latest_link"

but I cannot find such thing


Kind regards,
Bartosz Woronicz
Engineer, Software Configuration (SCM)
NSN - PL/Wroclaw



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-09  8:37         ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
@ 2016-02-09  9:10           ` Burton, Ross
  2016-02-09 13:51             ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  0 siblings, 1 reply; 14+ messages in thread
From: Burton, Ross @ 2016-02-09  9:10 UTC (permalink / raw)
  To: Woronicz, Bartosz ( NSN - PL/Wroclaw); +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

On 9 February 2016 at 08:37, Woronicz, Bartosz ( NSN - PL/Wroclaw) <
bartosz.woronicz@nokia.com> wrote:

> Ok, but I don't want to run it everytime, just after the do_unpack. What I
> need to put it in requirements for each recipe ?
> Maybe something like
>
> do_unpack[require] = "latest_link"
>

do_unpack[postfuncs] += "latest_link" will run latest_link after unpack has
executed.

Ross

[-- Attachment #2: Type: text/html, Size: 842 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-09  9:10           ` Burton, Ross
@ 2016-02-09 13:51             ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  2016-02-09 13:56               ` Burton, Ross
  0 siblings, 1 reply; 14+ messages in thread
From: Woronicz, Bartosz ( NSN - PL/Wroclaw) @ 2016-02-09 13:51 UTC (permalink / raw)
  To: EXT Burton, Ross; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 2165 bytes --]

Cheers, mate!

That solves my issue (but with small fix).
/do_unpack[postfuncs] += "do_latest_link"
/instead/
//do_unpack[postfuncs] += "latest_link"

Because, without "do_" it says
WARNING: Function latest_link doesn't exist

/Here is the whole bbclass/:
/

    DESCRIPTION = "Creates symlink to the latest version workdir of the
    package"

    do_latest_link() {
         if [ -n "${WORKDIR}" ]; then
             linkname="$(dirname ${WORKDIR})/latest"
             rm -f $linkname
             ln -s $(basename ${WORKDIR}) $linkname
         fi
    }
    addtask latest_link after do_unpack

    do_unpack[postfuncs] += "do_latest_link"


But for better understanding I made the more throughout look into the 
documentations. I found the information about "postfuncs" you talk about 
[1]. However, the tasks description [2] doesn't say anything about 
including the task in the process, it just describes the demanded order 
that the task is put ( addtask something after|before othertask ).

That is so, until I read "3.6. Variable Flags"  [3]. Where is quite 
clearly stated those variables control functionality and *dependencies*.
The documentation is quite unclear in that case.

[1] 
http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#executing-tasks
[2] 
http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#tasks
[3] 
http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#variable-flags 


Kind regards,
Bartosz Woronicz
Engineer, Software Configuration (SCM)
NSN - PL/Wroclaw

On 09.02.2016 10:10, EXT Burton, Ross wrote:
>
> On 9 February 2016 at 08:37, Woronicz, Bartosz ( NSN - PL/Wroclaw) 
> <bartosz.woronicz@nokia.com <mailto:bartosz.woronicz@nokia.com>> wrote:
>
>     Ok, but I don't want to run it everytime, just after the
>     do_unpack. What I need to put it in requirements for each recipe ?
>     Maybe something like
>
>     do_unpack[require] = "latest_link"
>
>
> do_unpack[postfuncs] += "latest_link" will run latest_link after 
> unpack has executed.
>
> Ross


[-- Attachment #2: Type: text/html, Size: 4209 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-09 13:51             ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
@ 2016-02-09 13:56               ` Burton, Ross
  2016-02-10 14:00                 ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  0 siblings, 1 reply; 14+ messages in thread
From: Burton, Ross @ 2016-02-09 13:56 UTC (permalink / raw)
  To: Woronicz, Bartosz ( NSN - PL/Wroclaw); +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1238 bytes --]

On 9 February 2016 at 13:51, Woronicz, Bartosz ( NSN - PL/Wroclaw) <
bartosz.woronicz@nokia.com> wrote:

> Here is the whole bbclass
> *: *
>
> DESCRIPTION = "Creates symlink to the latest version workdir of the
> package"
>
> do_latest_link() {
>     if [ -n "${WORKDIR}" ]; then
>         linkname="$(dirname ${WORKDIR})/latest"
>         rm -f $linkname
>         ln -s $(basename ${WORKDIR}) $linkname
>     fi
> }
> addtask latest_link after do_unpack
>
> do_unpack[postfuncs] += "do_latest_link"
>
>
> But for better understanding I made the more throughout look into the
> documentations. I found the information about "postfuncs" you talk about
> [1]. However, the tasks description [2] doesn't say anything about
> including the task in the process, it just describes the demanded order
> that the task is put ( addtask something after|before othertask ).
>
> That is so, until I read "3.6. Variable Flags"  [3]. Where is quite
> clearly stated those variables control functionality and *dependencies*.
> The documentation is quite unclear in that case.
>

If you're using a postfunc you don't need to addtask at all: using
postfuncs means you don't need to have a separate task at all.

Ross

[-- Attachment #2: Type: text/html, Size: 1963 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Where should I append Yocto bitbake task to create work folder symlink ?
  2016-02-09 13:56               ` Burton, Ross
@ 2016-02-10 14:00                 ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
  0 siblings, 0 replies; 14+ messages in thread
From: Woronicz, Bartosz ( NSN - PL/Wroclaw) @ 2016-02-10 14:00 UTC (permalink / raw)
  To: EXT Burton, Ross; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]


On 09.02.2016 14:56, EXT Burton, Ross wrote:
>
> On 9 February 2016 at 13:51, Woronicz, Bartosz ( NSN - PL/Wroclaw) 
> <bartosz.woronicz@nokia.com <mailto:bartosz.woronicz@nokia.com>> wrote:
>
>     Here is the whole bbclass/:
>     /
>
>         DESCRIPTION = "Creates symlink to the latest version workdir
>         of the package"
>
>         do_latest_link() {
>             if [ -n "${WORKDIR}" ]; then
>                 linkname="$(dirname ${WORKDIR})/latest"
>                 rm -f $linkname
>                 ln -s $(basename ${WORKDIR}) $linkname
>             fi
>         }
>         addtask latest_link after do_unpack
>
>         do_unpack[postfuncs] += "do_latest_link"
>
>
>     But for better understanding I made the more throughout look into
>     the documentations. I found the information about "postfuncs" you
>     talk about [1]. However, the tasks description [2] doesn't say
>     anything about including the task in the process, it just
>     describes the demanded order that the task is put ( addtask
>     something after|before othertask ).
>
>     That is so, until I read "3.6. Variable Flags"  [3]. Where is
>     quite clearly stated those variables control functionality and
>     *dependencies*.
>     The documentation is quite unclear in that case.
>
>
> If you're using a postfunc you don't need to addtask at all: using 
> postfuncs means you don't need to have a separate task at all.
>
> Ross
Ok, I understand now that 'addtask' is only necessary when I need 
seperate task to run. I think you solved my issue. Thanks again!

Kind regards,
Bartosz Woronicz
Engineer, Software Configuration (SCM)
NSN - PL/Wroclaw


[-- Attachment #2: Type: text/html, Size: 3413 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-02-10 14:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 10:13 Where should I append Yocto bitbake task to create work folder symlink ? Woronicz, Bartosz ( NSN - PL/Wroclaw)
2016-02-03 10:28 ` Burton, Ross
2016-02-03 14:16   ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
2016-02-03 15:40     ` Burton, Ross
2016-02-04 11:03       ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
2016-02-03 11:05 ` Maciek Borzecki
2016-02-04 11:07   ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
2016-02-08 13:20     ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
2016-02-08 13:44       ` Maciek Borzecki
2016-02-09  8:37         ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
2016-02-09  9:10           ` Burton, Ross
2016-02-09 13:51             ` Woronicz, Bartosz ( NSN - PL/Wroclaw)
2016-02-09 13:56               ` Burton, Ross
2016-02-10 14:00                 ` Woronicz, Bartosz ( NSN - PL/Wroclaw)

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.