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. -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto