From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6449247988281769984 X-Received: by 10.25.25.83 with SMTP id 80mr221637lfz.21.1501761246235; Thu, 03 Aug 2017 04:54:06 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.69.194 with SMTP id s185ls95840lja.13.gmail; Thu, 03 Aug 2017 04:54:05 -0700 (PDT) X-Received: by 10.25.204.70 with SMTP id c67mr264824lfg.0.1501761245982; Thu, 03 Aug 2017 04:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501761245; cv=none; d=google.com; s=arc-20160816; b=Oulm8u4IkuZGBB/uqTx+zSMB1OqrH40Kzo8K439FhabWR0Dgmrj/q6kpOwz+WnG6X/ tvA4CZV7YZ/SRc5MlsMac/vfzgw4+MriUkHz4RRaOMWeGxD2Vvqwwu5qre+H5r0ry/NS aB7BW9KC/oEBA0F0D2NXCmgE5HJLdc4hzY5uJZFDw8zPizYoZiLRpCoEsV+5kJEVUPl8 ufmKKFvpWnFxE886VRk0D5pvYIW5QIen2Gr+flhCFuRJzCOts7jOQEe+dtQLNG4oqb/i y1wZ4OWe/fr3a3ivqwlVluuM526F5T8f6bVpEVo5jtTaxWxXAjvNodDlgEzlgowHFvGa CS8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=OLU4HoYx35ajzPnUaiVDZDvAtG0gK8/wCrNWPKdc0To=; b=icd5/JLRkMqIT5Fk2YyLO/I929BG0J1CxbIi3gKXSGJq1TZL9dMgKF5DO7DPjLZzRO AsM4o05D1O8TuQubqy0TD8ZA7aivrKEgg6fkiSPFdpW7C7Fg1U/U/ckdXoNlJe55nLNp ztRRT2l6CDr3JiYmNQr3+YVC3bdkrWBXywzGpQN7f7RFy2My7sVAURcmQJZTst3GGatc NdNMEAeutdkDKPzxadzcijjPPjA4hshX2BMyKyCBBRgv7PTQDPMYXqcVzMS95AUdIQYp v9opl0/rz7JCrbpkLa62MuXWx+G8TtojvKUt3jSsuejO+mFnS+yAq1MBozXKWUib8VfB EyZw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id m89si796374wmi.0.2017.08.03.04.54.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 04:54:05 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.14 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@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 v73Bs4tj031634 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 3 Aug 2017 13:54:04 +0200 Received: from md1em3qc.ww002.siemens.net ([139.25.68.40]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v73Bs3At032676; Thu, 3 Aug 2017 13:54:04 +0200 From: Henning Schild To: isar-users@googlegroups.com Cc: Alexander Smirnov , Henning Schild Subject: [PATCH 0-10 of 16 v2 6/8] classes: move fetch and unpack into isar-base Date: Thu, 3 Aug 2017 13:55:55 +0200 Message-Id: <7c03d914f33ef0563cb7af2951f56e8cd5fd20bc.1501760818.git.henning.schild@siemens.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: References: In-Reply-To: References: X-TUID: 22y7BQib31Bz That way we can use the fetchers in images and future classes/recipes without having to "inherit dpdk". Signed-off-by: Henning Schild --- meta/classes/dpkg.bbclass | 38 ++------------------------------------ meta/classes/isar-base.bbclass | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/meta/classes/dpkg.bbclass b/meta/classes/dpkg.bbclass index 3d7aafb..e334dda 100644 --- a/meta/classes/dpkg.bbclass +++ b/meta/classes/dpkg.bbclass @@ -11,44 +11,10 @@ do_unpack[deptask] = "do_build" # recipe name as identifier PP = "/home/builder/${PN}" BUILDROOT = "${BUILDCHROOT_DIR}/${PP}" - -do_fetch[dirs] = "${DL_DIR}" - -# Fetch package from the source link -python do_fetch() { - src_uri = (d.getVar('SRC_URI', True) or "").split() - if len(src_uri) == 0: - return - - try: - fetcher = bb.fetch2.Fetch(src_uri, d) - fetcher.download() - except bb.fetch2.BBFetchException as e: - raise bb.build.FuncFailed(e) -} - -addtask fetch before do_build - -do_unpack[dirs] = "${BUILDROOT}" -do_unpack[stamp-extra-info] = "${DISTRO}" S ?= "${BUILDROOT}" -# Unpack package and put it into working directory in buildchroot -python do_unpack() { - src_uri = (d.getVar('SRC_URI', True) or "").split() - if len(src_uri) == 0: - return - - rootdir = d.getVar('BUILDROOT', True) - - try: - fetcher = bb.fetch2.Fetch(src_uri, d) - fetcher.unpack(rootdir) - except bb.fetch2.BBFetchException as e: - raise bb.build.FuncFailed(e) -} - -addtask unpack after do_fetch before do_build +# make the unpacker extract to BUILDROOT +WORKDIR_task-unpack = "${BUILDROOT}" do_build[stamp-extra-info] = "${DISTRO}" diff --git a/meta/classes/isar-base.bbclass b/meta/classes/isar-base.bbclass index d860937..ec4272f 100644 --- a/meta/classes/isar-base.bbclass +++ b/meta/classes/isar-base.bbclass @@ -20,3 +20,36 @@ # OTHER DEALINGS IN THE SOFTWARE. do_build[nostamp] = "0" + +# Fetch package from the source link +python do_fetch() { + src_uri = (d.getVar('SRC_URI', True) or "").split() + if len(src_uri) == 0: + return + + try: + fetcher = bb.fetch2.Fetch(src_uri, d) + fetcher.download() + except bb.fetch2.BBFetchException as e: + raise bb.build.FuncFailed(e) +} + +addtask fetch before do_build +do_fetch[dirs] = "${DL_DIR}" + +# Unpack package and put it into working directory in buildchroot +python do_unpack() { + src_uri = (d.getVar('SRC_URI', True) or "").split() + if len(src_uri) == 0: + return + + try: + fetcher = bb.fetch2.Fetch(src_uri, d) + fetcher.unpack(d.getVar('WORKDIR', True)) + except bb.fetch2.BBFetchException as e: + raise bb.build.FuncFailed(e) +} + +addtask unpack after do_fetch before do_build +do_unpack[dirs] = "${WORKDIR}" +do_unpack[stamp-extra-info] = "${DISTRO}" -- 2.13.0