Avoid apt_pkg.
This commit is contained in:
parent
7bfa909c00
commit
efa2bdb894
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
import apt_pkg
|
|
||||||
import os
|
import os
|
||||||
from buildlog_consultant.apt import (
|
from buildlog_consultant.apt import (
|
||||||
find_apt_get_failure,
|
find_apt_get_failure,
|
||||||
|
@ -64,6 +63,7 @@ class AptManager(object):
|
||||||
root = getattr(self.session, "location", "/")
|
root = getattr(self.session, "location", "/")
|
||||||
status_path = os.path.join(root, "var/lib/dpkg/status")
|
status_path = os.path.join(root, "var/lib/dpkg/status")
|
||||||
missing = set(packages)
|
missing = set(packages)
|
||||||
|
import apt_pkg
|
||||||
with apt_pkg.TagFile(status_path) as tagf:
|
with apt_pkg.TagFile(status_path) as tagf:
|
||||||
while missing:
|
while missing:
|
||||||
tagf.step()
|
tagf.step()
|
||||||
|
|
Loading…
Add table
Reference in a new issue