public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: "[ext] Andreas J. Reichel" <andreas.reichel.ext@siemens.com>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH v4 3/6] Remove duplicate code from apt-keyring generation
Date: Thu, 7 Mar 2019 15:46:00 +0100	[thread overview]
Message-ID: <20190307154600.6c6f2d5f@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20190307142304.14508-4-andreas.reichel.ext@siemens.com>

Am Thu, 7 Mar 2019 15:23:01 +0100
schrieb "[ext] Andreas J. Reichel" <andreas.reichel.ext@siemens.com>:

> From: Andreas Reichel <andreas.reichel.ext@siemens.com>
> 
> Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com>
> ---
>  .../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}"

I kind of feel sorry to discover other patch mistakes in reviewing your
series ....

Henning


  reply	other threads:[~2019-03-07 14:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 14:22 [PATCH v4 0/6] Fixes usage of additional apt keys and repos Andreas J. Reichel
2019-03-07 14:22 ` [PATCH v4 1/6] meta: refactored flock usage Andreas J. Reichel
2019-03-07 14:23 ` [PATCH v4 2/6] Revert "isar-bootstrap: Allow to set local keys in DISTRO_APT_KEYS" Andreas J. Reichel
2019-03-07 14:23 ` [PATCH v4 3/6] Remove duplicate code from apt-keyring generation Andreas J. Reichel
2019-03-07 14:46   ` Henning Schild [this message]
2019-03-18 10:14     ` Andreas Reichel
2019-03-07 14:23 ` [PATCH v4 4/6] Fix fetched key location in apt-keyring generator Andreas J. Reichel
2019-03-07 14:23 ` [PATCH v4 5/6] Use apt-key to generate apt-keyring Andreas J. Reichel
2019-03-07 14:51   ` Henning Schild
2019-03-18 12:57     ` Andreas Reichel
2019-03-07 14:58   ` Claudius Heine
2019-03-18 10:21     ` Andreas Reichel
2019-03-18 11:48       ` Claudius Heine
2019-03-18 11:49         ` Andreas Reichel
2019-03-18 11:53         ` Andreas Reichel
2019-03-07 14:23 ` [PATCH v4 6/6] If we use a custom keyring debootstrap may fall to https Andreas J. Reichel
2019-03-07 14:54   ` Henning Schild
2019-03-18 10:09     ` Andreas Reichel

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=20190307154600.6c6f2d5f@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=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