From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6665315485307895808 X-Received: by 2002:a7b:cc14:: with SMTP id f20mr721467wmh.5.1552904199935; Mon, 18 Mar 2019 03:16:39 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:6692:: with SMTP id l18ls1248974wru.10.gmail; Mon, 18 Mar 2019 03:16:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxktHlA8DJmiYwxES0mwPMQuTWepYrUW3Yor+0fvy25R9Vc4Xhnt/9dpuGcU2WCqM6ZZG83 X-Received: by 2002:adf:fb91:: with SMTP id a17mr712749wrr.1.1552904199525; Mon, 18 Mar 2019 03:16:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552904199; cv=none; d=google.com; s=arc-20160816; b=AiN6mry8q5BZVwJtpVw2Dv7VS3VPGa2k7LZMviXKhDnoLvP4tYXYgeZeeySr1nC8ts A1LQea1K72rngBc3BZLeHyKlD1DjGwl0JCGpa2T4i9oUboC5zw3eGZueMhztljxcZb5v HW4MNgUfURw/4d6w08kUbjZpaWMlD+OOfJT4ScnZmvL4FEOGIbFjDX4mqRW560mGtd85 GLxVXh3jzlRuHCpoz/ewLyAFsLfrrpIILMM+ch0re7xIkWYqUZV+sXvqwGvZuou4uami 0nFt8Uqm6Vwi4m0VGbJIOtaVLwGjHHzrqi8BTyNqznyGU3siLRPmJ+PaNx+eeNsh3BTR o1lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:content-description :mime-version:references:message-id:subject:cc:to:from:date; bh=RyjhYKcW0EebM3PJ8udOeerIcU1ECodBgvgQpKC69YI=; b=HAkhb+tGbNwYy0sw8Ly2tx6cKqktG/rKGRjla7khtwtOGuoTKNSIaxP4yvn/kfhP4T aO7BCr9ObKfBzqaJLNT24RV92e97U7xr7xJW6ETFcC2TPWdbmDT9AnNQRoLzOj+twwHE w8jHFx0XdgBreIOd5fLCf9P972QqP3cktgBIT0VyRWZ8zicNQSgIEt4SolVOd2iP2ZJ3 rnQ9Aj9qxCCUqHJWydPUVCB2GjnZu7qmc3XLFlTtTjEOGN1NbfFuIHzhIeDJijWM+DXF PaeADuNP4rRodoTva5/ZCUGC9Ifp1fg3x/bAxp3BXy0J7szBDIgPAEETdOKCH+4BrJHX NaRA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id y192si279014wmd.1.2019.03.18.03.16.39 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Mar 2019 03:16:39 -0700 (PDT) Received-SPF: pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id x2IAGddB012764 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 18 Mar 2019 11:16:39 +0100 Received: from iiotirae (golem.ppmd.siemens.net [139.25.69.17]) by mail2.sbs.de (8.15.2/8.15.2) with SMTP id x2IAGcm5026240; Mon, 18 Mar 2019 11:16:38 +0100 Date: Mon, 18 Mar 2019 11:14:44 +0100 From: Andreas Reichel To: Henning Schild Cc: isar-users@googlegroups.com Subject: Re: [PATCH v4 3/6] Remove duplicate code from apt-keyring generation Message-ID: <20190318101444.GB9919@iiotirae> References: <20190307142304.14508-1-andreas.reichel.ext@siemens.com> <20190307142304.14508-4-andreas.reichel.ext@siemens.com> <20190307154600.6c6f2d5f@md1za8fc.ad001.siemens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Description: message Content-Disposition: inline In-Reply-To: <20190307154600.6c6f2d5f@md1za8fc.ad001.siemens.net> User-Agent: Mutt/1.11.4 (2019-03-13) X-TUID: O6PNLSHkag53 On Thu, Mar 07, 2019 at 03:46:00PM +0100, Henning Schild wrote: > Am Thu, 7 Mar 2019 15:23:01 +0100 > schrieb "[ext] Andreas J. Reichel" : > > > From: Andreas Reichel > > > > Signed-off-by: Andreas Reichel > > --- > > .../isar-bootstrap/isar-bootstrap.inc | 24 > > +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) > > > > diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > > b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index > > 9506741..2d6b761 100644 --- > > a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ > > b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -35,23 > > +35,21 @@ inherit base-apt-helper python () { > > from urllib.parse import urlparse > > distro_apt_keys = d.getVar("DISTRO_APT_KEYS", False) > > - wd = d.getVar("WORKDIR", True) > > + aptkeys = [] > > + > > if distro_apt_keys: > > - d.setVar("DEBOOTSTRAP_KEYRING", "--keyring ${APTKEYRING}") > > - for key in distro_apt_keys.split(): > > - url = urlparse(key) > > - filename = os.path.basename(url.path) > > - d.appendVar("SRC_URI", " %s" % key) > > - d.appendVar("APTKEYFILES", " %s" % filename) > > + aptkeys += distro_apt_keys.split() > > if bb.utils.to_boolean(d.getVar('ISAR_USE_CACHED_BASE_REPO')): > > own_pub_key = d.getVar("BASE_REPO_KEY", False) > > if own_pub_key: > > - d.setVar("DEBOOTSTRAP_KEYRING", "--keyring > > ${APTKEYRING}") > > - for key in own_pub_key.split(): > > - url = urlparse(key) > > - filename = ''.join([wd, url.path]) > > - d.appendVar("SRC_URI", " %s" % key) > > - d.appendVar("APTKEYFILES", " %s" % filename) > > + aptkeys += own_pub_key.split() > > + > > + d.setVar("DEBOOTSTRAP_KEYRING", "--keyring ${APTKEYRING}") > > + for key in aptkeys: > > + url = urlparse(key) > > + filename = os.path.basename(url.path) > > + d.appendVar("SRC_URI", " %s" % key) > > + d.appendVar("APTKEYFILES", " %s" % filename) > > } > > > > def aggregate_files(d, file_list, file_out): > > Now i get where the duplication came from in the first place. > > And as said in another thread, we need this here in a central location: > DISTRO_APT_KEYS_append = "${BASE_REPO_KEY}" > Sorry I don't get this yet. Where should BASE_REPO_KEY come from? The fetcher's destination has to be retrieved before, that's what is done in the function above and that's why we don't use _append but python syntax. Andreas > I kind of feel sorry to discover other patch mistakes in reviewing your > series .... > > Henning > -- Andreas Reichel Dipl.-Phys. (Univ.) Software Consultant Andreas.Reichel@tngtech.com, +49-174-3180074 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterfoehring Geschaeftsfuehrer: Henrik Klagges, Dr. Robert Dahlke, Gerhard Mueller Sitz: Unterfoehring * Amtsgericht Muenchen * HRB 135082