fix build error with loop device 02/235302/3
authoryan11.meng <yan11.meng@samsung.com>
Wed, 3 Jun 2020 10:55:57 +0000 (18:55 +0800)
committeryan11.meng <yan11.meng@samsung.com>
Fri, 5 Jun 2020 03:42:01 +0000 (11:42 +0800)
Change-Id: Id8f17585e2bc3648b129868e566c1aafbb3502b5
Signed-off-by: yan11.meng <yan11.meng@samsung.com>
cases/create/mixed_cases/mic_cr_raw_locale.case
cases/create/opt_cases/mic_cr_raw_fstab-entry-name.case
cases/create/opt_cases/mic_cr_raw_fstab-entry-uuid.case

index 3621287d3d83bd7022d574ef3a3a288db3d89377..86fe49782381b39381619c99bcb9ced8b048c504 100755 (executable)
@@ -38,7 +38,7 @@ fi
 
 platform=$(python -c 'import platform;print platform.linux_distribution()[0].rstrip()')
 version=$(python -c 'import platform;print platform.linux_distribution()[1].rstrip()')
-if [ "$platform" = "openSUSE" ] && [ "$version" = "42.3" ]; then
+if ([ "$platform" = "openSUSE" ] && [ "$version" = "42.3" ]) || ([ "$platform" = "Ubuntu" ] && [ "$version" = "20.04" ]); then
     #$raw_image_2=${raw_image##*/}"2"
     offset_2=$(sudo fdisk -lu $raw_image | grep $raw_image | sed -n '3p' | awk '{print $2}')
     let offset_2=$offset_2*512
@@ -94,6 +94,8 @@ if [ -f $raw_image ];then
     version=$(python -c 'import platform;print platform.linux_distribution()[1].rstrip()')
     if [ "$platform" = "openSUSE" ] && [ "$version" = "42.3" ]; then
         echo 'This is openSUSE42.3 platform.'
+    elif [ "$platform" = "Ubuntu" ] && [ "$version" = "20.04" ]; then
+        echo 'This is Ubuntu20.04 platform.'
     elif [ !`echo $linux_distro |  grep -E "openSUSE.*42.*"` ]; then
         sudo $kpartx_path -d $raw_image
     else
index cad25f17422bc07be164316a658add1291489b5f..a21d26511a917989e0d1396e6af66b5d3b2dae6d 100755 (executable)
@@ -34,7 +34,7 @@ fi
 
 platform=$(python -c 'import platform;print platform.linux_distribution()[0].rstrip()')
 version=$(python -c 'import platform;print platform.linux_distribution()[1].rstrip()')
-if [ "$platform" = "openSUSE" ] && [ "$version" = "42.3" ]; then
+if ([ "$platform" = "openSUSE" ] && [ "$version" = "42.3" ]) || ([ "$platform" = "Ubuntu" ] && [ "$version" = "20.04" ]); then
     #$raw_image_2=${raw_image##*/}"2"
     offset_2=$(sudo fdisk -lu $raw_image | grep $raw_image | sed -n '3p' | awk '{print $2}')
     let offset_2=$offset_2*512
@@ -89,6 +89,8 @@ if [ -f $raw_image ];then
     version=$(python -c 'import platform;print platform.linux_distribution()[1].rstrip()')
     if [ "$platform" = "openSUSE" ] && [ "$version" = "42.3" ]; then
         echo 'This is openSUSE42.3 platform.'
+    elif [ "$platform" = "Ubuntu" ] && [ "$version" = "20.04" ]; then
+        echo 'This is Ubuntu20.04 platform.'
     elif [ !`echo $linux_distro |  grep -E "openSUSE.*42.*"` ]; then
         sudo $kpartx_path -d $raw_image
     else
index 63b52bfa2d76eb686434ec73401a7decdefca7c1..269a9ccae5dc4aa0604624463169dc34a1664cac 100755 (executable)
@@ -34,7 +34,7 @@ fi
 
 platform=$(python -c 'import platform;print platform.linux_distribution()[0].rstrip()')
 version=$(python -c 'import platform;print platform.linux_distribution()[1].rstrip()')
-if [ "$platform" = "openSUSE" ] && [ "$version" = "42.3" ]; then
+if ([ "$platform" = "openSUSE" ] && [ "$version" = "42.3" ]) || ([ "$platform" = "Ubuntu" ] && [ "$version" = "20.04" ]); then
     #$raw_image_2=${raw_image##*/}"2"
     offset_2=$(sudo fdisk -lu $raw_image | grep $raw_image | sed -n '3p' | awk '{print $2}')
     let offset_2=$offset_2*512
@@ -90,6 +90,8 @@ if [ -f $raw_image ];then
     version=$(python -c 'import platform;print platform.linux_distribution()[1].rstrip()')
     if [ "$platform" = "openSUSE" ] && [ "$version" = "42.3" ]; then
         echo 'This is openSUSE42.3 platform.'
+    elif [ "$platform" = "Ubuntu" ] && [ "$version" = "20.04" ]; then
+        echo 'This is Ubuntu20.04 platform.'
     elif [ !`echo $linux_distro |  grep -E "openSUSE.*42.*"` ]; then
         sudo $kpartx_path -d $raw_image
     else