]> gitweb.fluxo.info Git - bootless.git/commitdiff
Fix: check for package dependencies
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 12 Jun 2022 18:30:10 +0000 (15:30 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 12 Jun 2022 18:30:10 +0000 (15:30 -0300)
files/bootless

index a06c98d644c4cc00f7f336c3073d851f5197f55b..0dffd6cad964c09c5cc9d2f53ad34dee9a4178ed 100755 (executable)
@@ -220,6 +220,15 @@ function bootless_check_dependencies {
       exit 1
     fi
   done
+
+  # Some package dependencies are needed, especially grub-pc-bin which
+  # enables PC BIOS-compatible images
+  for dependency in $DEPENDENCIES_DEB; do
+    if ! dpkg -l $dependency | grep -q "^ii "; then
+      echo "$NAME: unmet package dependency $dependency, please install it"
+      exit 1
+    fi
+  done
 }
 
 # Load
@@ -231,6 +240,7 @@ BOOTLESS_VERSION="0.0.1"
 BOOTLESS_ACTION="$1"
 BOOTLESS_DIR="$2"
 DEPENDENCIES="xorriso grub-mkrescue rsync dd"
+DEPENDENCIES_DEB="grub-pc-bin"
 
 # Output name and version
 echo "$NAME $BOOTLESS_VERSION"