dyn_package: remove stale PROOT if necessary
authorZac Medico <zmedico@gentoo.org>
Fri, 13 Jan 2012 14:14:12 +0000 (06:14 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 13 Jan 2012 14:14:12 +0000 (06:14 -0800)
bin/misc-functions.sh

index df0493bbe08d733de316df9ce29fdf75a8a12d4d..6094fb7f067d38fdfd8859fd3894c5fb9f546f0b 100755 (executable)
@@ -1107,6 +1107,7 @@ dyn_package() {
        local PROOT="${T}/packaging"
        # 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"
 
        install_mask "${PROOT}" "${PKG_INSTALL_MASK}"