Deprecate map-packages, replaced by pkg-map
This patch writes a warning out to stderr to notify element authors that may be using map-packages to migrate to pkg-map. This patch also prints out a warning during image-create that lists the specific elements that are not using pkg-map. Change-Id: I7e2a7611dd5650815736ce998aa94a7833193d06
This commit is contained in:
parent
2337532954
commit
4178c0c69d
@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# dib-lint: disable=indent
|
||||
# dib-lint indent requirements causes issue with pep8
|
||||
|
||||
# Copyright 2013 SUSE Linux Products GmbH
|
||||
#
|
||||
@ -14,6 +16,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
|
||||
# Manually maintained for brevity; consider making this compiled from
|
||||
@ -57,6 +60,9 @@ package_map = {
|
||||
'openstack-neutron-openvswitch': 'openstack-neutron-openvswitch-agent',
|
||||
}
|
||||
|
||||
print("WARNING: map-packages is deprecated. Please use the pkg-map element.",
|
||||
file=sys.stderr)
|
||||
|
||||
for arg in sys.argv[1:]:
|
||||
print(package_map.get(arg, arg))
|
||||
sys.exit(0)
|
||||
|
@ -7,7 +7,7 @@ sudo mkdir -p $TMP_MOUNT_PATH/usr/share/pkg-map/
|
||||
for ELEMENT in $IMAGE_ELEMENT ; do
|
||||
for DIR in ${ELEMENTS_PATH//:/ }; do
|
||||
if [ -f "$DIR/$ELEMENT/pkg-map" ]; then
|
||||
sudo cp $DIR/$ELEMENT/pkg-map $TMP_MOUNT_PATH/usr/share/pkg-map/$ELEMENT
|
||||
sudo cp "$DIR/$ELEMENT/pkg-map" "$TMP_MOUNT_PATH/usr/share/pkg-map/$ELEMENT"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
@ -1,4 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
# dib-lint: disable=indent
|
||||
# dib-lint indent requirements causes issue with pep8
|
||||
|
||||
# Copyright 2012 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
@ -14,6 +16,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
|
||||
# Manually maintained for brevity; consider making this compiled from
|
||||
@ -80,6 +83,9 @@ package_map = {
|
||||
'openstack-neutron-dhcp-agent': 'openstack-neutron',
|
||||
}
|
||||
|
||||
print("WARNING: map-packages is deprecated. Please use the pkg-map element.",
|
||||
file=sys.stderr)
|
||||
|
||||
for arg in sys.argv[1:]:
|
||||
if arg not in package_map and arg.endswith('-dev'):
|
||||
# convert -dev into devel
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# dib-lint: disable=indent
|
||||
# dib-lint indent requirements causes issue with pep8
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
@ -13,6 +14,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
|
||||
# Manually maintained for brevity; consider making this compiled from
|
||||
@ -40,6 +42,9 @@ package_map = {
|
||||
'vlan': 'vconfig',
|
||||
}
|
||||
|
||||
print("WARNING: map-packages is deprecated. Please use the pkg-map element.",
|
||||
file=sys.stderr)
|
||||
|
||||
for arg in sys.argv[1:]:
|
||||
print(package_map.get(arg, arg))
|
||||
sys.exit(0)
|
||||
|
Loading…
Reference in New Issue
Block a user