[FIX] packaging: remove dead code that prevent rpm build
Since 9c2ce1f12c2, more files are included in packaging. The rpm build failed because shebang lines of packaged files must not use `/usr/bin/env` [0] [1] [2]. As it seems that those old files are not of any use anymore, this commit removes them. [0] https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shebang_lines [1] https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Multiple_Python_Runtimes [2] https://pagure.io/packaging-committee/issue/738 closes odoo/odoo#67294 X-original-commit: 54b6a7a97e574249c22f16ea2756989e4bd4fac3 Signed-off-by: Raphael Collet (rco) <rco@openerp.com> Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
import time
|
||||
|
||||
import odoo
|
||||
|
||||
odoo.tools.config.parse_config(sys.argv[1:])
|
||||
config = odoo.tools.config
|
||||
|
||||
for name in [
|
||||
'db_name',
|
||||
'addons_path',
|
||||
'demo',
|
||||
'osv_memory_count_limit',
|
||||
'osv_memory_age_limit',
|
||||
]:
|
||||
print "%s: %s - %s" % (name, config[name], type(config[name]))
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
[options]
|
||||
osv_memory_count_limit = 5
|
||||
transient_age_limit = 3.4
|
||||
@@ -1,46 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
""" Tests for the configuration file/command-line arguments. """
|
||||
|
||||
# This test should be run from its directory.
|
||||
|
||||
# TODO A configmanager object cannot parse multiple times a config file
|
||||
# and/or the command line, preventing to 'reload' a configuration.
|
||||
|
||||
import os
|
||||
|
||||
from . import config
|
||||
|
||||
config_file_00 = os.path.join(os.path.dirname(__file__),'test-config-values-00.conf')
|
||||
|
||||
# 1. No config file, no command-line arguments (a.k.a. default values)
|
||||
|
||||
conf = config.configmanager()
|
||||
conf.parse_config()
|
||||
|
||||
assert conf['transient_age_limit'] == 1.0
|
||||
assert os.path.join(conf['root_path'], 'addons') == conf['addons_path']
|
||||
|
||||
# 2. No config file, some command-line arguments
|
||||
|
||||
conf = config.configmanager()
|
||||
# mess with the optparse.Option definition to allow an invalid path
|
||||
conf.casts['addons_path'].action = 'store'
|
||||
conf.parse_config(['--addons-path=/xyz/dont-exist', '--transient-age-limit=2.3'])
|
||||
|
||||
assert conf['transient_age_limit'] == 2.3
|
||||
assert conf['addons_path'] == '/xyz/dont-exist'
|
||||
|
||||
# 3. Config file, no command-line arguments
|
||||
|
||||
conf = config.configmanager()
|
||||
conf.parse_config(['-c', config_file_00])
|
||||
|
||||
assert conf['transient_age_limit'] == 3.4
|
||||
|
||||
# 4. Config file, and command-line arguments
|
||||
|
||||
conf = config.configmanager()
|
||||
conf.parse_config(['-c', config_file_00, '--transient-age-limit=2.3'])
|
||||
|
||||
assert conf['transient_age_limit'] == 2.3
|
||||
Reference in New Issue
Block a user