Allow to specify an empty package list in pkg_map
An empty package list can be provided in a pkg_map file for those cases were there is no need to install the package. Change-Id: I0df8c6848ec4ac9e0f90790f14e8eb5399650339
This commit is contained in:
parent
f303b6546c
commit
fecbb03e54
@ -23,8 +23,10 @@ Provides the following:
|
|||||||
+ suse: includes the opensuse distro
|
+ suse: includes the opensuse distro
|
||||||
|
|
||||||
The most specific section takes priority.
|
The most specific section takes priority.
|
||||||
|
An empty package list can be provided.
|
||||||
Example for Nova and Glance (NOTE: using fictitious package names
|
Example for Nova and Glance (NOTE: using fictitious package names
|
||||||
for Fedora to provide a good example!)
|
for Fedora and package mapping for suse family to provide a good
|
||||||
|
example!)
|
||||||
|
|
||||||
Example format:
|
Example format:
|
||||||
{
|
{
|
||||||
@ -38,6 +40,9 @@ Provides the following:
|
|||||||
"redhat": {
|
"redhat": {
|
||||||
"nova_package": "openstack-nova",
|
"nova_package": "openstack-nova",
|
||||||
"glance_package": "openstack-glance"
|
"glance_package": "openstack-glance"
|
||||||
|
},
|
||||||
|
"suse": {
|
||||||
|
"nova_package": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
@ -60,6 +65,10 @@ Provides the following:
|
|||||||
|
|
||||||
Returns: nova
|
Returns: nova
|
||||||
|
|
||||||
|
pkg-map --element nova-compute --distro opensuse nova_package
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
* This output can be used to filter what other tools actually install
|
* This output can be used to filter what other tools actually install
|
||||||
(install-packages can be modified to use this for example)
|
(install-packages can be modified to use this for example)
|
||||||
|
|
||||||
|
@ -60,7 +60,9 @@ def main():
|
|||||||
|
|
||||||
# Parse mapping data in this form using distro/family/default
|
# Parse mapping data in this form using distro/family/default
|
||||||
# Most specific takes priority (distro is most specific).
|
# Most specific takes priority (distro is most specific).
|
||||||
# Example for Nova and Glance (using fictitious name for Fedora)
|
# An empty package list can be provided.
|
||||||
|
# Example for Nova and Glance (using fictitious name for Fedora and SUSE
|
||||||
|
# and package mapping for SUSE family)
|
||||||
# {
|
# {
|
||||||
# "distro": {
|
# "distro": {
|
||||||
# "fedora": {
|
# "fedora": {
|
||||||
@ -72,7 +74,10 @@ def main():
|
|||||||
# "redhat": {
|
# "redhat": {
|
||||||
# "nova_package": "openstack-nova",
|
# "nova_package": "openstack-nova",
|
||||||
# "glance_package": "openstack-glance"
|
# "glance_package": "openstack-glance"
|
||||||
# }
|
# },
|
||||||
|
# "suse": {
|
||||||
|
# "nova_package": ""
|
||||||
|
# }
|
||||||
# },
|
# },
|
||||||
# "default": {
|
# "default": {
|
||||||
# "nova_package": "nova",
|
# "nova_package": "nova",
|
||||||
@ -92,6 +97,8 @@ def main():
|
|||||||
pkg_name = name_map.get(name)
|
pkg_name = name_map.get(name)
|
||||||
if pkg_name:
|
if pkg_name:
|
||||||
print(pkg_name)
|
print(pkg_name)
|
||||||
|
elif name in name_map:
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
err_msg = 'Missing package name for distro/element: %s/%s'
|
err_msg = 'Missing package name for distro/element: %s/%s'
|
||||||
print(err_msg % (args.distro, args.element))
|
print(err_msg % (args.distro, args.element))
|
||||||
|
Loading…
Reference in New Issue
Block a user