public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Andreas J. Reichel" <andreas.reichel.ext@siemens.com>
To: isar-users@googlegroups.com
Cc: Andreas Reichel <andreas.reichel.ext@siemens.com>
Subject: [PATCH v7 3/5] Fix fetched key location in apt-keyring generator
Date: Tue, 19 Mar 2019 14:35:21 +0100	[thread overview]
Message-ID: <20190319133523.32456-4-andreas.reichel.ext@siemens.com> (raw)
In-Reply-To: <20190319133523.32456-1-andreas.reichel.ext@siemens.com>

From: Andreas Reichel <andreas.reichel.ext@siemens.com>

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 <andreas.reichel.ext@siemens.com>
---
 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


  parent reply	other threads:[~2019-03-19 13:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19 13:35 [PATCH v7 0/5] Fix usage of additional apt keys and repos Andreas J. Reichel
2019-03-19 13:35 ` [PATCH v7 1/5] Revert "isar-bootstrap: Allow to set local keys in DISTRO_APT_KEYS" Andreas J. Reichel
2019-03-19 13:35 ` [PATCH v7 2/5] Remove duplicate code from apt-keyring generation Andreas J. Reichel
2019-03-19 13:35 ` Andreas J. Reichel [this message]
2019-03-19 13:35 ` [PATCH v7 4/5] Use apt-key to generate apt-keyring Andreas J. Reichel
2019-03-19 13:35 ` [PATCH v7 5/5] If we use a custom keyring debootstrap may fall to https Andreas J. Reichel
2019-03-19 13:36 ` [PATCH v7 0/5] Fix usage of additional apt keys and repos Andreas Reichel
2019-03-19 14:26   ` Maxim Yu. Osipov
2019-03-19 15:39     ` Andreas Reichel
2019-03-19 21:58 ` Maxim Yu. Osipov
2019-03-20  6:26   ` Jan Kiszka
2019-03-20  6:48     ` Maxim Yu. Osipov
2019-03-20  7:12       ` Jan Kiszka
2019-03-20  7:55         ` Maxim Yu. Osipov
2019-03-20  8:22           ` Jan Kiszka
2019-03-20  8:53             ` Maxim Yu. Osipov
2019-03-20 10:25           ` Andreas Reichel
2019-03-20 10:32             ` Maxim Yu. Osipov
2019-03-20 11:50               ` Andreas Reichel
2019-03-20 10:37             ` Jan Kiszka
2019-03-20 11:05               ` Maxim Yu. Osipov
2019-03-20 12:39                 ` Jan Kiszka
2019-03-20  7:16     ` Claudius Heine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190319133523.32456-4-andreas.reichel.ext@siemens.com \
    --to=andreas.reichel.ext@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox