Remove entry-point for element-info

This is really an internal dib tool.  Move it to the lib directory,
and call it with the python we are running under.

This is one less reason to require the virtualenv to be activated when
you run 'disk-image-create'.

Change-Id: Id689683a0b1fdcb446b04ba967284a216133d743
This commit is contained in:
Ian Wienand 2020-11-09 16:36:18 +11:00
parent f6315c9757
commit 6f73e123d0
3 changed files with 8 additions and 2 deletions

View File

@ -340,7 +340,7 @@ function arg_to_elements() {
# element=$i # element=$i
# path=${image_elements[$i] # path=${image_elements[$i]
# done # done
elinfo_out="$(element-info --env $IMAGE_ELEMENT)" elinfo_out="$(${DIB_PYTHON_EXEC} ${_LIB}/element-info.py --env ${IMAGE_ELEMENT})"
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR: element-info failed to expand elements." echo "ERROR: element-info failed to expand elements."
exit 1 exit 1

View File

@ -0,0 +1,7 @@
import sys
from diskimage_builder.element_dependencies import main
if __name__ == "__main__":
sys.exit(main())

View File

@ -32,7 +32,6 @@ data_files =
[entry_points] [entry_points]
console_scripts = console_scripts =
element-info = diskimage_builder.element_dependencies:main
dib-block-device = diskimage_builder.block_device.cmd:main dib-block-device = diskimage_builder.block_device.cmd:main
disk-image-create = diskimage_builder.disk_image_create:main disk-image-create = diskimage_builder.disk_image_create:main
ramdisk-image-create = diskimage_builder.disk_image_create:main ramdisk-image-create = diskimage_builder.disk_image_create:main