public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH 3/8] linux-info.eclass: linux-info_get_any_version, die on failure
Date: Sat, 10 Mar 2018 09:13:43 +0100	[thread overview]
Message-ID: <1520669623.1992.0.camel@gentoo.org> (raw)
In-Reply-To: <robbat2-20180310T010105-431174029Z@orbis-terrarum.net>

W dniu sob, 10.03.2018 o godzinie 01∶05 +0000, użytkownik Robin H.
Johnson napisał:
> On Thu, Mar 08, 2018 at 06:05:43PM +0100, Michał Górny wrote:
> > Make linux-info_get_any_version die if it can't determine any version
> > of the Linux kernel. This indicates a problem with the eclass code
> > (as it should not happen on Linux) and the missing KV_* variables
> > are going to cause random misbehavior and failures.
> 
> This change worries me a bit. get_running_version calls get_version in
> some cases, and there are corner cases there which could trip this up.
> 
> linux-info_get_any_version -> get_running_version -> get_version
> with get_version returning non-zero.
> 
> get_version has ALREADY returned non-zero once in that path, and we're
> potentially tweaking KERNEL_DIR/KBUILD_OUTPUT before calling it again.
> 
> Most of the breakage cases IIRC are where
> /lib/modules/${KV_FULL}/*/Makefile still exist, but point to kernel
> sources in weird places that are broken.

Yes, and this needs to be fixed one way or another. Otherwise you don't
get KV_* exported and a lot of other logic trips on unset variables.

-- 
Best regards,
Michał Górny



  reply	other threads:[~2018-03-10  8:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08 17:05 [gentoo-dev] [PATCH 0/8] linux-info.eclass: cleanup & better non-Linux support Michał Górny
2018-03-08 17:05 ` [gentoo-dev] [PATCH 1/8] linux-info.eclass: get_localversion, do not call 'ls' Michał Górny
2018-03-08 17:05 ` [gentoo-dev] [PATCH 2/8] linux-info.eclass: Replace unnecessary $? checks Michał Górny
2018-03-08 17:05 ` [gentoo-dev] [PATCH 3/8] linux-info.eclass: linux-info_get_any_version, die on failure Michał Górny
2018-03-10  1:05   ` Robin H. Johnson
2018-03-10  8:13     ` Michał Górny [this message]
2018-03-08 17:05 ` [gentoo-dev] [PATCH 4/8] linux-info.eclass: Move get_version to require_configured_kernel Michał Górny
2018-03-08 17:05 ` [gentoo-dev] [PATCH 5/8] linux-info.eclass: require_configured_kernel, improve error handling Michał Górny
2018-03-08 17:05 ` [gentoo-dev] [PATCH 6/8] linux-info.eclass: Ignore check_extra_config on non-Linux Michał Górny
2018-03-08 17:05 ` [gentoo-dev] [PATCH 7/8] linux-info.eclass: Die in most of public-ish APIs " Michał Górny
2018-03-08 17:05 ` [gentoo-dev] [PATCH 8/8] linux-info.eclass: Skip linux_config_*_exists " Michał Górny

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=1520669623.1992.0.camel@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /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