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

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

Issue 2405073002: Build: Extract debian control files to sysroots (Closed)
Patch Set: Add comment 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..2be45bb43b688601ecaaf4aa81974a02fffd6895 100644
--- a/build/linux/sysroot_scripts/sysroot-creator.sh
+++ b/build/linux/sysroot_scripts/sysroot-creator.sh
@@ -375,7 +375,11 @@ InstallIntoSysroot() {
Banner "Install Libs And Headers Into Jail"
mkdir -p ${BUILD_DIR}/debian-packages
- mkdir -p ${INSTALL_ROOT}
+ # The /debian directory is an implementation detail that's used to cd into
Lei Zhang 2016/10/12 01:30:01 Also, I'm fine with this, but if you think "debian
Tom (Use chromium acct) 2016/10/12 01:34:52 Acknowledged.
+ # when running dpkg-shlibdeps.
+ mkdir -p ${INSTALL_ROOT}/debian
+ # An empty control file is necessary to run dpkg-shlibdeps.
+ touch ${INSTALL_ROOT}/debian/control
while (( "$#" )); do
local file="$1"
local package="${BUILD_DIR}/debian-packages/${file##*/}"
@@ -397,9 +401,11 @@ 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}
+ base_package=$(dpkg-deb --field ${package} Package)
+ mkdir -p ${INSTALL_ROOT}/debian/${base_package}/DEBIAN
+ dpkg-deb -e ${package} ${INSTALL_ROOT}/debian/${base_package}/DEBIAN
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