Patchwork scripts/cleanup-workdir: fix after binutils-cross name change

login
register
mail settings
Submitter Stefan Stanacar
Date May 4, 2014, 5:41 p.m.
Message ID <1399225274-10139-1-git-send-email-sstncr@gmail.com>
Download mbox | patch
Permalink /patch/71467/
State New
Headers show

Comments

Stefan Stanacar - May 4, 2014, 5:41 p.m.
Signed-off-by: Stefan Stanacar <sstncr@gmail.com>
---
 scripts/cleanup-workdir | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Richard Purdie - May 5, 2014, 8:13 a.m.
On Sun, 2014-05-04 at 20:41 +0300, Stefan Stanacar wrote:
> Signed-off-by: Stefan Stanacar <sstncr@gmail.com>
> ---
>  scripts/cleanup-workdir | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/cleanup-workdir b/scripts/cleanup-workdir
> index 25fef97..cffac59 100755
> --- a/scripts/cleanup-workdir
> +++ b/scripts/cleanup-workdir
> @@ -49,9 +49,10 @@ def run_command(cmd):
>  
>  def get_cur_arch_dirs(workdir, arch_dirs):
>      pattern = workdir + '/(.*?)/'
> -
> +    tunearch = run_command("bitbake -e | grep ^TUNE_ARCH=")
> +    tunearch = tunearch.split('"')[1]
>      # select thest 5 packages to get the dirs of current arch
> -    pkgs = ['hicolor-icon-theme', 'base-files', 'acl-native', 'binutils-crosssdk', 'nativesdk-autoconf']
> +    pkgs = ['hicolor-icon-theme', 'base-files', 'acl-native', 'binutils-crosssdk-' + tunearch, 'nativesdk-autoconf']
>  
>      for pkg in pkgs:
>          cmd = "bitbake -e " + pkg + " | grep ^IMAGE_ROOTFS="

I pushed a fix for this before I saw the patch. FWIW for crosssdk we
need to use SDK_ARCH though.

Cheers,

Richard

Patch

diff --git a/scripts/cleanup-workdir b/scripts/cleanup-workdir
index 25fef97..cffac59 100755
--- a/scripts/cleanup-workdir
+++ b/scripts/cleanup-workdir
@@ -49,9 +49,10 @@  def run_command(cmd):
 
 def get_cur_arch_dirs(workdir, arch_dirs):
     pattern = workdir + '/(.*?)/'
-
+    tunearch = run_command("bitbake -e | grep ^TUNE_ARCH=")
+    tunearch = tunearch.split('"')[1]
     # select thest 5 packages to get the dirs of current arch
-    pkgs = ['hicolor-icon-theme', 'base-files', 'acl-native', 'binutils-crosssdk', 'nativesdk-autoconf']
+    pkgs = ['hicolor-icon-theme', 'base-files', 'acl-native', 'binutils-crosssdk-' + tunearch, 'nativesdk-autoconf']
 
     for pkg in pkgs:
         cmd = "bitbake -e " + pkg + " | grep ^IMAGE_ROOTFS="