Apt layer does not remove previously defined repositories

Bug #1716846 reported by Antti Rahikainen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Apt layer
Confirmed
High
Unassigned

Bug Description

When setting a repository through install_sources and install_keys it creates a new entry to /etc/apt/sources.list

If for whatever reason that repository is not available anymore, modifying the install_sources and install_keys to point new repositories old entries are not removed.

This causes update-config hook to fail as it is not able run "apt update" successfully.

Revision history for this message
Antti Rahikainen (anrah) wrote :

One method would be rendering the defined repositories under sources.list.d and trusted.gpg.d respectively and render those again whenever the config optionsa are changed.

Revision history for this message
Stuart Bishop (stub) wrote :

This likely requires pulling in the code from charm-helpers that handles this.

Changed in layer-apt:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Stuart Bishop (stub) wrote :

(or adding the necessary to charm-helpers, which is trickier than doing it in the apt layer)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.