Is there any way without running:
sudo apt-add-repository [PPA]
That you can get the description (and possibly some other additional information) of a PPA through Terminal?
Is there any way without running:
sudo apt-add-repository [PPA]
That you can get the description (and possibly some other additional information) of a PPA through Terminal?
A quick hack (needs package python3-launchpadlib
):
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys,re
from launchpadlib.launchpad import Launchpad
import httplib2
import lazr.restfulclient.errors
if len(sys.argv) < 2:
print('Syntax: {cmd} ppa'.format(cmd=sys.argv[0]))
print()
print('For example: {cmd} ppa://diesch/testing'.format(cmd=sys.argv[0]))
sys.exit(2)
try:
lp = Launchpad.login_anonymously('foo', 'production', None)
except httplib2.HttpLib2Error as e:
print('Error connection to launchpad.net:', e)
sys.exit(1)
ppa_name = sys.argv[1].strip()
m = re.search(r'^(ppa:)?(?P<user>[^/]+)/(?P<name>.+)', ppa_name)
if m:
user, name = m.group('user', 'name')
else:
print('Unvalid PPA name:', ppa)
sys.exit(1)
try:
owner = lp.people[user]
ppa = owner.getPPAByName(name=name)
print('PPA {name} at {url}'.format(name=ppa_name, url=ppa.web_link))
print()
print('Owner: {owner} ({url})'.format(owner=owner.display_name,
url=owner.web_link))
print()
print(ppa.description)
except lazr.restfulclient.errors.RestfulError as e:
print('Error getting PPA info:', e)
exit(1)
Save this as e.g. ppa-info
, make it executable and run it like
ppa-info ppa:diesch/testing
If the PPA exists, you will get some information, like owner and description, otherwise you'll get an error message.
add-apt-repository
confirms addition of PPAs:
$ sudo add-apt-repository ppa:gnome3-team/gnome3
Before upgrading your system to a new Ubuntu release (i.e. from Ubuntu 14.04 to 14.10), you should probably run 'ppa-purge ppa:gnome3-team/gnome3' first.
*** You need to run 'sudo apt-get dist-upgrade' to avoid problems. ***
Please read the output before entering 'Y' to make sure important packages won't be removed.
=== Ubuntu 14.10 (Utopic) ===
GNOME 3.12 that didn't make it into the normal Ubuntu 14.10 repositories.
=== Ubuntu 14.04 (Trusty) ===
GNOME 3.10 that didn't make it into the normal Ubuntu 14.04 repositories.
=== Ubuntu 12.04 (Precise) ===
Parts of GNOME 3.4 that didn't make it into the normal Ubuntu 12.04 repositories.
=== Bugs ===
On Trusty (14.04) and newer please use 'ubuntu-bug' to report bugs against packages in this PPA
More info: https://launchpad.net/~gnome3-team/+archive/ubuntu/gnome3
Press [ENTER] to continue or ctrl-c to cancel adding it
^CTraceback (most recent call last):
File "/usr/bin/add-apt-repository", line 139, in <module>
sys.stdin.readline()
KeyboardInterrupt
$ sudo add-apt-repository ppa:ondrej/common
Lowest common denominator needed to build other packages, a.k.a. build essentials.
More info: https://launchpad.net/~ondrej/+archive/ubuntu/common
Press [ENTER] to continue or ctrl-c to cancel adding it
^CTraceback (most recent call last):
File "/usr/bin/add-apt-repository", line 139, in <module>
sys.stdin.readline()
KeyboardInterrupt
Therefore, the simplest way to get information for a PPA without adding it is to run add-apt-repository
, and press CtrlC.
add-apt-repository
get that information? Can't one get it the same way or is that what the accepted answer describes?