Index: build/linux/sysroot_scripts/sysroot-creator.sh |
diff --git a/build/linux/sysroot_scripts/sysroot-creator.sh b/build/linux/sysroot_scripts/sysroot-creator.sh |
index 64d9ab44672abb0c08f79bd4968adc7a6a14132d..7b5cf16830deef692d660b9fbb5a24bba7105efb 100644 |
--- a/build/linux/sysroot_scripts/sysroot-creator.sh |
+++ b/build/linux/sysroot_scripts/sysroot-creator.sh |
@@ -397,9 +397,20 @@ InstallIntoSysroot() { |
echo "${sha256sum} ${package}" | sha256sum --quiet -c |
SubBanner "Extracting to ${INSTALL_ROOT}" |
- dpkg --fsys-tarfile ${package}\ |
- | tar -xf - -C ${INSTALL_ROOT} |
- |
+ dpkg-deb -x ${package} ${INSTALL_ROOT} |
+ |
+ # Extract control files |
+ mkdir -p ${INSTALL_ROOT}/tmp |
+ mkdir -p ${INSTALL_ROOT}/var/lib/dpkg/info |
+ dpkg-deb -e ${package} ${INSTALL_ROOT}/tmp |
+ cat ${INSTALL_ROOT}/tmp/control >> ${INSTALL_ROOT}/var/lib/dpkg/status |
+ echo 'Status: install ok installed' >> ${INSTALL_ROOT}/var/lib/dpkg/status |
+ echo '' >> ${INSTALL_ROOT}/var/lib/dpkg/status |
+ rm -f ${INSTALL_ROOT}/tmp/control |
+ base_package=$(dpkg-deb --field ${package} Package) |
+ for f in ${INSTALL_ROOT}/tmp/*; do |
+ mv $f ${INSTALL_ROOT}/var/lib/dpkg/info/${base_package}.$(basename $f) |
+ done |
done |
# Prune /usr/share, leaving only pkgconfig |