* pisi list-available -c system.kernel.drivers
pisi does not support recursive traversion of components yet.
This commit is contained in:
@@ -23,7 +23,6 @@ import pisi.context as ctx
|
|||||||
from pisi.uri import URI
|
from pisi.uri import URI
|
||||||
import pisi.util as util
|
import pisi.util as util
|
||||||
import pisi.api as api
|
import pisi.api as api
|
||||||
import pisi.packagedb as packagedb
|
|
||||||
from colors import colorize
|
from colors import colorize
|
||||||
|
|
||||||
class Error(pisi.Error):
|
class Error(pisi.Error):
|
||||||
@@ -1163,6 +1162,8 @@ all repositories.
|
|||||||
group = OptionGroup(self.parser, _("list-available options"))
|
group = OptionGroup(self.parser, _("list-available options"))
|
||||||
group.add_option("-l", "--long", action="store_true",
|
group.add_option("-l", "--long", action="store_true",
|
||||||
default=False, help=_("show in long format"))
|
default=False, help=_("show in long format"))
|
||||||
|
group.add_option("-c", "--component", action="store",
|
||||||
|
default=None, help=_("list available packages under given component"))
|
||||||
group.add_option("-U", "--uninstalled", action="store_true",
|
group.add_option("-U", "--uninstalled", action="store_true",
|
||||||
default=False, help=_("show uninstalled packages only"))
|
default=False, help=_("show uninstalled packages only"))
|
||||||
self.parser.add_option_group(group)
|
self.parser.add_option_group(group)
|
||||||
@@ -1185,8 +1186,11 @@ all repositories.
|
|||||||
self.finalize()
|
self.finalize()
|
||||||
|
|
||||||
def print_packages(self, repo):
|
def print_packages(self, repo):
|
||||||
from pisi import packagedb
|
|
||||||
|
|
||||||
|
component = ctx.get_option('component')
|
||||||
|
if component:
|
||||||
|
list = ctx.componentdb.get_component(component, repo).packages
|
||||||
|
else:
|
||||||
list = ctx.packagedb.list_packages(repo)
|
list = ctx.packagedb.list_packages(repo)
|
||||||
installed_list = ctx.installdb.list_installed()
|
installed_list = ctx.installdb.list_installed()
|
||||||
list.sort()
|
list.sort()
|
||||||
|
|||||||
Reference in New Issue
Block a user