jw-pkg/src/python/jw/pkg/lib/distros/debian/Pkg.py

20 lines
526 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
from typing import Iterable
from argparse import Namespace
from ...Package import Package
from ...pm.dpkg import list_files, query_packages
from ...Cmd import Cmd
from ..BePkg import BePkg as Base
class Pkg(Base):
def __init__(self, parent: Cmd):
super().__init__(parent)
async def _files(self, name: str) -> Iterable[str]:
return await list_files(name)
async def _meta_data(self, names: Iterable[str]) -> Iterable[Package]:
return await query_packages(names)