All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Woronicz, Bartosz ( NSN - PL/Wroclaw)" <bartosz.woronicz@nokia.com>
To: "EXT Burton, Ross" <ross.burton@intel.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: Where should I append Yocto bitbake task to create work folder symlink ?
Date: Tue, 9 Feb 2016 14:51:03 +0100	[thread overview]
Message-ID: <56B9EEC7.8010303@nokia.com> (raw)
In-Reply-To: <CAJTo0LYj05btWH+pnLkp-gwd+S1qefys+_ZhdEMBGShqm08nrQ@mail.gmail.com>

[-- 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 --]

  reply	other threads:[~2016-02-09 13:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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) [this message]
2016-02-09 13:56               ` Burton, Ross
2016-02-10 14:00                 ` Woronicz, Bartosz ( NSN - PL/Wroclaw)

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=56B9EEC7.8010303@nokia.com \
    --to=bartosz.woronicz@nokia.com \
    --cc=ross.burton@intel.com \
    --cc=yocto@yoctoproject.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.