From: Richard Purdie Date: Tue, 19 May 2009 11:09:21 +0000 (+0100) Subject: base.bbclass: Update to work with systems where install won't overwrite files X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~51631 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a811131e69de69b2bd57cf1f637b28b507ef1e2a;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git base.bbclass: Update to work with systems where install won't overwrite files Signed-off-by: Richard Purdie --- diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index e801fd12a96..3704cce01a2 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -342,6 +342,7 @@ oe_libinstall() { __runcmd install -d $destpath/ dota=$libname.a if [ -f "$dota" -o -n "$require_static" ]; then + rm -f $destpath/$dota __runcmd install -m 0644 $dota $destpath/ fi if [ -f "$dotlai" -a -n "$libtool" ]; then @@ -355,6 +356,7 @@ oe_libinstall() { -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${STAGING_LIBDIR},g" \ $dotlai >$destpath/$libname.la else + rm -f $destpath/$libname.la __runcmd install -m 0644 $dotlai $destpath/$libname.la fi fi @@ -370,6 +372,7 @@ oe_libinstall() { __runcmd cp -P "$f" $destpath/ elif [ ! -L "$f" ]; then libfile="$f" + rm -f $destpath/$libfile __runcmd install -m 0755 $libfile $destpath/ fi done