Browse Source

Allow qemu-utils to be used to build image

This patch allows build sahara images in ubuntu/debian
distribution with qemu-utils package.

Change-Id: Ibfa5c2550898a0d36b51057f5cd2b85f434b57f5
Story: 2006505
Task: 36483
changes/59/680759/4
jorgefrancoibanez 1 week ago
parent
commit
24a0ea0195
1 changed files with 5 additions and 4 deletions
  1. 5
    4
      diskimage-create/diskimage-create.sh

+ 5
- 4
diskimage-create/diskimage-create.sh View File

@@ -327,7 +327,7 @@ fi
327 327
 #################
328 328
 
329 329
 is_installed() {
330
-    if [ "$platform" = 'ubuntu' ]; then
330
+    if [ "$platform" = 'ubuntu' -o "$platform" = 'debian' ]; then
331 331
         dpkg -s "$1" &> /dev/null
332 332
     else
333 333
         # centos, fedora, opensuse, or rhel
@@ -339,8 +339,8 @@ is_installed() {
339 339
 
340 340
 need_required_packages() {
341 341
     case "$platform" in
342
-        "ubuntu")
343
-            package_list="qemu kpartx git"
342
+        "ubuntu" | "debian")
343
+            package_list="qemu-utils kpartx git"
344 344
             ;;
345 345
         "fedora")
346 346
             package_list="qemu-img kpartx git"
@@ -359,6 +359,7 @@ need_required_packages() {
359 359
 
360 360
     for p in `echo $package_list`; do
361 361
         if ! is_installed $p; then
362
+            echo "Package $p is not installed on the system."
362 363
             return 0
363 364
         fi
364 365
     done
@@ -369,7 +370,7 @@ if need_required_packages; then
369 370
     # install required packages if requested
370 371
     if [ -n "$DIB_UPDATE_REQUESTED" ]; then
371 372
         case "$platform" in
372
-            "ubuntu")
373
+            "ubuntu" | "debian")
373 374
                 sudo apt-get update
374 375
                 sudo apt-get install $package_list -y
375 376
                 ;;

Loading…
Cancel
Save