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

Unified Diff: chrome/installer/linux/debian/build.sh

Issue 2903253005: Linux: Make manual libnss3 version dependency work again. (Closed)
Patch Set: Add a check, remove unneeded manual libstdc++6 dep Created 3 years, 7 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: chrome/installer/linux/debian/build.sh
diff --git a/chrome/installer/linux/debian/build.sh b/chrome/installer/linux/debian/build.sh
index a91bbeac026ec0b9cfefe93e688a763ceb76f7ca..f0c5a181141ae44866c7819207c11e174a9058aa 100755
--- a/chrome/installer/linux/debian/build.sh
+++ b/chrome/installer/linux/debian/build.sh
@@ -113,6 +113,22 @@ do_package() {
fakeroot dpkg-deb -Zxz -z9 -b "${STAGEDIR}" .
}
+verify_package() {
+ DEPENDS="${COMMON_DEPS}" # This needs to match do_package() above.
Tom Anderson 2017/05/26 23:56:16 Is DEPENDS just here for the comment? It's only u
Lei Zhang 2017/05/27 00:22:38 It's just here to help readers better understand w
+ echo ${DEPENDS} | sed 's/, /\n/g' | LANG=C sort > expected_deb_depends
Tom Anderson 2017/05/26 23:56:15 Does this file get created in the out directory?
Lei Zhang 2017/05/27 00:22:38 Yes it does. Is that a problem? We do the same wit
Tom Anderson 2017/05/27 00:27:01 Ok good, just wanted to make sure it wasn't gettin
+ dpkg -I "${PACKAGE}-${CHANNEL}_${VERSIONFULL}_${ARCHITECTURE}.deb" | \
+ grep '^ Depends: ' | sed 's/^ Depends: //' | sed 's/, /\n/g' | \
+ LANG=C sort > actual_deb_depends
+ BAD_DIFF=0
+ diff -u expected_deb_depends actual_deb_depends || BAD_DIFF=1
+ if [ $BAD_DIFF -ne 0 ] && [ -z "${IGNORE_DEPS_CHANGES:-}" ]; then
+ echo
+ echo "ERROR: bad dpkg dependencies!"
+ echo
+ exit $BAD_DIFF
+ fi
+}
+
# Remove temporary files and unwanted packaging output.
cleanup() {
echo "Cleaning..."
@@ -305,22 +321,24 @@ fi
# libappindicator1: Make systray icons work in Unity.
# libnss3: Pull a more recent version of NSS than required by runtime linking,
# for security and stability updates in NSS.
-# libstdc++6: For C++11 support.
Lei Zhang 2017/05/26 23:28:03 No longer needed. The expectation files already ha
# lsb-release: For lsb_release.
# xdg-utils: For OS integration.
# wget: For uploading crash reports with Breakpad.
-ADDITION_DEPS="ca-certificates, fonts-liberation, libappindicator1, \
- libnss3 (>= 3.17.2), libstdc++6 (>=4.8.0), lsb-release, \
- xdg-utils (>= 1.0.2), wget"
+ADDITIONAL_DEPS="ca-certificates, fonts-liberation, libappindicator1, \
+ libnss3 (>= 3.17.2), lsb-release, xdg-utils (>= 1.0.2), wget"
# Fix-up libnspr dependency due to renaming in Ubuntu (the old package still
# exists, but it was moved to "universe" repository, which isn't installed by
# default).
+# TODO(thestig): This is probably no longer needed. Verify and remove.
DPKG_SHLIB_DEPS=$(sed \
's/\(libnspr4-0d ([^)]*)\), /\1 | libnspr4 (>= 4.9.5-0ubuntu0), /g' \
<<< $DPKG_SHLIB_DEPS)
-COMMON_DEPS="${DPKG_SHLIB_DEPS}, ${ADDITION_DEPS}"
+# Remove libnss dependency so the one in $ADDITIONAL_DEPS can supercede it.
+DPKG_SHLIB_DEPS=$(sed 's/\(libnss3 ([^)]*)\), //g' <<< $DPKG_SHLIB_DEPS)
+
+COMMON_DEPS="${DPKG_SHLIB_DEPS}, ${ADDITIONAL_DEPS}"
COMMON_PREDEPS="dpkg (>= 1.14.0)"
@@ -352,3 +370,4 @@ REPOCONFIGREGEX+="[[:space:]]*) https?://${BASEREPOCONFIG}"
stage_install_debian
do_package
+verify_package
« 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