All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/4] support/scripts/pkg-stats: import cve module only when needed
Date: Tue, 19 Jan 2021 15:24:46 +0100	[thread overview]
Message-ID: <87y2gpc8cx.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20210117153246.5e84374d@windsurf.home> (Thomas Petazzoni's message of "Sun, 17 Jan 2021 15:32:46 +0100")

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > On Thu, 19 Nov 2020 15:53:51 +0100
 > Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

 >> The cve module needs ijson, which may not be installed. Since cve
 >> matching is only enabled when --nvd-path is passed, it is a bit silly
 >> to error out about ijson being missing if it's not used.
 >> 
 >> So instead of unconditionally importing the cve module, only do it
 >> conditionally.
 >> 
 >> However, instead of doing it right at the point where it is used, we
 >> do it at the beginning of the main() function. Indeed, if the cve
 >> module is needed but cannot be imported, we want to error out
 >> immediately rather than doing a whole bunch of things, and failing on
 >> the user later on in the middle of the pkg-stats execution.
 >> 
 >> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 >> ---
 >> support/scripts/pkg-stats | 7 ++++++-
 >> 1 file changed, 6 insertions(+), 1 deletion(-)

 > Series applied.

Committed to 2020.02.x and 2020.11.x, thanks.

-- 
Bye, Peter Korsgaard

      reply	other threads:[~2021-01-19 14:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 14:53 [Buildroot] [PATCH 1/4] support/scripts/pkg-stats: import cve module only when needed Thomas Petazzoni
2020-11-19 14:53 ` [Buildroot] [PATCH 2/4] support/scripts/pkg-stats: fix Python 3.8 deprecation warning Thomas Petazzoni
2020-11-19 14:53 ` [Buildroot] [PATCH 3/4] utils/get-developers: use Developers.hasfile() where appropriate Thomas Petazzoni
2020-11-20 10:03   ` Heiko Thiery
2020-11-19 14:53 ` [Buildroot] [PATCH 4/4] utils/getdeveloperlib.py: use relative paths for files Thomas Petazzoni
2020-11-20 10:03   ` Heiko Thiery
2020-11-20 14:14     ` Thomas Petazzoni
2020-11-20 14:26       ` Heiko Thiery
2020-11-20 10:02 ` [Buildroot] [PATCH 1/4] support/scripts/pkg-stats: import cve module only when needed Heiko Thiery
2021-01-17 14:32 ` Thomas Petazzoni
2021-01-19 14:24   ` Peter Korsgaard [this message]

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=87y2gpc8cx.fsf@dell.be.48ers.dk \
    --to=peter@korsgaard.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.