update_meta: only include non empty _meta files 35/31135/2
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>
Mon, 1 Dec 2014 17:59:52 +0000 (18:59 +0100)
committerEduard Bartosh <eduard.bartosh@intel.com>
Tue, 2 Dec 2014 07:44:13 +0000 (23:44 -0800)
Change-Id: I1fdf44545864512564a411f36d57a4556ae6f5cb
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
update_meta.sh

index 6bfcb68..1ff0445 100755 (executable)
@@ -46,7 +46,12 @@ function check_package() {
                        mkdir -p $pkg
                        osc -A $API api /source/$PRJ/$pkg/_link >$pkg/_link
                        osc -A $API api /source/$PRJ/$pkg/_meta >$pkg/_meta
-                       msg="$msg (updated)"
+                       if grep '<build' $pkg/_meta &>/dev/null; then
+                               msg="$msg (updated, with meta)"
+                       else
+                               rm $pkg/_meta
+                               msg="$msg (updated)"
+                       fi
                        ;;
                *)
                        ;;