From 577dd4b3e5d4861c31824d920fa170ba3a585f63 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 21 Feb 2011 16:29:43 +0000 Subject: tar-replacement-native: Add a target to replace the default tar tar < 1.24 has symlink issues where extracting a tar archive containing a symlink to a directory where that symlink already exists will cause the symlink to be dereferenced. If that target doesn't exist tar can fail with a permissions error. Since we need to be able to do this for packages containing symlinks like xorg-minimal-fonts and eglibc, we have to ensure a tar 1.25 is available early in the build process. Signed-off-by: Richard Purdie --- meta/recipes-extended/tar/tar-replacement-native_1.25.bb | 5 +++++ meta/recipes-extended/tar/tar.inc | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/tar/tar-replacement-native_1.25.bb (limited to 'meta/recipes-extended/tar') diff --git a/meta/recipes-extended/tar/tar-replacement-native_1.25.bb b/meta/recipes-extended/tar/tar-replacement-native_1.25.bb new file mode 100644 index 0000000000..2ec55483c0 --- /dev/null +++ b/meta/recipes-extended/tar/tar-replacement-native_1.25.bb @@ -0,0 +1,5 @@ +require tar_${PV}.bb + +inherit native + +BPN = "tar" diff --git a/meta/recipes-extended/tar/tar.inc b/meta/recipes-extended/tar/tar.inc index 5246efc5af..f83fb46012 100644 --- a/meta/recipes-extended/tar/tar.inc +++ b/meta/recipes-extended/tar/tar.inc @@ -8,11 +8,18 @@ SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2" inherit autotools gettext +EXTRAINSTALL = "do_install_extra" +EXTRAINSTALL_virtclass-native = "" + do_install () { autotools_do_install install -d ${D}${base_bindir} - mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN} - mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN} + ${EXTRAINSTALL} +} + +do_install_extra () { + mv ${D}${bindir}/tar ${D}${base_bindir}/tar.${PN} \ + mv ${D}${libexecdir}/rmt ${D}${libexecdir}/rmt.${PN} } pkg_postinst_${PN} () { -- cgit v1.2.3-54-g00ecf