Comment 15 for bug 645404

Revision history for this message
Dan Streetman (ddstreet) wrote :

> * add-apt-repository should support logging in to launchpad and adding private ppas

added this functionality.

> * private PPAs should be added with auth.conf.d for the auth data

added this functionality.

still does not remove this auth data when the corresponding sources.list entry is removed.

> * to avoid having to login to launchpad on a server, something like:
>
> - add-apt-repository should gain a --stdin switch that contains lines of repositories with
> options

implemented standard '-' to read a line from stdin

> - add-apt-repository should gain a --remote/-r switch to specify a remote host, and do the auth
> locally and then run the --stdin one on the remote host.

implemented this as well, although I am not sure this is the best design. It will fail if the remote add-apt-repository isn't at a newer version (i.e. that supports the '-' param). Additionally, the gpg has to be manually added, since (for private ppas) that can't be queried without logging into lp, which is what the remote session is trying to avoid.

I think simply creating the resulting files - sourceparts, netrcparts, and trustedparts - on the remote system is going to be more reliable and simpler than using the remote system's installed add-apt-repository to try to process things into place. Calling apt-config on the remote system to gather the right directories to place the files should be simple; I think the hardest part will be figuring out how to do it without multiple subprocess runs to call ssh to 1) gather apt-config on the remote system and then 2) scp/sftp or ssh create-from-stdin the 3 files, and then 3) make sure they are the correct mode.