Skip to content
This repository was archived by the owner on Apr 10, 2025. It is now read-only.

Commit 36d4a38

Browse files
committed
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 https://chromium.googlesource.com/chromium/src.git/+/389af6af989c5ba5384988b55fc28a3f231a1479%5E%21/#F0 Fixes #1428
1 parent e472a0f commit 36d4a38

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

install/common/apt.include

+6-2
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,14 @@ KEYDATA
124124

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

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

0 commit comments

Comments
 (0)