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}
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