示例#1
0
文件: commands.py 项目: Tayyib/uludag
 def run(self):
     
     self.init()
     from pisi.api import index
     if len(self.args)>0:
         index(self.args, ctx.get_option('output'))
     elif len(self.args)==0:
         ctx.ui.info(_('Indexing current directory.'))
         index('.', ctx.get_option('output'))
     self.finalize()
示例#2
0
    def run(self):

        self.init(database = True, write = False)
        from pisi.api import index
        if len(self.args)>0:
            index(self.args, ctx.get_option('output'),
                  skip_sources = ctx.get_option('skip_sources'),
                  skip_signing = ctx.get_option('skip_signing'))
        elif len(self.args)==0:
            ctx.ui.info(_('Indexing current directory.'))
            index(['.'], ctx.get_option('output'),
                  skip_sources = ctx.get_option('skip_sources'),
                  skip_signing = ctx.get_option('skip_signing'))
示例#3
0
文件: commands.py 项目: Tayyib/uludag
 def run(self):
     
     self.init()
     from pisi.api import index
     if len(self.args)==1:
         index(self.args[0])
     elif len(self.args)==0:
         print 'Indexing current directory.'
         index()
     else:
         print 'Indexing only a single directory supported.'
         return
     self.finalize()
示例#4
0
    def run(self):

        self.init()
        from pisi.api import index

        if len(self.args) == 1:
            index(self.args[0])
        elif len(self.args) == 0:
            ctx.ui.info(_("Indexing current directory."))
            index()
        else:
            ctx.ui.info(_("Indexing only a single directory supported."))
            return
        self.finalize()
示例#5
0
    def run(self):
        self.init(database=True, write=False)

        from pisi.api import index
        from pisi.file import File

        ctypes = {"bz2": File.COMPRESSION_TYPE_BZ2,
                  "xz": File.COMPRESSION_TYPE_XZ}
        compression = 0
        for type_str in ctx.get_option("compression_types").split(","):
            compression |= ctypes.get(type_str, 0)

        index(self.args or ["."], ctx.get_option('output'),
              skip_sources=ctx.get_option('skip_sources'),
              skip_signing=ctx.get_option('skip_signing'),
              compression=compression)
示例#6
0
    def run(self):
        self.init(database=True, write=False)

        from pisi.api import index
        from pisi.file import File

        ctypes = {"bz2": File.COMPRESSION_TYPE_BZ2,
                  "xz": File.COMPRESSION_TYPE_XZ}
        compression = 0
        for type_str in ctx.get_option("compression_types").split(","):
            compression |= ctypes.get(type_str, 0)

        index(self.args or ["."], ctx.get_option('output'),
              skip_sources=ctx.get_option('skip_sources'),
              skip_signing=ctx.get_option('skip_signing'),
              compression=compression)