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