Firmware dependencies
authorAnas Nashif <anas.nashif@intel.com>
Thu, 11 Oct 2012 22:30:04 +0000 (15:30 -0700)
committerAnas Nashif <anas.nashif@intel.com>
Sun, 3 Feb 2013 00:44:15 +0000 (16:44 -0800)
autodeps/linux.prov
scripts/firmware.prov [new file with mode: 0644]

index 26272d8..166743d 100644 (file)
@@ -11,6 +11,7 @@ solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so"
 pythonlist=
 tcllist=
 monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$"))
+firmwarelist=($(printf "%s\n" "${filelist[@]}" | grep "/lib/firmware/"))
 
 #
 # --- Alpha does not mark 64bit dependencies
@@ -59,6 +60,11 @@ done | sort -u
     printf "%s\n" "${tcllist[@]}" | /usr/lib/rpm/tcl.prov | sort -u
 
 #
+# --- firmware files
+[ -x /usr/lib/rpm/firmware.prov -a -n "$firmwarelist" ] &&
+     printf "%s\n" "${firmwarelist[@]}" | /usr/lib/rpm/firmware.prov | sort -u
+
+#
 # --- Mono exes/dlls
 : ${MONO_PREFIX=/usr}
 if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then
diff --git a/scripts/firmware.prov b/scripts/firmware.prov
new file mode 100644 (file)
index 0000000..12f8336
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Add firmware files in /lib/firmware into RPM provides
+
+while read instfile ; do
+  case $instfile in
+    */lib/firmware/*) test -f "$instfile" && echo "firmware(${instfile##*/lib/firmware/})" ;;
+  esac
+done