From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6652310799425470464 X-Received: by 2002:a17:906:c2d4:: with SMTP id ch20mr2065260ejb.16.1548944354172; Thu, 31 Jan 2019 06:19:14 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:1a12:: with SMTP id i18ls1184649ejf.7.gmail; Thu, 31 Jan 2019 06:19:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IZfve8CB8Tv4LjtYyJ0SYk1r7hfFnrEWhyC3LfppqwVlNvreA7nI0NKhBdFIAxkKPKK08SV X-Received: by 2002:a17:906:6889:: with SMTP id n9mr246902ejr.4.1548944353855; Thu, 31 Jan 2019 06:19:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548944353; cv=none; d=google.com; s=arc-20160816; b=u+gpkdpk2NDnupfy3UIsDN/oSO70ijyWKXCCedoY3xpgtFHpOw7yKWpRdfO+arvYwH TN1ugdTdgpXAA481GVtfK/6dI4JGI8KFXk6IAYufOfL714Hzs9NrvWXM7b45ZPvXLSVe mAKI4W6fgIz1C3haGbRsay935JhCWBcVXjH0xen8lhrzi9wnN/TH1xSuIXoj4jPSCuy0 1g8LsvzTW2wW5olf1EFIOlNCRDnuP4sQ7vOCPvK8Klu7v74JPAiT4dEkU/kZdq/Z0ibk TkQBauoGFUN6zPFFwtbT5zazpZeOqMNiI3nwGKwP+OxBgxOniMEcnWKMs+sx29riUnKi qIyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=mr59zFhjKIO3q/aF5fWUOp6GCmQuUgp3hxTQf2MFta8=; b=qB4e3cIgaIR52397ztrcb8NiSHqzFgeP6r/CCdUmN8HvndvGqofaD9As8yPUbLmk7u Qu6yqkNND/nRO4gsxpxnZZRlFweqNOwmvZXtS7p+cX8mpv5Q39JKLQpIF/d/7iqVXTdY NYb1hBX+EC+zG6epwVGHEnxtSCcc8LHy6UKswpOY2ViPMMNKQvInvl1Xfcnge24JPixD j9KZF7dZub2bq6RRjtqABdMIlanuC6d3x8lTonU8uOzHCh24hIs0R8wh7iRRFz1XF2A1 2dJmI8x/kYn9i9s9D4v/dRAMdhTsGAvFsfmja8RU595MXcoKeTqoialrKMnekBkTYPXy d+dQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id k25si281885edd.1.2019.01.31.06.19.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 06:19:13 -0800 (PST) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id x0VEJDnh003941 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Jan 2019 15:19:13 +0100 Received: from md1za8fc.ad001.siemens.net ([139.25.69.211]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x0VEJDRe003553; Thu, 31 Jan 2019 15:19:13 +0100 Date: Thu, 31 Jan 2019 15:19:12 +0100 From: Henning Schild To: Cc: Jan Kiszka , Claudius Heine Subject: Re: [PATCH] meta: change apt source fetcher to hook into SRC_URI Message-ID: <20190131151912.39052db3@md1za8fc.ad001.siemens.net> In-Reply-To: <20190130152321.26792-1-henning.schild@siemens.com> References: <20190130152321.26792-1-henning.schild@siemens.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: QQS4avGmHWI9 This is now in v3 of the apt-get source series. Henning On Wed, 30 Jan 2019 16:23:21 +0100 Henning Schild wrote: > From: Henning Schild > > This patch allows users to use "debian://" URIs in SRC_URI and cleans > up the interface for recipes. > > Signed-off-by: Henning Schild > --- > meta-isar/recipes-app/hello/hello.inc | 2 +- > meta/classes/base.bbclass | 20 ++++++++++++++++++++ > 2 files changed, 21 insertions(+), 1 deletion(-) > > diff --git a/meta-isar/recipes-app/hello/hello.inc > b/meta-isar/recipes-app/hello/hello.inc index 3976b15..ceab7a2 100644 > --- a/meta-isar/recipes-app/hello/hello.inc > +++ b/meta-isar/recipes-app/hello/hello.inc > @@ -3,7 +3,7 @@ > inherit dpkg > > # this will fetch and unpack the sources from upstream debian > -SRC_APT = "${PN}" > +SRC_URI = "debian://${PN}=${PV}" > > MAINTAINER = "Your name here " > CHANGELOG_V = "${PV}-99+isar" > diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass > index d4082de..9885fdc 100644 > --- a/meta/classes/base.bbclass > +++ b/meta/classes/base.bbclass > @@ -96,6 +96,26 @@ python() { > + ws + "root_cleandirs\n") > } > > +# filter out all "debian://" URIs out of SRC_URI and stick them into > SRC_APT +# this makes for a nicer user interface > +python() { > + src_uri = (d.getVar('SRC_URI', True) or "").split() > + if len(src_uri) == 0: > + return > + > + prefix = "debian://" > + new_src_uri = [] > + deb_src_uri = [] > + for u in src_uri: > + if u.startswith(prefix): > + deb_src_uri.append(u[len(prefix):]) > + else: > + new_src_uri.append(u) > + > + d.setVar('SRC_URI', ' '.join(new_src_uri)) > + d.prependVar('SRC_APT', ' '.join(deb_src_uri)) > +} > + > do_fetch[dirs] = "${DL_DIR}" > do_fetch[file-checksums] = "${@bb.fetch.get_checksum_file_list(d)}" > do_fetch[vardeps] += "SRCREV"