Remove deprecated options
Options that are currently marked as deprecated do not have any effect anymore (other than printing warning). We should remove them and update the message so that we can mark options as deprecated even when they still work. Signed-off-by: Ondrej Nosek <onosek@redhat.com>
This commit is contained in:
parent
2bd3b85bb7
commit
91ee1fb854
@ -480,8 +480,6 @@ Options
|
||||
(*bool*) -- whether to run the buildinstall phase
|
||||
**buildinstall_method**
|
||||
(*str*) -- "lorax" (f16+, rhel7+) or "buildinstall" (older releases)
|
||||
**buildinstall_upgrade_image** [deprecated]
|
||||
(*bool*) -- use ``noupgrade`` with ``lorax_options`` instead
|
||||
**lorax_options**
|
||||
(*list*) -- special options passed on to *lorax*.
|
||||
|
||||
@ -589,14 +587,6 @@ Options
|
||||
``python-multilib`` library. Please refer to ``multilib`` option to see the
|
||||
differences.
|
||||
|
||||
**multilib_methods** [deprecated]
|
||||
([*str*]) -- use ``multilib`` instead to configure this per-variant
|
||||
|
||||
**multilib_arches** [deprecated]
|
||||
([*str*] or None) -- use ``multilib`` to implicitly configure this: if a
|
||||
variant on any arch has non-empty multilib methods, it is automatically
|
||||
eligible
|
||||
|
||||
**multilib**
|
||||
(*list*) -- mapping of variant regexes and arches to list of multilib
|
||||
methods
|
||||
@ -1038,11 +1028,6 @@ Live Images Settings
|
||||
is ``appliance`` corresponding to ``koji spin-appliance``.
|
||||
* ``sign`` (*bool*) -- only RPM-wrapped images can be signed
|
||||
|
||||
Deprecated options:
|
||||
|
||||
* ``additional_repos`` -- deprecated, use ``repo`` instead
|
||||
* ``repo_from`` -- deprecated, use ``repo`` instead
|
||||
|
||||
**live_images_no_rename**
|
||||
(*bool*) -- When set to ``True``, filenames generated by Koji will be used.
|
||||
When ``False``, filenames will be generated based on ``image_name_format``
|
||||
@ -1079,10 +1064,6 @@ Live Media Settings
|
||||
* ``title`` (*str*)
|
||||
* ``install_tree_from`` (*str*) -- variant to take install tree from
|
||||
|
||||
Deprecated options:
|
||||
|
||||
* ``repo_from`` -- deprecated, use ``repo`` instead
|
||||
|
||||
|
||||
Image Build Settings
|
||||
====================
|
||||
@ -1236,13 +1217,6 @@ repository with a new commit.
|
||||
* ``tag_ref`` -- (*bool*, default ``True``) If set to ``False``, a git
|
||||
reference will not be created.
|
||||
|
||||
Deprecated options:
|
||||
|
||||
* ``repo_from`` -- Deprecated, use ``repo`` instead.
|
||||
* ``source_repo_from`` -- Deprecated, use ``repo`` instead.
|
||||
* ``extra_source_repos`` -- Deprecated, use ``repo`` instead.
|
||||
|
||||
|
||||
|
||||
Example config
|
||||
--------------
|
||||
@ -1306,10 +1280,6 @@ an OSTree repository. This always runs in Koji as a ``runroot`` task.
|
||||
``template_repo`` needs to point to a Git repository from which to take the
|
||||
templates.
|
||||
|
||||
Deprecated options:
|
||||
|
||||
* ``repo_from`` -- Deprecated, use ``repo`` instead.
|
||||
* ``source_repo_from`` -- Deprecated, use ``repo`` instead.
|
||||
|
||||
Example config
|
||||
--------------
|
||||
|
@ -55,7 +55,7 @@ packages above as they are used by calling an executable. ::
|
||||
$ for pkg in _deltarpm krbV _selinux deltarpm sqlitecachec _sqlitecache; do ln -vs "$(deactivate && python -c 'import os, '$pkg'; print '$pkg'.__file__')" "$(virtualenvwrapper_get_site_packages_dir)"; done
|
||||
$ pip install -U pip
|
||||
$ PYCURL_SSL_LIBRARY=nss pip install pycurl --no-binary :all:
|
||||
$ pip install jsonschema kobo lockfile lxml mock nose nose-cov productmd pyopenssl python-multilib requests setuptools sphinx
|
||||
$ pip install jsonschema kobo==0.60 lockfile lxml mock nose nose-cov productmd pyopenssl python-multilib requests setuptools sphinx
|
||||
|
||||
Now you should be able to run all existing tests.
|
||||
|
||||
|
@ -3,7 +3,7 @@ Config file format
|
||||
==================
|
||||
|
||||
The configuration file parser is provided by `kobo
|
||||
<https://github.io/release-engineering/kobo>`_
|
||||
<https://github.com/release-engineering/kobo>`_
|
||||
|
||||
The file follows a Python-like format. It consists of a sequence of variables
|
||||
that have a value assigned to them. ::
|
||||
|
@ -464,11 +464,7 @@ def make_schema():
|
||||
"subvariant": {"type": "string"},
|
||||
"target": {"type": "string"},
|
||||
"version": {"type": "string"},
|
||||
"repo": {
|
||||
"$ref": "#/definitions/repos",
|
||||
"alias": "additional_repos",
|
||||
"append": "repo_from",
|
||||
},
|
||||
"repo": {"$ref": "#/definitions/repos"},
|
||||
"specfile": {"type": "string"},
|
||||
"scratch": {"type": "boolean"},
|
||||
"type": {"type": "string"},
|
||||
@ -857,10 +853,7 @@ def make_schema():
|
||||
"name": {"type": "string"},
|
||||
"subvariant": {"type": "string"},
|
||||
"title": {"type": "string"},
|
||||
"repo": {
|
||||
"$ref": "#/definitions/repos",
|
||||
"append": "repo_from",
|
||||
},
|
||||
"repo": {"$ref": "#/definitions/repos"},
|
||||
"target": {"type": "string"},
|
||||
"arches": {"$ref": "#/definitions/list_of_strings"},
|
||||
"failable": {"$ref": "#/definitions/list_of_strings"},
|
||||
@ -887,11 +880,7 @@ def make_schema():
|
||||
"properties": {
|
||||
"treefile": {"type": "string"},
|
||||
"config_url": {"type": "string"},
|
||||
"repo": {
|
||||
"$ref": "#/definitions/repos",
|
||||
"alias": "extra_source_repos",
|
||||
"append": ["repo_from", "source_repo_from"],
|
||||
},
|
||||
"repo": {"$ref": "#/definitions/repos"},
|
||||
"keep_original_sources": {"type": "boolean"},
|
||||
"ostree_repo": {"type": "string"},
|
||||
"arches": {"$ref": "#/definitions/list_of_strings"},
|
||||
@ -935,10 +924,7 @@ def make_schema():
|
||||
"ostree_installer": _variant_arch_mapping({
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repo": {
|
||||
"$ref": "#/definitions/repos",
|
||||
"append": ["repo_from", "source_repo_from"],
|
||||
},
|
||||
"repo": {"$ref": "#/definitions/repos"},
|
||||
"release": {"$ref": "#/definitions/optional_string"},
|
||||
"failable": {"$ref": "#/definitions/list_of_strings"},
|
||||
"installpkgs": {"$ref": "#/definitions/list_of_strings"},
|
||||
@ -1073,29 +1059,6 @@ def make_schema():
|
||||
"gather_lookaside_repos": _variant_arch_mapping({
|
||||
"$ref": "#/definitions/strings",
|
||||
}),
|
||||
|
||||
# Deprecated options
|
||||
"multilib_arches": {
|
||||
"deprecated": "use multilib instead"
|
||||
},
|
||||
"multilib_methods": {
|
||||
"deprecated": "use multilib instead"
|
||||
},
|
||||
"additional_packages_multiarch": {
|
||||
"deprecated": "use multilib_whitelist instead"
|
||||
},
|
||||
"filter_packages_multiarch": {
|
||||
"deprecated": "use multilib_blacklist instead"
|
||||
},
|
||||
"buildinstall_upgrade_image": {
|
||||
"deprecated": "use lorax_options instead"
|
||||
},
|
||||
"pkgset_koji_path_prefix": {
|
||||
"deprecated": "use koji_profile instead",
|
||||
},
|
||||
"pkgset_koji_url": {
|
||||
"deprecated": "use koji_profile instead",
|
||||
},
|
||||
},
|
||||
|
||||
"required": ["release_name", "release_short", "release_version",
|
||||
|
@ -23,9 +23,6 @@ from ..wrappers import lorax
|
||||
|
||||
class Installer(OSTree):
|
||||
def _merge_config(self, config):
|
||||
if config.get("source_repo_from", None):
|
||||
self.sources.extend([config.get("source_repo_from")])
|
||||
|
||||
self.installpkgs.extend(config.get('installpkgs', []))
|
||||
self.add_template.extend(config.get("add_template", []))
|
||||
self.add_template_var.extend(config.get("add_template_var"))
|
||||
|
@ -9,7 +9,8 @@ import sys
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
|
||||
|
||||
from pungi.arch import *
|
||||
from pungi.arch import (get_compatible_arches, get_valid_arches, get_valid_multilib_arches,
|
||||
is_excluded, is_valid_arch, split_name_arch)
|
||||
|
||||
|
||||
class MockArchModule(object):
|
||||
@ -110,7 +111,7 @@ class TestArch(unittest.TestCase):
|
||||
self.assertEqual(split_name_arch("package"), ("package", None))
|
||||
self.assertEqual(split_name_arch("package.x86_64"), ("package", "x86_64"))
|
||||
self.assertEqual(split_name_arch("package.foo"), ("package.foo", None))
|
||||
self.assertEqual(split_name_arch("i386"), ("i386", None)) # we suppose that $name is never empty
|
||||
self.assertEqual(split_name_arch("i386"), ("i386", None)) # we suppose that $name is never empty
|
||||
|
||||
def test_get_valid_multilib_arches(self):
|
||||
self.assertEqual(get_valid_multilib_arches("noarch"), [])
|
||||
|
@ -200,17 +200,6 @@ class BuildinstallConfigTestCase(ConfigTestCase):
|
||||
[checks.CONFLICTS.format('buildinstall_method', 'None', 'lorax_options'),
|
||||
checks.CONFLICTS.format('buildinstall_method', 'None', 'buildinstall_kickstart')])
|
||||
|
||||
def test_deprecated(self):
|
||||
cfg = load_config(
|
||||
PKGSET_REPOS,
|
||||
buildinstall_upgrade_image=True,
|
||||
)
|
||||
|
||||
self.assertValidation(
|
||||
cfg, [],
|
||||
[checks.REMOVED.format('buildinstall_upgrade_image', 'use lorax_options instead')]
|
||||
)
|
||||
|
||||
|
||||
class CreaterepoConfigTestCase(ConfigTestCase):
|
||||
def test_validate_minimal_pkgset_koji(self):
|
||||
|
@ -342,7 +342,7 @@ class TestLiveMediaPhase(PungiTestCase):
|
||||
'ksurl': 'git://example.com/repo.git',
|
||||
'name': 'Fedora Server Live',
|
||||
'version': 'Rawhide',
|
||||
'repo_from': 'Missing',
|
||||
'repo': 'Missing',
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -370,8 +370,7 @@ class TestLiveMediaPhase(PungiTestCase):
|
||||
'scratch': True,
|
||||
'skip_tag': True,
|
||||
'title': 'Custom Title',
|
||||
'repo_from': ['Everything', 'Server-optional'],
|
||||
'repo': ['http://example.com/extra_repo'],
|
||||
'repo': ['http://example.com/extra_repo', 'Everything', 'Server-optional'],
|
||||
'arches': ['x86_64'],
|
||||
'ksversion': '24',
|
||||
'release': None,
|
||||
|
@ -318,7 +318,7 @@ class OstreeInstallerScriptTest(helpers.PungiTestCase):
|
||||
def test_run_with_extra_config_file(self, run):
|
||||
extra_config_file = os.path.join(self.topdir, 'extra_config.json')
|
||||
helpers.touch(extra_config_file,
|
||||
json.dumps({'source_repo_from': 'http://www.example.com/another/repo',
|
||||
json.dumps({'repo': 'http://www.example.com/another/repo',
|
||||
'installpkgs': ['dummy-foo', 'dummy-bar'],
|
||||
'add_template': ['/path/to/lorax.tmpl'],
|
||||
'add_template_var': ['ostree_osname=dummy-atomic',
|
||||
@ -345,7 +345,6 @@ class OstreeInstallerScriptTest(helpers.PungiTestCase):
|
||||
'--version=1.0',
|
||||
'--release=20160101.t.0',
|
||||
'--source=http://www.example.com/dummy/repo',
|
||||
'--source=http://www.example.com/another/repo',
|
||||
'--variant=dummy',
|
||||
'--nomacboot',
|
||||
'--isfinal',
|
||||
|
Loading…
Reference in New Issue
Block a user