Browse Source

- test if dir exists before trying to rmdir it.
Fixes failure due to non-existing usr/share dir on the target.

Bernhard Reutner-Fischer 18 years ago
parent
commit
59c867406d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      target/ext2/ext2root.mk

+ 2 - 1
target/ext2/ext2root.mk

@@ -91,7 +91,8 @@ $(EXT2_BASE): host-fakeroot makedevs genext2fs
 	@rm -rf $(TARGET_DIR)/usr/man
 	@rm -rf $(TARGET_DIR)/usr/share/man
 	@rm -rf $(TARGET_DIR)/usr/info
-	@rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
+	@test -d $(TARGET_DIR)/usr/share && \
+		rmdir -p --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share
 	-/sbin/ldconfig -r $(TARGET_DIR) 2>/dev/null
 	# Use fakeroot to pretend all target binaries are owned by root
 	rm -f $(STAGING_DIR)/_fakeroot.$(notdir $(EXT2_TARGET))