Fix mapdepends to full dependency lines and also include Pre-Depends.
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Mon, 12 Jun 2023 07:45:08 +0000 (17:45 +1000)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Mon, 12 Jun 2023 07:45:08 +0000 (17:45 +1000)
Drop using dpkg and use only debextract.

mkit.sh

diff --git a/mkit.sh b/mkit.sh
index 437a5f40e087c20e9e50ee99fce3899686ed6481..3d9d62e947538c97827110681015354cedb4653b 100755 (executable)
--- a/mkit.sh
+++ b/mkit.sh
@@ -26,7 +26,8 @@ echo "# Creating mapdepends.txt and mapfile.txt"
 awk '
 BEGIN { print "###" > "mapdepends.txt"; print "###" > "mapfile.txt"; }
 $1=="Package:" {P=$2; next}
-$1=="Depends:" {print P,$2 >> "mapdepends.txt";next }
+$1=="Pre-Depends:" {print P,$0 >> "mapdepends.txt";next }
+$1=="Depends:" {print P,$0 >> "mapdepends.txt";next }
 $1=="Filename:" {print P,$2 >> "mapfile.txt";next }
 ' ${PKGFILE}
 
@@ -64,9 +65,9 @@ echo $KERNEL
 echo "# Create initrd filesystem"
 rm -fr initrd
 
-echo "# Install busybox, and fluff it up"
-fakechroot fakeroot \
-dpkg --log=dpkg.log --root=initrd -i $(debfile busybox-static)
+echo "# Extract busybox, and fluff it up"
+mkdir initrd
+debextract initrd $(debfile busybox-static)
 for L in $(initrd/bin/busybox --listfull) ; do
     mkdir -p $(dirname initrd/$L)
     case "$L" in