summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Heinlein <devel@glatzor.de>2012-06-06 12:26:44 +0200
committerSebastian Heinlein <devel@glatzor.de>2012-06-06 12:26:44 +0200
commit8d592cbbc8cab3407aa628579ed002ef8d7b8c4a (patch)
tree37c18079f98878e0cf3680eaee4edc3694fcea5e
parentc1abd02805bf19dab6183b1f22900877fd62f1e8 (diff)
downloadpython-apt-8d592cbbc8cab3407aa628579ed002ef8d7b8c4a.tar.gz
Add support for update and net-update
-rw-r--r--apt/auth.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/apt/auth.py b/apt/auth.py
index 255d7fd4..a999a7cf 100644
--- a/apt/auth.py
+++ b/apt/auth.py
@@ -130,6 +130,24 @@ def export_key(fingerprint):
"""
return _call_apt_key_script("export", fingerprint)
+def update():
+ """Update the local keyring with the archive keyring and remove from
+ the local keyring the archive keys which are no longer valid. The
+ archive keyring is shipped in the archive-keyring package of your
+ distribution, e.g. the debian-archive-keyring package in Debian.
+ """
+ return _call_apt_key_script("update")
+
+def net_update():
+ """Work similar to the update command above, but get the archive
+ keyring from an URI instead and validate it against a master key.
+ This requires an installed wget(1) and an APT build configured to
+ have a server to fetch from and a master keyring to validate. APT
+ in Debian does not support this command and relies on update
+ instead, but Ubuntu's APT does.
+ """
+ return _call_apt_key_script("net-update")
+
def list_keys():
"""Returns a list of TrustedKey instances for each key which is
used to trust repositories.