All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: openembedded-core@lists.openembedded.org
Cc: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
Subject: [PATCH 0/1] static IDs bugs and usability
Date: Thu, 28 Jul 2016 11:42:51 +0200	[thread overview]
Message-ID: <cover.1469697989.git.patrick.ohly@intel.com> (raw)

In Ostro OS we just started to use useradd-staticids.bbclass. Dynamic
IDs are an error (USERADD_ERROR_DYNAMIC = "error") by default because
warnings probably wouldn't be noticed. I was a bit reluctant to make
this change because Ostro OS is supposed to be customizable, and that
becomes harder when developers also have to define IDs.

But we didn't have a choice because after updating to recent OE-core,
our dynamically assigned IDs started to change randomly between
builds, which (as we learned only because of that change) broke the
swupd update mechanism. Personally I suspect that Python3's
randomization feature is responsible for not getting deterministic
results anymore, but I haven't investigated further.

useradd-staticids.bbclass has a bug which impacts developers when they
edit the table files to fix a warning or error raised by the class:
the cached version of the affected recipe continues to be used and thus
editing the files has no effect. Patch fixing that follows.

There's also a caveat associated with how USERADD_ERROR_DYNAMIC = "error"
is implemented: it marks recipes as "skipped" with an error messages
from useradd-staticids.bbclass. This is not particularly developer-friendly.

For example, when the skipped recipe is deep down in the dependency
chain, then building will fail with rather difficult to understand
"nothing provides..." messages. It does mention eventually that a
recipe was skipped with the right error, so the information is at
least there.

However, it's also possible that a recipe exists in two versions, and
only the one normally picked as default gets skipped. In that case,
the remaining version will get build, i.e. useradd-staticids.bbclass
has the very undesirable effect of silently building something else
than expected instead of aborting the build because of the error.

I've not seen that in practice, though, so I don't know how big of a
problem it is.

The following changes since commit b32d430c3c7dccf3a8d06ab492d648893a05950f:

  dpkg: use snapshot.debian.org for SRC_URI (2016-07-26 08:56:08 +0100)

are available in the git repository at:

  git://github.com/pohly/openembedded-core static-ids
  https://github.com/pohly/openembedded-core/tree/static-ids

Patrick Ohly (1):
  useradd-staticids.bbclass: trigger reparsing when table files change

 meta/classes/useradd-staticids.bbclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

-- 
2.1.4



             reply	other threads:[~2016-07-28  9:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28  9:42 Patrick Ohly [this message]
2016-07-28  9:43 ` [PATCH 1/1] useradd-staticids.bbclass: trigger reparsing when table files change Patrick Ohly

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=cover.1469697989.git.patrick.ohly@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=dmitry.rozhkov@intel.com \
    --cc=openembedded-core@lists.openembedded.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 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.