From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6491554293275951104 X-Received: by 10.28.241.7 with SMTP id p7mr87100wmh.30.1513064376558; Mon, 11 Dec 2017 23:39:36 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.216.197 with SMTP id p188ls2043011wmg.6.gmail; Mon, 11 Dec 2017 23:39:36 -0800 (PST) X-Google-Smtp-Source: ACJfBou6DTQEGjNBEWPNpyZj6nNI/JlK2h6tyB6QplSvUUe3IInuM5PPTxdy99qUdY9iAPbquJYh X-Received: by 10.28.112.12 with SMTP id l12mr85711wmc.9.1513064376150; Mon, 11 Dec 2017 23:39:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513064376; cv=none; d=google.com; s=arc-20160816; b=zQPf6zF+WsRv9JQAP6d5bi7dkWB5QqniW6O8KJmkTjztgtOcmmwBmmbBkHL+fEGyOT o+4FVf6Myrg1cjVIfYq8geOORNEQHo0OQ9O7sarTsFWNAd4IrseyySn4YaTqF1dY8Rfg 0K/3Lf+OMRoYdhGBJr6BWMjT8JmS1YiU0UVkaqDWLZN5bFcTanIFXfMbDCoSkHGXeliq SJAEV2fix0Bb2J692nS8Q/AMfkPA+i88l3jZQ5foM02kpvNGfU0cVK1mBQ9CfeU2JOxE GEsX1hFUGhvRG3qAoPpVKeq9clU3kSyyv5B7ghALhqCOunf8/Wyl2RQRnUgAyKvpzHLo cN1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=Yfv9nLA6uUjAKdA3cs2hf02+bvmNBAe5DY2LlMQBiGs=; b=acJ/QeAvmHnsfvQPzdSgnPFy7RTL3OjfaLpN1yNWXEJeRa1tH3UP652kHCo/QazheQ m1rXjlp/JJrE8b23grgoAq4snhJN5QsNtkVv/oTncZEqH3ta3LM7zwOojpHKoQj/HQn9 YHY84sWW15XuE1uChhMd0d/o9YN2r4iOTBpDtANxgoQTAQVo0sOgK89d0fhjIAty9t8y 0vdCC+gW4JUU3y2Hd4B3BTzF0Jgcc9zeuk+1t7OKfO5j+RW+up0u19jAVPccFy81bv7z FtAbLDpjpNWHh2Ntf4o39PpfZAWDrc5HR1aEWKqh5KjFDUZu2L/mPgrhhniIXvKgK9Wh rXBg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id r6si1659924wrg.2.2017.12.11.23.39.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 23:39:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from [10.0.2.15] (client.yota.ru [188.162.65.100] (may be forged)) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id vBC7dWZ5027142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Tue, 12 Dec 2017 08:39:34 +0100 Subject: Re: [PATCH 3/4 v2] buildchroot: Add prepare and cleanup tasks To: isar-users@googlegroups.com References: <20171211151400.hrmyrvswyw53e7tz@MD1KR9XC.ww002.siemens.net> From: Alexander Smirnov Message-ID: <16c190d8-c359-26cc-4933-93629b9a7b77@ilbers.de> Date: Tue, 12 Dec 2017 10:39:27 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171211151400.hrmyrvswyw53e7tz@MD1KR9XC.ww002.siemens.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: M3YdI0iIsp6+ Hi, On 12/11/2017 06:14 PM, Christian Storm wrote: >> Sorry, but I still don't understand how this patch brakes your build >> because it doesn't influence on dependencies at all. >> If you need strict order for packages to be built, then anyway you >> have to specify this in recipe: >> >> In recipe B: >> >> DEPENDS += "A" >> do_build[deptask] = "do_build" >> >> It would be very helpful for me if you could provide recipes and workaround. > > > OK, here's one example, anonymized, that used to work: > > ```meta-mylayer/recipes-core/A/A.bb > ... > SRC_URI = "git://..." > SRC_DIR = "git" > > PROVIDES = "${PN}-dev" > inherit dpkg > > dpkg_runbuild() { > ... > sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR} > ... > } > ``` > > This is a pretty standard recipe whose only purpose is to build two .deb > packages, one containing the binaries, one containing build-time > dependencies for B.bb below: > The resulting A-dev.deb package then contains, e.g., > /usr/lib/x86_64-linux-gnu/libA.a > and this is used as build-time dependency from B. Consider > /usr/lib/x86_64-linux-gnu/libA.a > to be linked into the software binary compiled by B.B. > > ```meta-mylayer/recipes-core/B/B.bb > ... > SRC_URI = "git://..." > SRC_DIR = "git" > > DEPENDS = "A-dev" > inherit dpkg > > dpkg_runbuild() { > ... > ## UGLY hack to install build-time dependency A-dev required for the > ## software to be compiled here > for item in $(echo ${DEPENDS} | sed 's/buildchroot//g'); do > sudo dpkg --root=${BUILDCHROOT_DIR} -i ${DEPLOY_DIR_DEB}/${item}_* > done > BTW: why can't you add this hack to 'build.sh', after 'dpkg-buildpackage' complete, just run 'dpkg -i' on newly baked packages. Also ugly, but no headache with deps parsing. :-) > sudo chroot ${BUILDCHROOT_DIR} /build.sh ${PP}/${SRC_DIR} > ... > } > ``` > > This does not work on current -next. Even if you do the > do_build[deptask] = "do_build" > because do_cleanup() kicks in and unmounts ${BUILDCHROOT_DIR}/git > and the task reordering of deploy_deb(). > > > Hope this example helps? Probably I get the possible issue. How do you add packages A and B to the build chain, via IMAGE_INSTALL? If so, where do you set IMAGE_INSTALL variable? Alex