Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 03/22 v2] update-alternatives.bbclass: Add missing runtime dependency
Date: Tue, 4 Dec 2012 20:33:51 -0600	[thread overview]
Message-ID: <1354674831-24287-1-git-send-email-mark.hatle@windriver.com> (raw)

When using update-alternatives, there should be a runtime dependency on
${VIRTUAL-RUNTIME_update-alternatives}.  Without this, it's possible to
get into a situation where the package is not installable.

(If VIRTUAL-RUNTIME_update-alternatives is not defined, no requirement
is added.)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/update-alternatives.bbclass |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/meta/classes/update-alternatives.bbclass b/meta/classes/update-alternatives.bbclass
index 4e1ff27..96fd1e8 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -304,6 +304,14 @@ python populate_packages_prepend () {
             alt_remove_links += '\tupdate-alternatives --remove  %s %s\n' % (alt_name, alt_target)
 
         if alt_setup_links:
+            # RDEPENDS setup
+            provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives', True)
+            if provider:
+                bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
+                rdepends = d.getVar('RDEPENDS_%s' % pkg, True) or ""
+                rdepends += ' ' + d.getVar('MLPREFIX') + provider
+                d.setVar("RDEPENDS_%s" % pkg, rdepends)
+
             bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg)
             bb.note('%s' % alt_setup_links)
             postinst = (d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)) or '#!/bin/sh\n'
-- 
1.7.3.4




             reply	other threads:[~2012-12-05  2:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-05  2:33 Mark Hatle [this message]
2012-12-06 12:12 ` [PATCH 03/22 v2] update-alternatives.bbclass: Add missing runtime dependency Richard Purdie
2012-12-06 17:10   ` Mark Hatle

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=1354674831-24287-1-git-send-email-mark.hatle@windriver.com \
    --to=mark.hatle@windriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox