From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6460145511672315904 X-Received: by 10.25.195.194 with SMTP id t185mr101558lff.10.1504537888731; Mon, 04 Sep 2017 08:11:28 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.81.65 with SMTP id b1ls41113lje.25.gmail; Mon, 04 Sep 2017 08:11:28 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5C5A+5BVnHYb4mbFyQSpqfGOoD5FGd9PnuxP8zjhjFGjCxLLwZSqbEw1QtAlQIHGxWA6i9 X-Received: by 10.25.221.216 with SMTP id w85mr99967lfi.44.1504537888203; Mon, 04 Sep 2017 08:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504537888; cv=none; d=google.com; s=arc-20160816; b=kKFCx1GMjhkT86rGWKtD2Osbvqcd5DzKT3/HjaftsmmDTylwq8AX8/VFTLS700OcPM yIdnVSjD8+h0v8/3TEdvThMKwEI5jWK/7sf5FQUmQGDvqGksoRRqMIWYVZ8xTj0bcA6d FLcufdx3EuwgTctpJXOC8zxa4aypkwsYwnGOKZeBc+egZErGzHUPWdU57KHXrElF4/SZ k4bjicPwmUoFeZr+orET1x9aajhuzvcAdDfRliRgeXs5dOqDskZhZr2VSMwBkTTfci3B lGL9OSI43+6y130aLVzOIQu6F2ST29/IAwoJX/FG3jc7Y0s/C1EcUycnYPpgD4M9i1lj +JDQ== 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=ve2k1KvWYXs0DcKseHNtheRzmBL7LcJS8lRH3RSMlHo=; b=ejk81kwEb1YPTseA51Ehuwm+BnSD17RaGm9M2/xxVQ0s1yGwpIcbhjfhnW+xPgMkEd a15ThcI02ggMl51iI1kCwlTwLdWTJc66zR+Vw4mkvfpyLPz1MFAXSkCF7YWE0szOmiRf k83soHPWuRgQVpo1CazMdrjN+KoHSM4nIAK0TkKnM8gYeU/UpGElY7hH/MTp1kZGKrU8 8EfdsNsw42CN3fjXbcZPN93IvA7noGg4bf0SmEU1R4nRlSlvDuA9htPKqsEegsplXPo/ rfwJk+9GSxRmIuESXabdMw+N2D5k0UPl3n78vbdAspoWv73lLTQDNYDAbChum4nPcB8p HcMg== 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 y62si718745wme.1.2017.09.04.08.11.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Sep 2017 08:11:27 -0700 (PDT) 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] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id v84FBOMe008934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Mon, 4 Sep 2017 17:11:26 +0200 Subject: Re: [PATCH 1/6] meta/dpkg: Make 'do_unpack' more generic, prepare for pulling out To: isar-users@googlegroups.com References: From: Alexander Smirnov Message-ID: <6f7b53c5-3238-1d8d-88a7-7afc3859a9ec@ilbers.de> Date: Mon, 4 Sep 2017 18:11:19 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: lwa4n/2zlS5O On 08/30/2017 10:03 PM, Henning Schild wrote: > Issue: > The unpacker in dpkg is not generic since it does not unpack to > WORKDIR, so it can not be pulled into a more generic class to make it > available for other users. > As I already wrote to mail-list, WORKDIR and BUILDROOT are different folders, and there was the reason to do so. In Yocto, WORKDIR is the place which keeps the following artifacts: - Source code tree - Patches, configs - Binaries - Yocto meta information (logs and build commands) WORKDIR is usually something like: ./tmp/work/gcc-arch/package-name Due to Yocto performs cross-compilation, it is able to keep source core out of cross filesystem. But this doesn't work for Isar, which uses 'native' compilation in chroot. That's why BUILDROOT variable was introduced. So in Isar, WORKDIR stays the same and keeps logs, build commands, patches and other stuff (for example configs and scripts for buildchroot). The BUILDROOT is the path to dedicated buildchroot where to unpack sources and build them. If I build multiconfig for N targets with this patch, I will have N distributed locations with bitbake meta information for the same package. If I cleanall buildchroot, I will lose all the bitbake meta information for current distro-arch. So at the moment I don't see any benefit of this change. Also it's not clear, what do you mean by 'not generic', this unpack implementation designed for building deb packages, and at the moment no other users are expected. -- With best regards, Alexander Smirnov > Change: > Make the unpacker generic by making it unpack to WORKDIR and keep the > old semantic by overwriting this variable for the task do_unpack. Change > the comment as well, it would be wrong outside this context. > > Impact: > This patch does not change the behaviour of Isar. It addresses the issue > and prepares for another patch pulling the code to another class. > > Signed-off-by: Henning Schild > --- > meta/classes/dpkg.bbclass | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass > index 23d5e6c..81e21ce 100644 > --- a/meta/classes/dpkg.bbclass > +++ b/meta/classes/dpkg.bbclass > @@ -31,13 +31,15 @@ do_unpack[dirs] = "${BUILDROOT}" > do_unpack[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}" > S ?= "${BUILDROOT}" > > -# Unpack package and put it into working directory in buildchroot > +WORKDIR_task-unpack = "${BUILDROOT}" > + > +# Unpack package and put it into working directory > python do_unpack() { > src_uri = (d.getVar('SRC_URI', True) or "").split() > if len(src_uri) == 0: > return > > - rootdir = d.getVar('BUILDROOT', True) > + rootdir = d.getVar('WORKDIR', True) > > try: > fetcher = bb.fetch2.Fetch(src_uri, d) >