Deprecate dib-python; remove from in-tree elements
We are at the point that all distributions we are building have Python 3, so any tools running in the chroot can assume Python 3 exists. This makes dib-python redundant; mark it as deprecated and start to remove it from elements where it is no longer required. Change-Id: I5d852843ec65d3b04444b77c54c5b82424455cd8
This commit is contained in:
parent
4dbfab66a1
commit
8662297517
@ -1,3 +1,2 @@
|
||||
debootstrap
|
||||
dib-python
|
||||
pkg-map
|
||||
|
@ -73,13 +73,6 @@ to_install+="busybox sudo "
|
||||
# required for dpkg element to be able to add apt keys
|
||||
to_install+="gnupg2 "
|
||||
|
||||
if [ "$DIB_PYTHON_VERSION" == "2" ]; then
|
||||
to_install+="python "
|
||||
elif [ "$DIB_PYTHON_VERSION" == "3" ]; then
|
||||
to_install+="python3 "
|
||||
else
|
||||
echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$apt_get install -y $to_install
|
||||
|
@ -2,6 +2,11 @@
|
||||
dib-python
|
||||
==========
|
||||
|
||||
.. note::
|
||||
|
||||
This element is deprecated. All distributions support Python 3 so
|
||||
tools running in the chroot can simply use ``/usr/bin/python3``.
|
||||
|
||||
Adds a symlink to ``/usr/local/bin/dib-python`` which points at either a
|
||||
``python2`` or ``python3`` executable as appropriate.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/dib-python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2017 Red Hat, Inc.
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/dib-python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2014 Hewlett-Packard Development Company, L.P.
|
||||
#
|
||||
@ -14,8 +14,6 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import locale
|
||||
|
@ -1,3 +1,2 @@
|
||||
dib-python
|
||||
install-bin
|
||||
pkg-map
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/dib-python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2014 Red Hat Inc.
|
||||
#
|
||||
|
@ -1 +0,0 @@
|
||||
dib-python
|
@ -1 +0,0 @@
|
||||
dib-python
|
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/dib-python
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/dib-python
|
||||
#!/usr/bin/env python3
|
||||
# dib-lint: disable=indent
|
||||
# dib-lint indent requirements causes issue with pep8
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
# 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/local/bin/dib-python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2012 Hewlett-Packard Development Company, L.P.
|
||||
# Copyright 2014 Red Hat, Inc.
|
||||
|
@ -56,17 +56,6 @@ if [ $DIB_RELEASE != "trusty" ] && [ $DIB_RELEASE != "xenial" ]; then
|
||||
fi
|
||||
|
||||
# default required
|
||||
to_install+="busybox sudo " # dib-lint: safe_sudo
|
||||
# required for dpkg element to be able to add apt keys
|
||||
to_install+="gnupg2 "
|
||||
|
||||
if [ "$DIB_PYTHON_VERSION" == "2" ]; then
|
||||
to_install+="python "
|
||||
elif [ "$DIB_PYTHON_VERSION" == "3" ]; then
|
||||
to_install+="python3 "
|
||||
else
|
||||
echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3"
|
||||
exit 1
|
||||
fi
|
||||
to_install+="busybox sudo python3 " # dib-lint: safe_sudo
|
||||
|
||||
$apt_get install -y $to_install
|
||||
|
@ -51,15 +51,6 @@ if [ $DIB_RELEASE != "trusty" ] && [ $DIB_RELEASE != "xenial" ]; then
|
||||
fi
|
||||
|
||||
# default required
|
||||
to_install+="sudo " # dib-lint: safe_sudo
|
||||
|
||||
if [ "$DIB_PYTHON_VERSION" == "2" ]; then
|
||||
to_install+="python "
|
||||
elif [ "$DIB_PYTHON_VERSION" == "3" ]; then
|
||||
to_install+="python3 "
|
||||
else
|
||||
echo "ERROR: DIB_PYTHON_VERSION is '$DIB_PYTHON_VERSION' but needs to be 2 or 3"
|
||||
exit 1
|
||||
fi
|
||||
to_install+="sudo python3 " # dib-lint: safe_sudo
|
||||
|
||||
$apt_get install -y $to_install
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
The ``dib-python`` element is deprecated. In chroot Python tools
|
||||
should use ``#!/usrbin/env python3`` on all distributions now.
|
Loading…
Reference in New Issue
Block a user