All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciek Borzecki <maciej.borzecki@open-rnd.pl>
To: "Woronicz,
	Bartosz ( NSN - PL/Wroclaw)" <bartosz.woronicz@nokia.com>,
	 yocto@yoctoproject.org
Subject: Re: Where should I append Yocto bitbake task to create work folder symlink ?
Date: Wed, 03 Feb 2016 12:05:13 +0100	[thread overview]
Message-ID: <1454497513.3990.6.camel@open-rnd.pl> (raw)
In-Reply-To: <56B1D2D1.5010508@nokia.com>

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.





  parent reply	other threads:[~2016-02-03 11:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 10:13 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 [this message]
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)

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=1454497513.3990.6.camel@open-rnd.pl \
    --to=maciej.borzecki@open-rnd.pl \
    --cc=bartosz.woronicz@nokia.com \
    --cc=yocto@yoctoproject.org \
    --subject='Re: Where should I append Yocto bitbake task to create work folder symlink ?' \
    /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

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.