Merge "Deprecate dib-python; remove from in-tree elements"
This commit is contained in:
commit
1291dcba51
@ -1,3 +1,2 @@
|
|||||||
debootstrap
|
debootstrap
|
||||||
dib-python
|
|
||||||
pkg-map
|
pkg-map
|
||||||
|
@ -73,13 +73,6 @@ to_install+="busybox sudo "
|
|||||||
# required for dpkg element to be able to add apt keys
|
# required for dpkg element to be able to add apt keys
|
||||||
to_install+="gnupg2 "
|
to_install+="gnupg2 "
|
||||||
|
|
||||||
if [ "$DIB_PYTHON_VERSION" == "2" ]; then
|
|
||||||
to_install+="python "
|
|
||||||
elif [ "$DIB_PYTHON_VERSION" == "3" ]; then
|
|
||||||
to_install+="python3 "
|
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
|
$apt_get install -y $to_install
|
||||||
|
@ -2,6 +2,11 @@
|
|||||||
dib-python
|
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
|
Adds a symlink to ``/usr/local/bin/dib-python`` which points at either a
|
||||||
``python2`` or ``python3`` executable as appropriate.
|
``python2`` or ``python3`` executable as appropriate.
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/local/bin/dib-python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2017 Red Hat, Inc.
|
# 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.
|
# Copyright 2014 Hewlett-Packard Development Company, L.P.
|
||||||
#
|
#
|
||||||
@ -14,8 +14,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
import locale
|
import locale
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
dib-python
|
|
||||||
install-bin
|
install-bin
|
||||||
pkg-map
|
pkg-map
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/local/bin/dib-python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
# Copyright 2014 Red Hat Inc.
|
# 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
|
# 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
|
# 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: disable=indent
|
||||||
# dib-lint indent requirements causes issue with pep8
|
# dib-lint indent requirements causes issue with pep8
|
||||||
|
|
||||||
@ -16,7 +16,6 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from __future__ import print_function
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# Manually maintained for brevity; consider making this compiled from
|
# 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 2012 Hewlett-Packard Development Company, L.P.
|
||||||
# Copyright 2014 Red Hat, Inc.
|
# Copyright 2014 Red Hat, Inc.
|
||||||
|
@ -56,17 +56,6 @@ if [ $DIB_RELEASE != "trusty" ] && [ $DIB_RELEASE != "xenial" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# default required
|
# default required
|
||||||
to_install+="busybox sudo " # dib-lint: safe_sudo
|
to_install+="busybox sudo python3 " # 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
|
|
||||||
|
|
||||||
$apt_get install -y $to_install
|
$apt_get install -y $to_install
|
||||||
|
@ -51,15 +51,6 @@ if [ $DIB_RELEASE != "trusty" ] && [ $DIB_RELEASE != "xenial" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# default required
|
# default required
|
||||||
to_install+="sudo " # dib-lint: safe_sudo
|
to_install+="sudo python3 " # 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
|
|
||||||
|
|
||||||
$apt_get install -y $to_install
|
$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