コード例 #1
0
ファイル: rhel6.py プロジェクト: hagleitn/Openstack-Devstack2
 def _remove_special(self, name, info):
     if name in RHEL_RELINKS:
         # Note: we don't return true here so that
         # the normal package cleanup happens...
         (_, tgt) = RHEL_RELINKS.get(name)
         if sh.islink(tgt):
             sh.unlink(tgt)
     return False
コード例 #2
0
 def _remove_special(self, name, info):
     if name in RHEL_RELINKS:
         # Note: we don't return true here so that
         # the normal package cleanup happens...
         (_, tgt) = RHEL_RELINKS.get(name)
         if sh.islink(tgt):
             sh.unlink(tgt)
     return False
コード例 #3
0
 def _remove(self, pkg):
     response = yum.YumPackager._remove(self, pkg)
     if response:
         options = pkg.get('packager_options', {})
         links = options.get('links', [])
         for (_, tgt) in links:
             if sh.islink(tgt):
                 sh.unlink(tgt)
     return response
コード例 #4
0
 def _remove(self, pkg):
     response = yum.YumPackager._remove(self, pkg)
     if response:
         options = pkg.get("packager_options", {})
         links = options.get("links", [])
         for (_, tgt) in links:
             if sh.islink(tgt):
                 sh.unlink(tgt)
     return response
コード例 #5
0
 def _install_rhel_relinks(self, pkgname, pkginfo):
     full_pkg_name = self._format_pkg_name(pkgname, pkginfo.get("version"))
     install_cmd = YUM_CMD + YUM_INSTALL + [full_pkg_name]
     self._execute_yum(install_cmd)
     tgt = RHEL_RELINKS.get(pkgname).get("tgt")
     src = RHEL_RELINKS.get(pkgname).get("src")
     if not sh.islink(tgt):
         # This is actually a feature, EPEL must not conflict with RHEL, so X pkg installs newer version in parallel.
         #
         # This of course doesn't work when running from git like devstack does....
         sh.symlink(src, tgt)
     return True
コード例 #6
0
 def install(self, pkg):
     yum.YumPackager.install(self, pkg)
     options = pkg.get('packager_options', {})
     links = options.get('links', [])
     for src, tgt in links:
         if not sh.islink(tgt):
             # This is actually a feature, EPEL must not conflict
             # with RHEL, so X pkg installs newer version in
             # parallel.
             #
             # This of course doesn't work when running from git
             # like devstack does....
             sh.symlink(src, tgt)
     return True
コード例 #7
0
ファイル: rhel6.py プロジェクト: hagleitn/Openstack-Devstack2
 def _install_special(self, name, info):
     if name in RHEL_RELINKS:
         full_pkg_name = self._format_pkg_name(name, info.get("version"))
         install_cmd = yum.YUM_INSTALL + [full_pkg_name]
         self._execute_yum(install_cmd)
         (src, tgt) = RHEL_RELINKS.get(name)
         if not sh.islink(tgt):
             # This is actually a feature, EPEL must not conflict with RHEL, so X pkg installs newer version in parallel.
             #
             # This of course doesn't work when running from git like devstack does....
             sh.symlink(src, tgt)
         return True
     else:
         return False
コード例 #8
0
 def _install_special(self, name, info):
     if name in RHEL_RELINKS:
         full_pkg_name = self._format_pkg_name(name, info.get("version"))
         install_cmd = yum.YUM_INSTALL + [full_pkg_name]
         self._execute_yum(install_cmd)
         (src, tgt) = RHEL_RELINKS.get(name)
         if not sh.islink(tgt):
             # This is actually a feature, EPEL must not conflict with RHEL, so X pkg installs newer version in parallel.
             #
             # This of course doesn't work when running from git like devstack does....
             sh.symlink(src, tgt)
         return True
     else:
         return False
コード例 #9
0
 def install(self, pkg):
     yum.YumPackager.install(self, pkg)
     options = pkg.get("packager_options", {})
     links = options.get("links", [])
     for src, tgt in links:
         if not sh.islink(tgt):
             # This is actually a feature, EPEL must not conflict
             # with RHEL, so X pkg installs newer version in
             # parallel.
             #
             # This of course doesn't work when running from git
             # like devstack does....
             sh.symlink(src, tgt)
     return True