Skip to contentSkip to conversation

Cleanup non shipped empty directories for gcc-cross-canadian

PATCH Applied Lianhao Lu 2 participants 3 messages Mar 27, 2012 – Apr 3, 2012

lore
Share & tools
lore

Lianhao Lu

author
#0 lore raw

cover Cleanup non shipped empty directories for gcc-cross-canadian

This patch improved the previous patch of commit id 04a08bf7 by hanlding the non-existent directory situation.

The following changes since commit 644b7503c37fd73730dd3d7841463b158b8934ed:
Richard Purdie (1):
guile: Deal with hardcoded path issues

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib llu/warningfix2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=llu/warningfix2

Lianhao Lu (1):
gcc-cross-canadian: Clean non shipped empty directories.

 meta/recipes-devtools/gcc/gcc-package-sdk.inc |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
author
#1 lore raw

PATCH 1/1 gcc-cross-canadian: Clean non shipped empty directories.

Cleaning up non shipped empty directories.

---
 meta/recipes-devtools/gcc/gcc-package-sdk.inc |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
meta/recipes-devtools/gcc/gcc-package-sdk.inc +5 -5
index 95d6804..ffe9a9e 100644
@@ -47,11 +47,11 @@ do_install () {
 	rm -f ${D}${libdir}/libiberty.a
 
 	# Cleanup empty directories which are not shipped
-	# we use rmdir instead of 'rm -f' to ensure the directories are empty
-	rmdir ${D}${libdir}/../lib
-	rmdir ${D}${prefix}/${TARGET_SYS}/lib
-	rmdir ${D}${prefix}/${TARGET_SYS}
-	rmdir ${D}${includedir}
+	# we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
+	local empty_dirs="${D}${libdir}/../lib ${D}${prefix}/${TARGET_SYS}/lib ${D}${prefix}/${TARGET_SYS} ${D}${includedir}"
+	for i in $empty_dirs; do
+		[ -d $i ] && rmdir --ignore-fail-on-non-empty $i
+	done
 
 	# Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
 	# found.
Signature · 1 line
1.7.0.4
Applied
#2 lore raw
In reply to Lianhao Lu
Quoted 15 lines · Lianhao Lu

This patch improved the previous patch of commit id 04a08bf7 by hanlding the non-existent directory situation.

The following changes since commit 644b7503c37fd73730dd3d7841463b158b8934ed:
Richard Purdie (1):
guile: Deal with hardcoded path issues

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib llu/warningfix2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=llu/warningfix2

Lianhao Lu (1):
gcc-cross-canadian: Clean non shipped empty directories.

Quoted 9 lines
  meta/recipes-devtools/gcc/gcc-package-sdk.inc |   10 +++++-----
  1 files changed, 5 insertions(+), 5 deletions(-)

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Merged into OE-Core

Thanks
Sau!