list-installed komutunu yaptirt :)
This commit is contained in:
@@ -75,8 +75,8 @@ Legend:
|
||||
- extend XML specs to support that
|
||||
- cross-platform building support
|
||||
- non-interactive use
|
||||
- query
|
||||
- list of installed packages (eray)
|
||||
/ query
|
||||
+ list of installed packages (eray)
|
||||
- comar OM information (Provides)
|
||||
+ easy package preparation
|
||||
+ convert ebuild to pisi
|
||||
|
||||
+14
-1
@@ -11,6 +11,7 @@ def cmdObject(cmd, fail=False):
|
||||
"build": Build,
|
||||
"info": Info,
|
||||
"install": Install,
|
||||
"list-installed": ListInstalled,
|
||||
"remove": Remove,
|
||||
"index": Index,
|
||||
"updatedb": UpdateDB}
|
||||
@@ -29,7 +30,7 @@ class Command(object):
|
||||
"""generic help string for any command"""
|
||||
def __init__(self):
|
||||
# now for the real parser
|
||||
self.parser = OptionParser(usage="",
|
||||
self.parser = OptionParser(usage=usage_text,
|
||||
version="%prog " + pisi.__version__)
|
||||
self.options()
|
||||
self.parser = commonopts(self.parser)
|
||||
@@ -176,6 +177,18 @@ class Index(Command):
|
||||
print 'Indexing only a single directory supported'
|
||||
return
|
||||
|
||||
class ListInstalled(Command):
|
||||
"""list-installed: print a list of all installed packages
|
||||
usage: list-installed """
|
||||
|
||||
def __init__(self):
|
||||
super(ListInstalled, self).__init__()
|
||||
|
||||
def run(self):
|
||||
from pisi.installdb import installdb
|
||||
for pkg in installdb.list_installed():
|
||||
print pkg
|
||||
|
||||
class UpdateDB(Command):
|
||||
"""updatedb: update source and package databases"""
|
||||
def __init__(self):
|
||||
|
||||
@@ -7,6 +7,7 @@ build
|
||||
index
|
||||
info
|
||||
install
|
||||
list-installed
|
||||
remove
|
||||
updatedb
|
||||
|
||||
|
||||
@@ -9,10 +9,6 @@ import pisi.operations
|
||||
from pisi.purl import PUrl
|
||||
from common import *
|
||||
from commands import *
|
||||
# globals
|
||||
|
||||
|
||||
|
||||
|
||||
class ParserError(Exception):
|
||||
pass
|
||||
@@ -47,7 +43,6 @@ class PisiCLI(object):
|
||||
self.die()
|
||||
cmd = self.parser.rargs[0]
|
||||
|
||||
#print '*', cmd
|
||||
self.command = cmdObject(cmd)
|
||||
if not self.command:
|
||||
print "Unrecognized command: ", cmd
|
||||
|
||||
@@ -104,6 +104,5 @@ def build(pspecfile, authInfo=None):
|
||||
fs = SourceFetcher(url, authInfo)
|
||||
url.uri = fs.fetch_all()
|
||||
|
||||
# don't do the real job here. this is just a CLI!
|
||||
pb = PisiBuild(url.uri)
|
||||
pb.build()
|
||||
|
||||
Reference in New Issue
Block a user