Ejemplo n.º 1
0
 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()
Ejemplo n.º 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'))
Ejemplo n.º 3
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:
         print 'Indexing current directory.'
         index()
     else:
         print 'Indexing only a single directory supported.'
         return
     self.finalize()
Ejemplo n.º 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()
Ejemplo n.º 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)
Ejemplo n.º 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)