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

Unified Diff: remoting/host/installer/linux/debian/postrm

Issue 2488393002: Fix chromoting apt-config usage that breaks on Ubuntu 16.10. (Closed)
Patch Set: Created 4 years, 1 month 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: remoting/host/installer/linux/debian/postrm
diff --git a/remoting/host/installer/linux/debian/postrm b/remoting/host/installer/linux/debian/postrm
index 35f5f9a8875ae62a19ccc2bb4debc6acb1ea39a5..96160da33b16e16bb3f81a14fb195df7bb04f5e4 100755
--- a/remoting/host/installer/linux/debian/postrm
+++ b/remoting/host/installer/linux/debian/postrm
@@ -12,13 +12,6 @@ fi
APT_CONFIG="`which apt-config 2> /dev/null`"
-apt_config_val() {
- APTVAR="$1"
- if [ -x "$APT_CONFIG" ]; then
- "$APT_CONFIG" dump | sed -e "/^$APTVAR /"'!d' -e "s/^$APTVAR \"\(.*\)\".*/\1/"
- fi
-}
-
# Only remove the defaults file if it is not empty. An empty file was probably
# put there by the sysadmin to disable automatic repository configuration, as
# per the instructions on the package download page.
@@ -31,9 +24,9 @@ if [ -s "$DEFAULTS_FILE" ]; then
rm "$DEFAULTS_FILE" || exit 1
fi
# Remove Google repository added by the package.
-APTDIR=$(apt_config_val Dir)
-APTETC=$(apt_config_val 'Dir::Etc')
-APT_SOURCESDIR="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourceparts')"
-rm -f "$APT_SOURCESDIR/chrome-remote-desktop.list"
+if [ -x "$APT_CONFIG" ]; then
+ eval $("$APT_CONFIG" shell APT_SOURCESDIR 'Dir::Etc::sourceparts/d')
+ rm -f "${APT_SOURCESDIR}chrome-remote-desktop.list"
+fi
#DEBHELPER#
« 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