コード例 #1
0
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.command = None
     if sysutils.which('dnf') is not None:
         self.command = 'dnf'
     elif sysutils.which('yum') is not None:
         self.command = 'yum'
コード例 #2
0
ファイル: pip.py プロジェクト: yiqishangxuequ/pybombs
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.cmd = detect_pip_exe()
     if self.cmd:
         self.log.debug("Using pip executable: %s", self.cmd)
     else:
         self.log.debug(" pip executable not found.")
コード例 #3
0
ファイル: yum.py プロジェクト: NinjaComics/pybombs
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.command = None
     if sysutils.which('dnf') is not None:
         self.command = 'dnf'
     elif sysutils.which('yum') is not None:
         self.command = 'yum'
コード例 #4
0
ファイル: zypper.py プロジェクト: gnuradio/pybombs
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.command = None
     if sysutils.which('zypper') is not None:
         self.command = 'zypper'
     if sysutils.which('rpm') is not None:
         self.fastcommand = 'rpm'
     else:
         self.fastcommand = None
コード例 #5
0
ファイル: zypper.py プロジェクト: ferhat1234/proje
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.command = None
     if sysutils.which('zypper') is not None:
         self.command = 'zypper'
     if sysutils.which('rpm') is not None:
         self.fastcommand = 'rpm'
     else:
         self.fastcommand = None
コード例 #6
0
ファイル: portage.py プロジェクト: gr-sp/pybombs
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.available = False
     try:
         from _emerge import search
         from _emerge import actions
         from _emerge.actions import load_emerge_config
         self.portage = __import__('portage')
         self.re = __import__('re')
         emerge_config = load_emerge_config()
         self.root_config = emerge_config.running_config
         # search init args:
         # (self,root_config,spinner,searchdesc,verbose,usepkg,usepkgconly,search_index=True)
         self.search = search.search(self.root_config,False,False,False,True,False)
         self.search._vardb.cp_all()
         self.available = True
     except ImportError :
         self.available = False
コード例 #7
0
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.available = False
     try:
         from _emerge import search
         from _emerge import actions
         from _emerge.actions import load_emerge_config
         self.portage = __import__('portage')
         self.re = __import__('re')
         emerge_config = load_emerge_config()
         self.root_config = emerge_config.running_config
         # search init args:
         # (self,root_config,spinner,searchdesc,verbose,usepkg,usepkgconly,search_index=True)
         self.search = search.search(self.root_config,False,False,False,True,False)
         self.search._vardb.cp_all()
         self.available = True
     except ImportError :
         self.available = False
コード例 #8
0
    def __init__(self, logger):
        ExternPackager.__init__(self, logger)
        if sysutils.which('apt') is not None:
            self.getcmd = 'apt'
            self.searchcmd = 'apt'
        else:
            self.getcmd = 'apt'
            self.searchcmd = 'apt-cache'

        try:
            import apt
            self.cache = apt.Cache()
        except (ImportError, AttributeError):
            # ImportError is caused by apt being completely missing
            # AttributeError is caused by us importing ourselves (we have no
            #   Cache() method) because python-apt is missing and we got a
            #   relative import instead
            self.log.info("Install python-apt to speed up apt processing.")
            self.cache = None
コード例 #9
0
ファイル: apt.py プロジェクト: ckuethe/pybombs
    def __init__(self, logger):
        ExternPackager.__init__(self, logger)
        if sysutils.which('apt') is not None:
            self.getcmd = 'apt'
            self.searchcmd = 'apt'
        else:
            self.getcmd = 'apt'
            self.searchcmd = 'apt-cache'

        try:
            import apt
            self.cache = apt.Cache()
        except (ImportError, AttributeError):
            # ImportError is caused by apt being completely missing
            # AttributeError is caused by us importing ourselves (we have no
            #   Cache() method) because python-apt is missing and we got a
            #   relative import instead
            self.log.info("Install python-apt to speed up apt processing.")
            self.cache = None
コード例 #10
0
ファイル: apt.py プロジェクト: ClassOdUa/pybombs
    def __init__(self, logger):
        ExternPackager.__init__(self, logger)
        # if sysutils.which('apt') is not None:
        if False: # To re-enable apt, replace this line with the one above (also need to change something further down)
            self.getcmd = 'apt'
            self.searchcmd = 'apt'
        else:
            self.getcmd = 'apt-get'
            self.searchcmd = 'apt-cache'

        try:
            import apt
            self.cache = apt.Cache()
        except (ImportError, AttributeError):
            # ImportError is caused by apt being completely missing
            # AttributeError is caused by us importing ourselves (we have no
            #   Cache() method) because python-apt is missing and we got a
            #   relative import instead
            self.log.info("Install python-apt to speed up apt processing.")
            self.cache = None
コード例 #11
0
    def __init__(self, logger):
        ExternPackager.__init__(self, logger)
        # if sysutils.which('apt') is not None:
        if False: # To re-enable apt, replace this line with the one above (also need to change something further down)
            self.getcmd = 'apt'
            self.searchcmd = 'apt'
        else:
            self.getcmd = 'apt-get'
            self.searchcmd = 'apt-cache'

        try:
            import apt
            self.cache = apt.Cache()
        except (ImportError, AttributeError):
            # ImportError is caused by apt being completely missing
            # AttributeError is caused by us importing ourselves (we have no
            #   Cache() method) because python-apt is missing and we got a
            #   relative import instead
            self.log.info("Install python-apt to speed up apt processing.")
            self.cache = None
コード例 #12
0
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
コード例 #13
0
ファイル: pacman.py プロジェクト: gnuradio/pybombs
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.command = None
     if sysutils.which('pacman') is not None:
         self.command = 'pacman'
コード例 #14
0
ファイル: aptget.py プロジェクト: marcusmueller/pybombs
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
コード例 #15
0
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.command = None
     if sysutils.which('pacman') is not None:
         self.command = 'pacman'
コード例 #16
0
ファイル: pip.py プロジェクト: yueyz818/pybombs
 def __init__(self, logger):
     ExternPackager.__init__(self, logger)
     self.cmd = detect_pip_exe()
     assert self.cmd
     self.log.debug("Using pip executable: %s", self.cmd)