コード例 #1
0
    def supported(self):
        '''Overlay type supported?'''

        return require_supported([
            (self.command(), 'g-sorcery', 'app-portage/g-sorcery'),
            (self.backend, self.backend, 'app-portage/' + self.backend),
        ], self.output.warn)
コード例 #2
0
ファイル: api.py プロジェクト: dwfreed/layman
 def supported_types(self):
     """returns a dictionary of all repository types,
     with boolean values"""
     cmds = [x for x in self.config.keys() if '_command' in x]
     supported = {}
     for cmd in cmds:
         type_key = cmd.split('_')[0]
         supported[type_key] = require_supported(
             [(self.config[cmd],type_key, '')], self.output.warn)
     return supported
コード例 #3
0
    def is_supported(self):
        '''
        Determines if overlay type is supported.

        @rtype bool
        '''

        return require_supported([
            (self.command(), 'tar', 'app-arch/tar'),
        ], self.output.warn)
コード例 #4
0
ファイル: tar.py プロジェクト: dewey/layman
    def is_supported(self):
        '''
        Determines if overlay type is supported.

        @rtype bool
        '''

        return require_supported(
            [(self.command(),  'tar', 'app-arch/tar'), ],
            self.output.warn)
コード例 #5
0
ファイル: g_sorcery.py プロジェクト: dewey/layman
    def supported(self):
        '''Overlay type supported?'''

        return require_supported(
            [(self.command(),
             'g-sorcery',
             'app-portage/g-sorcery'),

             ('/usr/bin/' + self.backend,
              self.backend,
              'app-portage/' + self.backend),],

              self.output.warn)
コード例 #6
0
ファイル: api.py プロジェクト: wking/layman
    def supported_types(self):
        """returns a dictionary of all repository types,
        with boolean values"""
        here = os.path.dirname(os.path.realpath(__file__))
        modpath = os.path.join('overlays', 'modules')
        modules = os.listdir(os.path.join(here, modpath))

        cmds = [x for x in self.config.keys() if '_command' in x]
        supported = {}
        for cmd in cmds:
            type_key = cmd.split('_')[0]
            # The module dir might be named differently from the type_key.
            # ex.) g-common and g-sorcery are named g_common and g_sorcery.
            module = type_key.replace('-', '_')

            # Don't bother executing require_supported() if the user didn't
            # bring in support for the overlay type in the first place.
            if module in modules:
                supported[type_key] = require_supported(
                    [(self.config[cmd],type_key, '')], self.output.warn)
            else:
                supported[type_key] = False
        return supported
コード例 #7
0
    def supported_types(self):
        """returns a dictionary of all repository types,
        with boolean values"""
        here = os.path.dirname(os.path.realpath(__file__))
        modpath = os.path.join('overlays', 'modules')
        modules = os.listdir(os.path.join(here, modpath))

        cmds = [x for x in self.config.keys() if '_command' in x]
        supported = {}
        for cmd in cmds:
            type_key = cmd.split('_')[0]
            # The module dir might be named differently from the type_key.
            # ex.) g-common and g-sorcery are named g_common and g_sorcery.
            module = type_key.replace('-', '_')

            # Don't bother executing require_supported() if the user didn't
            # bring in support for the overlay type in the first place.
            if module in modules:
                supported[type_key] = require_supported(
                    [(self.config[cmd], type_key, '')], self.output.warn)
            else:
                supported[type_key] = False
        return supported
コード例 #8
0
    def supported(self):
        '''Overlay type supported?'''

        return require_supported([
            (self.command(), 'git', 'dev-vcs/git'),
        ], self.output.warn)
コード例 #9
0
ファイル: tar.py プロジェクト: jmesmon/layman
    def supported(self):
        '''Overlay type supported?'''

        return require_supported(
            [(self.command(),  'tar', 'app-arch/tar'), ],
            self.output.warn)
コード例 #10
0
ファイル: git.py プロジェクト: wking/layman
    def supported(self):
        '''Overlay type supported?'''

        return require_supported(
            [(self.command(),  'git', 'dev-vcs/git'),],
            self.output.warn)
コード例 #11
0
ファイル: rsync.py プロジェクト: dwfreed/layman
    def supported(self):
        '''Overlay type supported?'''

        return require_supported(
            [(self.command(),  'rsync', 'net-misc/rsync'),],
            self.output.warn)
コード例 #12
0
ファイル: svn.py プロジェクト: jmesmon/layman
    def supported(self):
        '''Overlay type supported?'''

        return require_supported(
            [(self.command(),  'svn','dev-vcs/subversion'),],
            self.output.warn)
コード例 #13
0
    def supported(self):
        '''Overlay type supported?'''

        return require_supported(
            [(self.command(),  'svn','dev-vcs/subversion'),],
            self.output.warn)
コード例 #14
0
    def supported(self):
        '''Overlay type supported?'''

        return require_supported([
            (self.command(), 'rsync', 'net-misc/rsync'),
        ], self.output.warn)