Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: couple questions about proper PACKAGECONFIG usage
Date: Sat, 29 Oct 2016 04:08:10 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.20.1610290343130.7545@localhost.localdomain> (raw)


  one or two curiosities(?) i've run across re: PACKAGECONFIG usage,
and as i'm writing a short tutorial page on that feature, i better
make sure i understand the nuance.

  first, AIUI, for any recipe, *any* possible flag value that can be
assigned to PACKAGECONFIG should be accompanied by the actual set of
values assigned to that ... flag(?). random example: gnutls.inc:

  PACKAGECONFIG ??= "libidn zlib"

  PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn"
  PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
  PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
  PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
  PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"

so while the default PACKAGECONFIG flag settings are "libidn" and
"zlib", that recipe clearly(?) defines five possible flags. i'm
assuming it would be an error for any possible flag value to not be
accompanied by a corresponding flag setting (not sure of the correct
terminology here, i better check that).

  next, i've noticed a very small number of recipes that define
"empty" flag strings, like this from opkg-utils_git.bb:

  PACKAGECONFIG = "python update-alternatives"
  PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
  PACKAGECONFIG[update-alternatives] = ",,,"      <----- there

that last line clearly represents a no-op in the context of
PACKAGECONFIG, and i was puzzled for a minute until it occurred that
the only way it would have value is if it were tested somewhere else
in the recipe, and sure enough, further down:

  do_install() {
        oe_runmake PREFIX=${prefix} DESTDIR=${D} install
        if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
                rm -f "${D}${bindir}/update-alternatives"
        fi
  }

so "no-op" PACKAGECONFIG flag settings like that:

meta/recipes-devtools/opkg-utils/opkg-utils_git.bb:PACKAGECONFIG[update-alternatives] = ",,,"
meta/recipes-multimedia/pulseaudio/pulseaudio.inc:PACKAGECONFIG[autospawn-for-root] = ",,,"
meta/recipes-connectivity/openssl/openssl.inc:PACKAGECONFIG[perl] = ",,,"

appear to be just a kludgy way to pass a config value to a recipe that
really just uses the PACKAGECONFIG mechanism to hand it over, without
using actual PACKAGECONFIG processing, is that a fair way to describe
that? (put another way, if any recipe defines a "no-op" like that, it
better test that setting somewhere else manually; otherwise, there's
no real point to it, yes?)

  actually, that might be it for this post ... am i missing any other
subtleties involving PACKAGECONFIG worth mentioning? another
PACAKGECONFIG-related post coming shortly, but it's more focused so
i'll post it separately.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



             reply	other threads:[~2016-10-29  8:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-29  8:08 Robert P. J. Day [this message]
2016-10-31  8:45 ` couple questions about proper PACKAGECONFIG usage Jussi Kukkonen
2016-10-31 10:26 ` Burton, Ross
2016-10-31 10:40   ` Robert P. J. Day

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=alpine.LFD.2.20.1610290343130.7545@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox