bitbake-prserv-tool: show error when export file does not exist
PATCH 1/1 bitbake-prserv-tool: show error when export file does not exist
* otherwise it shows error about failing import
Signed-off-by Martin Jansa <[email protected]>
--- scripts/bitbake-prserv-tool | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
scripts/bitbake-prserv-tool +9 -1
@@ -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
Signature · 1 line
1.8.1.2
Quoted 1 line · Martin Jansa
* 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
Quoted 30 lines
Signed-off-by Martin Jansa <[email protected]>--- scripts/bitbake-prserv-tool | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)scripts/bitbake-prserv-tool +9
-1@@ -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 $dfSignature · 1 line
1.8.1.2
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]