From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6491554293275951104 X-Received: by 10.25.16.42 with SMTP id f42mr58357lfi.37.1513005351184; Mon, 11 Dec 2017 07:15:51 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.67.136 with SMTP id z8ls1021606lje.2.gmail; Mon, 11 Dec 2017 07:15:50 -0800 (PST) X-Google-Smtp-Source: ACJfBovnowAqVxhj+/YrJkKn0lOWZqrpw56Bw+/NEgGDW6SSSb+Td6EQSHqZ/5qY6W7+8wXnVc9Z X-Received: by 10.25.18.160 with SMTP id 32mr60567lfs.6.1513005350743; Mon, 11 Dec 2017 07:15:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513005350; cv=none; d=google.com; s=arc-20160816; b=FjcaSeq9cERVVjZnchBcMS2DT3Tiduy5+jMwBGrTs4sYUhfk0mzF9dfNab/C83nUjQ X6rOHleS4nlbMRzXTPrrxSvZBe1Z12FQoc/yXW3sic/yWojijRlg1eIVmFKTj+CF9h1U 4hi1BqtVsHX/E8cpgNBJ/tN/iColxkH86VILT2Z5bOpFT0UvVKmsWVZosiELlw49JN6U fgljym/Rucbx8ernK2Wp+tlC1tpJ1K1lluFMu26d7t2HgXj1G1uLoiqiuuvbA80h08SM HLhvhc/EOViOt6M0sqLtQFYPTo4qEeI1CiEQHtrgJImjbwT3tTuOKgVFiAXkdjK25wQr QFCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:mail-followup-to:message-id :subject:to:from:date:arc-authentication-results; bh=P2/gDBHJDabnKTxKjlkfoA5ZhpFB0Uvtp6ngme1sPDk=; b=GmaWKApLtHsYtrk2pS7sxHiOB/vMcSJ7XUjKpnyhXDHjPh4Rnwq/xWXCtdjeseuAf9 3Ii9u6H+AWE/tlcOHYTTM6SZBGrn9pGqXjIvIuKRnPzEh4ctI6U+7HF/FSkUfqvnPeHJ vjjxZoTbi+f/fkz61Qq1RNNtWqHfll9fRUneqP4erRFfQmDUHIuW725CI6jkAVx5QxRx lBLASWYWVEawvCJrax5E7aE4KAKCGbp1R1fqGN/GuIRrjSRR+uFSG3DWrBkytbowBG4J ztzkoXgtgOKw3bVSW+Zkp6IMEslyYbAt/+wQv+g0/5FS697a6kzU1hu/SRLDI8tYh/+D cueA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of christian.storm@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=christian.storm@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id 198si1536091ljj.1.2017.12.11.07.15.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Dec 2017 07:15:50 -0800 (PST) Received-SPF: pass (google.com: domain of christian.storm@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of christian.storm@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=christian.storm@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id vBBFFoPA024631 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 11 Dec 2017 16:15:50 +0100 Received: from localhost ([139.25.69.251]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTPS id vBBFFn41018133 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 11 Dec 2017 16:15:49 +0100 Date: Mon, 11 Dec 2017 16:14:00 +0100 From: Christian Storm To: isar-users@googlegroups.com Subject: Re: [PATCH 3/4 v2] buildchroot: Add prepare and cleanup tasks Message-ID: <20171211151400.hrmyrvswyw53e7tz@MD1KR9XC.ww002.siemens.net> Mail-Followup-To: isar-users@googlegroups.com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <18a32ba4-fe05-9812-7a24-0011490a749b@ilbers.de> User-Agent: Mutt/20170113 (1.7.2) X-TUID: 04OXb0eRxmFJ > 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 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? Christian -- Dr. Christian Storm Siemens AG, Corporate Technology, CT RDA ITP SES-DE Otto-Hahn-Ring 6, 81739 M�nchen, Germany