At present, the apt fetch.add_sources() uses 'add-apt-repository' to add defined install_sources. Unfortunately, for private PPAs, this causes issues with multiple sources added to /etc/apt/sources.list (especially on change of key):
...
| # deb http://archive.canonical.com/ubuntu xenial partner
| # deb-src http://archive.canonical.com/ubuntu xenial partner
| deb https://prodstack-cdo:<email address hidden>/canonical-XXX-service/canonical-XXX-health/ubuntu xenial main
| # deb-src https://prodstack-cdo:<email address hidden>/canonical-is-sa/XXX-health/ubuntu xenial main
| deb https://prodstack-cdo:<email address hidden>/canonical-is-sa/XXX-health/ubuntu xenial main
| # deb-src https://prodstack-cdo:<email address hidden>/canonical-is-sa/XXX-health/ubuntu xenial main
| deb https://prodstack-cdo:<email address hidden>/canonical-XXX-service/canonical-XXX-health/ubuntu xenial main
| # deb-src https://prodstack-cdo:<email address hidden>/canonical-XXX-service/canonical-XXX-health/ubuntu xenial main
| # deb-src https://prodstack-cdo:<email address hidden>/canonical-XXX-service/canonical-XXX-health/ubuntu xenial main
| # deb-src https://prodstack-cdo:<email address hidden>/canonical-XXX-service/canonical-XXX-health/ubuntu xenial main
| # deb-src https://prodstack-cdo:<email address hidden>/canonical-XXX-service/canonical-XXX-health/ubuntu xenial main
| # deb-src https://prodstack-cdo:<email address hidden>/canonical-XXX-service/canonical-XXX-health/ubuntu xenial main
| # deb-src https://prodstack-cdo:<email address hidden>/canonical-XXX-service/canonical-XXX-health/ubuntu xenial main
As per the add-apt-repository man page[1], it says if you use the repository string ppa:... it will add the source to /etc/apt/sources.d but unfortunately digging into the code, it doesn't support private PPAs:
| class PPAShortcutHandler(object):
| def __init__(self, shortcut):
| super(PPAShortcutHandler, self).__init__()
| try:
| self.shortcut = mangle_ppa_shortcut(shortcut)
| except:
| raise ShortcutException(_("ERROR: '{shortcut}' is not a valid ppa format")
| .format(shortcut=shortcut))
| info = get_ppa_info(self.shortcut)
|
| if "private" in info and info["private"]:
| raise ShortcutException(
| _("Adding private PPAs is not supported currently"))
|
| self._info = info
Hi,
At present, the apt fetch.add_sources() uses 'add-apt- repository' to add defined install_sources. Unfortunately, for private PPAs, this causes issues with multiple sources added to /etc/apt/ sources. list (especially on change of key):
... archive. canonical. com/ubuntu xenial partner archive. canonical. com/ubuntu xenial partner /prodstack- cdo:<email address hidden> /canonical- XXX-service/ canonical- XXX-health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- is-sa/XXX- health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- is-sa/XXX- health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- is-sa/XXX- health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- XXX-service/ canonical- XXX-health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- XXX-service/ canonical- XXX-health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- XXX-service/ canonical- XXX-health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- XXX-service/ canonical- XXX-health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- XXX-service/ canonical- XXX-health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- XXX-service/ canonical- XXX-health/ ubuntu xenial main /prodstack- cdo:<email address hidden> /canonical- XXX-service/ canonical- XXX-health/ ubuntu xenial main
| # deb http://
| # deb-src http://
| deb https:/
| # deb-src https:/
| deb https:/
| # deb-src https:/
| deb https:/
| # deb-src https:/
| # deb-src https:/
| # deb-src https:/
| # deb-src https:/
| # deb-src https:/
| # deb-src https:/
As per the add-apt-repository man page[1], it says if you use the repository string ppa:... it will add the source to /etc/apt/sources.d but unfortunately digging into the code, it doesn't support private PPAs:
software- properties- 0.96.20. 4/softwareprope rties/ppa. py:
| class PPAShortcutHand ler(object) : utHandler, self).__init__() ppa_shortcut( shortcut) on(_("ERROR: '{shortcut}' is not a valid ppa format") shortcut= shortcut) ) info(self. shortcut)
| def __init__(self, shortcut):
| super(PPAShortc
| try:
| self.shortcut = mangle_
| except:
| raise ShortcutExcepti
| .format(
| info = get_ppa_
|
| if "private" in info and info["private"]:
| raise ShortcutException(
| _("Adding private PPAs is not supported currently"))
|
| self._info = info
Any chance we could update fetch.add_sources() to handle private PPAs properly and ship them out to /etc/apt/sources.d like we're already doing for cloud: and proposed:? manpages. ubuntu. com/manpages/ trusty/ en/man1/ add-apt- repository. 1.html# contenttoc3
[1]http://