Add in an epoch_map

Allow the created epoch_map to start off from a configuration
value so that created packages (other than the core openstack
ones) can have an epoch set (flask seems to require this).

Change-Id: I3b0b23cf5dc99922bbe70c7095c3b5ceaad773b3
This commit is contained in:
Joshua Harlow
2014-05-05 13:45:39 -07:00
parent f96d1302e1
commit a44a60c419
2 changed files with 7 additions and 2 deletions

View File

@@ -90,8 +90,11 @@ class YumDependencyHandler(base.DependencyHandler):
@property
def py2rpm_helper(self):
epoch_map = dict([(name, self.OPENSTACK_EPOCH)
for name in self.python_names or []])
epoch_map = self.distro.get_dependency_config("epoch_map", quiet=True)
if not epoch_map:
epoch_map = {}
epoch_map.update(dict([(name, self.OPENSTACK_EPOCH)
for name in self.python_names or []]))
package_map = self.distro.get_dependency_config("package_map")
arch_dependent = self.distro.get_dependency_config("arch_dependent")
return py2rpm_helper.Helper(epoch_map=epoch_map,

View File

@@ -5,6 +5,8 @@ platform_pattern: redhat(.*)|centos(.*)
install_helper: anvil.packaging.yum:YumInstallHelper
dependency_handler:
name: anvil.packaging.yum:YumDependencyHandler
epoch_map:
flask: 2
package_map:
distribute: python-setuptools
django: Django