I need to add a ppa to remote servers using a python script. The bash equivalent of what I want to do is:
$ add-apt-repository ppa:user/ppa-name
I'm assuming it would look something like this:
import apt cache = apt.Cache() # ?? add the ppa here ?? cache.update() cache.open(None) cache['package_from_ppa'].mark_install() cache.upgrade() cache.commit()
but I haven't been able to find much in the apt module source related to adding repositories.