[Buildroot] [PATCH] Ignore errors on rmdir in clean-targets; retry
Hamish Moffatt
hamish at cloud.net.au
Wed Sep 10 10:47:50 UTC 2008
On Wed, Sep 10, 2008 at 10:11:10AM +0200, Michel Wilson wrote:
> Hi,
>
> Same patch, better mailer :)
> As stated before, makes various clean-targets behave when some
> directories it tries to remove are missing.
Not just clean targets, fwiw:
> Index: target/jffs2/jffs2root.mk
> ===================================================================
> --- target/jffs2/jffs2root.mk (revision 23359)
> +++ target/jffs2/jffs2root.mk (working copy)
> @@ -58,7 +58,7 @@
> ifneq ($(BR2_HAVE_INFOPAGES),y)
> @rm -rf $(TARGET_DIR)/usr/info
> endif
> - @rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
> + @-rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
> $(if $(TARGET_LDCONFIG),test -x $(TARGET_LDCONFIG) && $(TARGET_LDCONFIG) -r $(TARGET_DIR) 2>/dev/null)
> # Use fakeroot to pretend all target binaries are owned by root
> rm -f $(PROJECT_BUILD_DIR)/_fakeroot.$(notdir $(JFFS2_TARGET))
That's not in the clean target.
> Index: target/cloop/cloop.mk
> ===================================================================
> --- target/cloop/cloop.mk (revision 23359)
> +++ target/cloop/cloop.mk (working copy)
> @@ -71,7 +71,7 @@
> @rm -rf $(TARGET_DIR)/usr/info
> @rm -rf $(TARGET_DIR)/usr/share/info
> endif
> - @rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
> + @-rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
> which mkisofs
> - at find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIPCMD) 2>/dev/null || true
> - which symlinks && symlinks -r $(TARGET_DIR)
That's in check-tools target. (Which incidentally appears to be
namespace polution - cloop should prefix its target names with cloop.)
All this use of @... appears to be unnecessary information hiding too.
(Not blaming your patch for this of course.)
/usr/share is a standard system directory probably present in the target
skeleton, so it doesn't seem right for any package to be removing it
anyway.
Hamish
--
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>
More information about the buildroot
mailing list