Browse files

Linux installer: Fix APT_SOURCES and APT_SOURCESDIR paths

In prior versions of Ubuntu/Debian the Dir::Etc apt-config variable contained a
trailing slash by default. The cronjob at /etc/cron.daily/google-chrome was
concatenating that variable into a path, assuming the trailing slash. But in
Ubuntu 16.10, the trailing slash is gone. That breaks the path to the list file,
and the cronjob fails to fix it.

Patch from

Fixes #1428
  • Loading branch information...
jeffkaufman committed Nov 10, 2016
1 parent e472a0f commit 36d4a38005b9c355d376b9866b71ede0a96be744
Showing with 6 additions and 2 deletions.
  1. +6 −2 install/common/apt.include
@@ -124,10 +124,14 @@ KEYDATA

# Set variables for the locations of the apt sources lists.
find_apt_sources() {
# NB: These variables only *sometimes* include a trailing slash. (In
# particular, in Ubuntu 16.10 / Debian 9, the default value *stopped*
# including the trailing slash.) We have to join them with slashes, even
# though that sometimes gives a double slash.
APTDIR=$(apt_config_val Dir)
APTETC=$(apt_config_val 'Dir::Etc')
APT_SOURCES="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourcelist')"
APT_SOURCESDIR="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourceparts')"
APT_SOURCES="$APTDIR/$APTETC/$(apt_config_val 'Dir::Etc::sourcelist')"
APT_SOURCESDIR="$APTDIR/$APTETC/$(apt_config_val 'Dir::Etc::sourceparts')"

# Update the Google repository if it's not set correctly.

0 comments on commit 36d4a38

Please sign in to comment.