Skip to content

Draft: aptworker: drop apt.auth and stub out functions using it for now #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions aptkit/worker/aptworker.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
from ConfigParser import ConfigParser

import apt
import apt.auth
import apt.cache
import apt.debfile
import apt_pkg
Expand Down Expand Up @@ -562,6 +561,10 @@ def add_vendor_key_from_keyserver(self, trans, keyid, keyserver):
keyserver - the keyserver (e.g. keyserver.ubuntu.com)
"""
log.info("Adding vendor key from keyserver: %s %s", keyid, keyserver)

if True:
return

# Perform some sanity checks
try:
res = urlsplit(keyserver)
Expand Down Expand Up @@ -602,6 +605,10 @@ def add_vendor_key_from_file(self, trans, path):
path -- absolute path to the key file
"""
log.info("Adding vendor key from file: %s", path)

if True:
return

trans.progress = 101
trans.status = STATUS_COMMITTING
with DaemonForkProgress(trans) as progress:
Expand All @@ -619,6 +626,10 @@ def remove_vendor_key(self, trans, fingerprint):
fingerprint -- fingerprint of the key to remove
"""
log.info("Removing vendor key: %s", fingerprint)

if True:
return

trans.progress = 101
trans.status = STATUS_COMMITTING
try:
Expand Down Expand Up @@ -1531,7 +1542,7 @@ def _get_popcon_participation(self):

def get_trusted_vendor_keys(self):
"""Return a list of trusted GPG keys."""
return [key.keyid for key in apt.auth.list_keys()]
return []


# vim:ts=4:sw=4:et