dyn_package: portable cp args by Mike Frysinger
authorZac Medico <zmedico@gentoo.org>
Fri, 13 Jan 2012 16:06:20 +0000 (08:06 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 13 Jan 2012 16:06:20 +0000 (08:06 -0800)
bin/misc-functions.sh

index 6094fb7f067d38fdfd8859fd3894c5fb9f546f0b..431e89f32fa271e26578e89a7f34fe8c83c00b37 100755 (executable)
@@ -1108,7 +1108,9 @@ dyn_package() {
        # make a temporary copy of ${D} so that any modifications we do that
        # are binpkg specific, do not influence the actual installed image.
        rm -rf "${PROOT}" || die "failed removing stale package tree"
-       cp -la "${PORTAGE_BUILDDIR}/image" "${PROOT}" || die "failed creating packaging tree"
+       cp -pPR $(cp --help | grep -qs -e-l && echo -l) \
+               "${PORTAGE_BUILDDIR}/image" "${PROOT}" \
+               || die "failed creating packaging tree"
 
        install_mask "${PROOT}" "${PKG_INSTALL_MASK}"