Patchwork [1/1] gcc-cross-canadian: Fixed packaging warnings.

login
register
mail settings
Submitter Lianhao Lu
Date March 26, 2012, 7:10 a.m.
Message ID <69175f6050af8983d9ab9781c01fe4bb29168a3b.1332745722.git.lianhao.lu@intel.com>
Download mbox | patch
Permalink /patch/24521/
State Accepted
Commit 04a08bf7e8d7cf4b6b844a88173b5d1d7917c8af
Headers show

Comments

Lianhao Lu - March 26, 2012, 7:10 a.m.
Removed non-shipped empty directories:
 -${prefix}/${TARGET_SYS}
 -${libdir}/../lib
 -${prefix}/include

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
---
 meta/recipes-devtools/gcc/gcc-package-sdk.inc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
Khem Raj - March 26, 2012, 10:37 p.m.
On Mon, Mar 26, 2012 at 12:10 AM, Lianhao Lu <lianhao.lu@intel.com> wrote:
> Removed non-shipped empty directories:
>  -${prefix}/${TARGET_SYS}
>  -${libdir}/../lib
>  -${prefix}/include
>
> Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
> ---
>  meta/recipes-devtools/gcc/gcc-package-sdk.inc |    7 +++++++
>  1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-package-sdk.inc b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
> index e2095e3..95d6804 100644
> --- a/meta/recipes-devtools/gcc/gcc-package-sdk.inc
> +++ b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
> @@ -46,6 +46,13 @@ do_install () {
>        rm -f ${D}${libdir}/../lib/libiberty.a
>        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

what if the directories don't exist at all ? then you break the build
unnecessarily.

> +       rmdir ${D}${libdir}/../lib
> +       rmdir ${D}${prefix}/${TARGET_SYS}/lib
> +       rmdir ${D}${prefix}/${TARGET_SYS}
> +       rmdir ${D}${includedir}
> +
>        # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
>        # found.
>        dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/
> --
> 1.7.0.4
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-package-sdk.inc b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
index e2095e3..95d6804 100644
--- a/meta/recipes-devtools/gcc/gcc-package-sdk.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
@@ -46,6 +46,13 @@  do_install () {
 	rm -f ${D}${libdir}/../lib/libiberty.a
 	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}
+
 	# Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
 	# found.
 	dest=${D}${libexecdir}/gcc/${TARGET_SYS}/${BINV}/