diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-04-16 11:15:35 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-26 10:05:08 +0100 |
commit | 469a4b9d8ad5d6c6a7572bdbbdbbaea4a11c71e4 (patch) | |
tree | e50dc40b0dc40338b13da4c997cebaf2027934d9 /meta/recipes-extended/gzip/gzip.inc | |
parent | 46ffeed9183ec12ff20dbb5c5b46ea35555835d5 (diff) | |
download | ast2050-yocto-poky-469a4b9d8ad5d6c6a7572bdbbdbbaea4a11c71e4.zip ast2050-yocto-poky-469a4b9d8ad5d6c6a7572bdbbdbbaea4a11c71e4.tar.gz |
gzip: Use update-alternatives class
Switch to using the update-alternatives class. Need this for
consistency and to ensure the necessary package provides get set.
(From OE-Core rev: e0626a0270fb0f4ff128e761c13d44162723434c)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/gzip/gzip.inc')
-rw-r--r-- | meta/recipes-extended/gzip/gzip.inc | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/meta/recipes-extended/gzip/gzip.inc b/meta/recipes-extended/gzip/gzip.inc index a449449..1d608a6 100644 --- a/meta/recipes-extended/gzip/gzip.inc +++ b/meta/recipes-extended/gzip/gzip.inc @@ -12,29 +12,15 @@ SRC_URI = "${GNU_MIRROR}/gzip/${BP}.tar.gz" inherit autotools -do_install () { - autotools_do_install - if [ "${PN}" = "${BPN}" ] ; then - # Rename and move files into /bin (FHS), which is typical place for gzip - install -d ${D}${base_bindir} - mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip.${PN} - mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip.${PN} - mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat.${PN} - fi +do_install_append () { + # Rename and move files into /bin (FHS), which is typical place for gzip + install -d ${D}${base_bindir} + mv ${D}${bindir}/gunzip ${D}${base_bindir}/gunzip + mv ${D}${bindir}/gzip ${D}${base_bindir}/gzip + mv ${D}${bindir}/zcat ${D}${base_bindir}/zcat } -pkg_postinst_${PN} () { - if [ "${PN}" = "${BPN}" ] ; then - update-alternatives --install ${base_bindir}/gunzip gunzip gunzip.${PN} 100 - update-alternatives --install ${base_bindir}/gzip gzip gzip.${PN} 100 - update-alternatives --install ${base_bindir}/zcat zcat zcat.${PN} 100 - fi -} +inherit update-alternatives -pkg_prerm_${PN} () { - if [ "${PN}" = "${BPN}" ] ; then - update-alternatives --remove gunzip gunzip.${PN} - update-alternatives --remove gzip gzip.${PN} - update-alternatives --remove zcat zcat.${PN} - fi -} +ALTERNATIVE_LINKS = "${base_bindir}/gunzip ${base_bindir}/gzip ${base_bindir}/zcat" +ALTERNATIVE_PRIORITY = "100" |