Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: build/linux/sysroot_scripts/sysroot-creator.sh

Issue 2391183002: Add dpkg control files to debian sysroot images (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698