Skip to content

Commit

Permalink
Prevent APT using source lists from /etc/apt/sources.list.d/ (#46)
Browse files Browse the repository at this point in the history
Previously the buildpack only passed `-o dir::etc::sourcelist` to APT,
which meant that APT still used the default `sourceparts` location of
`/etc/apt/sources.list.d/`.

This meant on cedar-14 this buildpack would use esm.ubuntu.com as an APT
source (as of heroku/base-images/pull/140), which results in errors if
the requested packages happened to have ESM-only updates available
(since the ESM repository requires credentials since it's a paid Ubuntu
offering).

Fixes #45 / W-6224944.
  • Loading branch information
edmorley authored Jun 11, 2019
1 parent ceecb67 commit 3a59ddc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ else
fi

APT_OPTIONS="-o debug::nolocking=true -o dir::cache=$APT_CACHE_DIR -o dir::state=$APT_STATE_DIR"
APT_OPTIONS="$APT_OPTIONS -o dir::etc::sourcelist=$APT_SOURCES"
# Override the use of /etc/apt/sources.list (sourcelist) and /etc/apt/sources.list.d/* (sourceparts).
APT_OPTIONS="$APT_OPTIONS -o dir::etc::sourcelist=$APT_SOURCES -o dir::etc::sourceparts=/dev/null"

topic "Updating apt caches"
apt-get $APT_OPTIONS update | indent
Expand Down

0 comments on commit 3a59ddc

Please sign in to comment.