All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bitbake-prserv-tool: show error when export file does not exist
@ 2013-02-06 14:23 Martin Jansa
  2013-02-06 14:29 ` Martin Jansa
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Jansa @ 2013-02-06 14:23 UTC (permalink / raw)
  To: openembedded-core

* otherwise it shows error about failing import

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 scripts/bitbake-prserv-tool | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool
index 4654e6d..96a3470 100755
--- a/scripts/bitbake-prserv-tool
+++ b/scripts/bitbake-prserv-tool
@@ -61,8 +61,16 @@ do_migrate_localcount ()
     clean_cache
     echo "Exporting LOCALCOUNT to AUTOINCs..."
     bitbake -R conf/migrate_localcount.conf -p
-    [ ! $? -eq 0 ] && echo "Exporting failed!" && exit 1
+    [ ! $? -eq 0 ] && echo "Exporting to file $df failed!" && exit 1
 
+    if [ -e $df ];
+    then
+        echo "Exporting to file $df succeeded!"
+    else
+        echo "Exporting to file $df failed!"
+        exit 1
+    fi
+    
     echo "Importing generated AUTOINC entries..."
     [ -e $df ] && do_import $df
 
-- 
1.8.1.2




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] bitbake-prserv-tool: show error when export file does not exist
  2013-02-06 14:23 [PATCH] bitbake-prserv-tool: show error when export file does not exist Martin Jansa
@ 2013-02-06 14:29 ` Martin Jansa
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Jansa @ 2013-02-06 14:29 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

On Wed, Feb 06, 2013 at 03:23:38PM +0100, Martin Jansa wrote:
> * otherwise it shows error about failing import

It fails like this e.g. when someone tries to migrate_localcount without
any entries in cache/bb_persist_data.sqlite3

> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
>  scripts/bitbake-prserv-tool | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/bitbake-prserv-tool b/scripts/bitbake-prserv-tool
> index 4654e6d..96a3470 100755
> --- a/scripts/bitbake-prserv-tool
> +++ b/scripts/bitbake-prserv-tool
> @@ -61,8 +61,16 @@ do_migrate_localcount ()
>      clean_cache
>      echo "Exporting LOCALCOUNT to AUTOINCs..."
>      bitbake -R conf/migrate_localcount.conf -p
> -    [ ! $? -eq 0 ] && echo "Exporting failed!" && exit 1
> +    [ ! $? -eq 0 ] && echo "Exporting to file $df failed!" && exit 1
>  
> +    if [ -e $df ];
> +    then
> +        echo "Exporting to file $df succeeded!"
> +    else
> +        echo "Exporting to file $df failed!"
> +        exit 1
> +    fi
> +    
>      echo "Importing generated AUTOINC entries..."
>      [ -e $df ] && do_import $df
>  
> -- 
> 1.8.1.2
> 

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-06 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 14:23 [PATCH] bitbake-prserv-tool: show error when export file does not exist Martin Jansa
2013-02-06 14:29 ` Martin Jansa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.