From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6669723628337102848 X-Received: by 2002:adf:fb91:: with SMTP id a17mr1111213wrr.1.1552991431302; Tue, 19 Mar 2019 03:30:31 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:7fd1:: with SMTP id a200ls188306wmd.7.gmail; Tue, 19 Mar 2019 03:30:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqQGwvgncNyiUJPu+Hj/ojKFS4ZvRTxE6zvensJncPhCWPdqFryoUc2gcXp3q8228MhPCY X-Received: by 2002:a7b:c18d:: with SMTP id y13mr274418wmi.2.1552991430673; Tue, 19 Mar 2019 03:30:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552991430; cv=none; d=google.com; s=arc-20160816; b=0Yoz/5IbeY24otXdrNk+v+12bekY0AvKW7AZRroNU2nJkOEPTL3/aOCOLAaVpI1rqz Xkd15Z/8EXEOXDABevAUWB0ELrTt19CAL9+50Mlfxd9bxoOF83MiecAbQWpkTCj3VYMl 4O877Q2KgDy7bChif2iYvfVeLkxuycEdmB1c6ZL4qzhSZR/Rm0YTtj6exoUOMPsyR37v vc8iAKAfgrDpzt0Y6Hj807JDBYORY393TGl91SGKhNGG6hgRBxqIOyGvfOllOIE5Biiz DpjvlDPs0CPUVcPzFBD8K3DSM/RzZdvm8kCtJBnYD5HaAy9+P5m4hieKmyaiLwZRjvvF J4Qg== 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:date:subject:cc:to:from; bh=/Nr7P0PUtK10dQFAulHxYGJAV3aAOmSBl51WArYtSLA=; b=zgE8NS0kAEyzN21OnmIqAKnPmTb/3vYG7N3b2aImaDLMNnRQy6in0epsuAkc84kTvd Pb8HDi+uQ6Lz8eMn1kikVcn00JSQ4YG05g5VZVokiEVkvvqwKYMIiNStIeYO0TLGo1Hh 4XMj3VunGF/1ockkySxhQFXWQRpAdOFUJ2WXm0dwYbm4qdMXAUtEv8gh5jnXU2UP6kdI JihxuENGS1gulukX/eXfQlvpvRyYhuAVbTFSpt4sdOjYljoO3n32uMUy68QZeKcuW+Yl 7RpwtVzT9DTItb1+pZGr7yTqP6kozc3CoSuFdhfIlIE1jk5F3/yZhNozH2udfpQJYm4V ZiRg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id y192si75120wmd.1.2019.03.19.03.30.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Mar 2019 03:30:30 -0700 (PDT) Received-SPF: pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id x2JAUUxe028337 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Mar 2019 11:30:30 +0100 Received: from localhost.localdomain (golem.ppmd.siemens.net [139.25.69.17]) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id x2JAUTC4003355; Tue, 19 Mar 2019 11:30:29 +0100 From: "Andreas J. Reichel" To: isar-users@googlegroups.com Cc: Andreas Reichel Subject: [PATCH v6 3/5] Fix fetched key location in apt-keyring generator Date: Tue, 19 Mar 2019 11:28:22 +0100 Message-Id: <20190319102824.14851-4-andreas.reichel.ext@siemens.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190319102824.14851-1-andreas.reichel.ext@siemens.com> References: <20190319102824.14851-1-andreas.reichel.ext@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: mVzjm5+fDPj0 From: Andreas Reichel Use bb.fetch2.Fetch to retrieve the final filename after it is downloaded. This way we don't have to guess (wrongly), and also additional SRC_URI parameters like subdir or filename are usable now. Signed-off-by: Andreas Reichel --- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index 4526aa7..1f8f178 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -33,7 +33,6 @@ DISTRO_APT_PREMIRRORS ?= "${@ "http://ftp\.(\S+\.)?debian.org file:///${REPO_BA inherit base-apt-helper python () { - from urllib.parse import urlparse distro_apt_keys = d.getVar("DISTRO_APT_KEYS", False) aptkeys = [] @@ -46,9 +45,9 @@ python () { 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) + fetcher = bb.fetch2.Fetch([key], d) + filename = fetcher.localpath(key) d.appendVar("APTKEYFILES", " %s" % filename) } -- 2.21.0