diff options
| author | Mark Hatle <mark.hatle@windriver.com> | 2012-05-15 18:35:15 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 12:04:42 +0100 |
| commit | 18b6e5ff59b70a659697c0791c177921b71d731c (patch) | |
| tree | fd646739616d2dd5a20adc11cf63b5316bcd14a4 | |
| parent | 4ca029b30fd24d02f235da95c6646c115f71130b (diff) | |
| download | poky-18b6e5ff59b70a659697c0791c177921b71d731c.tar.gz | |
psplash: use new update-alternatives
(From OE-Core rev: dc68ad07676833a2b8dba9540f35c0b70bf2fdfe)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/psplash/psplash_git.bb | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb index bd405f965d..0d88a60d92 100644 --- a/meta/recipes-core/psplash/psplash_git.bb +++ b/meta/recipes-core/psplash/psplash_git.bb | |||
| @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://psplash.h;md5=a87c39812c1e37f3451567cc29a29c8f" | |||
| 7 | 7 | ||
| 8 | SRCREV = "e05374aae945bcfc6d962ed0d7b2774b77987e1d" | 8 | SRCREV = "e05374aae945bcfc6d962ed0d7b2774b77987e1d" |
| 9 | PV = "0.1+git${SRCPV}" | 9 | PV = "0.1+git${SRCPV}" |
| 10 | PR = "r1" | 10 | PR = "r2" |
| 11 | 11 | ||
| 12 | SRC_URI = "git://git.yoctoproject.org/${BPN};protocol=git \ | 12 | SRC_URI = "git://git.yoctoproject.org/${BPN};protocol=git \ |
| 13 | file://psplash-init \ | 13 | file://psplash-init \ |
| @@ -52,12 +52,8 @@ python __anonymous() { | |||
| 52 | d.prependVar("PACKAGES", "%s " % (" ".join(pkgs))) | 52 | d.prependVar("PACKAGES", "%s " % (" ".join(pkgs))) |
| 53 | for p in pkgs: | 53 | for p in pkgs: |
| 54 | d.setVar("FILES_%s" % p, "${bindir}/%s" % p) | 54 | d.setVar("FILES_%s" % p, "${bindir}/%s" % p) |
| 55 | d.setVar("ALTERNATIVE_PATH", "${bindir}/%s" % p) | 55 | d.setVar("ALTERNATIVE_%s" % p, 'psplash') |
| 56 | d.setVar("ALTERNATIVE_PRIORITY", "100") | 56 | d.setVarFlag("ALTERNATIVE_TARGET_%s" % p, 'psplash', '${bindir}/%s' % p) |
| 57 | postinst = d.getVar("psplash_alternatives_postinst", True) | ||
| 58 | d.setVar('pkg_postinst_%s' % p, postinst) | ||
| 59 | postrm = d.getVar("psplash_alternatives_postrm", True) | ||
| 60 | d.setVar('pkg_postrm_%s' % p, postrm) | ||
| 61 | d.appendVar("RDEPENDS_%s" % p, " ${PN}") | 57 | d.appendVar("RDEPENDS_%s" % p, " ${PN}") |
| 62 | if p == "psplash-default": | 58 | if p == "psplash-default": |
| 63 | d.appendVar("RRECOMMENDS_${PN}", " %s" % p) | 59 | d.appendVar("RRECOMMENDS_${PN}", " %s" % p) |
| @@ -65,7 +61,10 @@ python __anonymous() { | |||
| 65 | 61 | ||
| 66 | S = "${WORKDIR}/git" | 62 | S = "${WORKDIR}/git" |
| 67 | 63 | ||
| 68 | inherit autotools pkgconfig update-rc.d | 64 | inherit autotools pkgconfig update-rc.d update-alternatives |
| 65 | |||
| 66 | ALTERNATIVE_PRIORITY = "100" | ||
| 67 | ALTERNATIVE_LINK_NAME[psplash] = "${bindir}/psplash" | ||
| 69 | 68 | ||
| 70 | python do_compile () { | 69 | python do_compile () { |
| 71 | import shutil, commands | 70 | import shutil, commands |
| @@ -100,14 +99,6 @@ do_install_append() { | |||
| 100 | rm -f ${D}${bindir}/psplash | 99 | rm -f ${D}${bindir}/psplash |
| 101 | } | 100 | } |
| 102 | 101 | ||
| 103 | psplash_alternatives_postinst() { | ||
| 104 | update-alternatives --install ${bindir}/psplash psplash ${ALTERNATIVE_PATH} ${ALTERNATIVE_PRIORITY} | ||
| 105 | } | ||
| 106 | |||
| 107 | psplash_alternatives_postrm() { | ||
| 108 | update-alternatives --remove psplash ${ALTERNATIVE_PATH} | ||
| 109 | } | ||
| 110 | |||
| 111 | FILES_${PN} += "/mnt/.psplash" | 102 | FILES_${PN} += "/mnt/.psplash" |
| 112 | 103 | ||
| 113 | INITSCRIPT_NAME = "psplash.sh" | 104 | INITSCRIPT_NAME = "psplash.sh" |
