Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Linux installer: Fix APT_SOURCES and APT_SOURCESDIR paths
Browse files Browse the repository at this point in the history
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 https://chromium.googlesource.com/chromium/src.git/+/389af6af989c5ba5384988b55fc28a3f231a1479%5E%21/#F0

Fixes #1428
  • Loading branch information
jeffkaufman committed Nov 10, 2016
1 parent e472a0f commit 36d4a38
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions install/common/apt.include
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -124,10 +124,14 @@ KEYDATA


# Set variables for the locations of the apt sources lists. # Set variables for the locations of the apt sources lists.
find_apt_sources() { 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) APTDIR=$(apt_config_val Dir)
APTETC=$(apt_config_val 'Dir::Etc') APTETC=$(apt_config_val 'Dir::Etc')
APT_SOURCES="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourcelist')" APT_SOURCES="$APTDIR/$APTETC/$(apt_config_val 'Dir::Etc::sourcelist')"
APT_SOURCESDIR="$APTDIR$APTETC$(apt_config_val 'Dir::Etc::sourceparts')" APT_SOURCESDIR="$APTDIR/$APTETC/$(apt_config_val 'Dir::Etc::sourceparts')"
} }


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

0 comments on commit 36d4a38

Please sign in to comment.