Commit c782a29c authored by Guido Günther's avatar Guido Günther

Fix typo in env var names

Thanks: Nish Aravamudan for pointing this out
parent 74ca1faa
......@@ -23,16 +23,16 @@ _gbp_tags ()
_gbp_remote_configs ()
{
GBP_DISABLE_GBP_CONF_DEPRECTATION=true \
GBP_DISABLE_SECTION_DEPRECTATION=true \
GBP_DISABLE_GBP_CONF_DEPRECATION=true \
GBP_DISABLE_SECTION_DEPRECATION=true \
gbp create-remote-repo list | sed -ne 's/^ \+\([a-z]\+\)/\1/p'
}
_gbp_options ()
{
GBP_DISABLE_GBP_CONF_DEPRECTATION=true \
GBP_DISABLE_SECTION_DEPRECTATION=true \
GBP_DISABLE_GBP_CONF_DEPRECATION=true \
GBP_DISABLE_SECTION_DEPRECATION=true \
gbp "${1}" --help | sed -ne 's/^ \+\(\(\-[a-z]\), \)\?\(\-\-[a-z\-]\+\=\?\).*/\2 \3/p'
}
......
......@@ -271,7 +271,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><envar>GBP_DISABLE_SECTION_DEPRECTATION</envar></term>
<term><envar>GBP_DISABLE_SECTION_DEPRECATION</envar></term>
<listitem>
<para>
When set to a non-empty value don't print a deprecation
......@@ -281,7 +281,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term><envar>GBP_DISABLE_GBP_CONF_DEPRECTATION</envar></term>
<term><envar>GBP_DISABLE_GBP_CONF_DEPRECATION</envar></term>
<listitem>
<para>
When set to a non-empty value don't print a deprecation
......
......@@ -434,12 +434,12 @@ class GbpOptionParser(OptionParser):
self.config_parser.read(filename)
def _warn_old_config_section(self, oldcmd, cmd):
if not os.getenv("GBP_DISABLE_SECTION_DEPRECTATION"):
if not os.getenv("GBP_DISABLE_SECTION_DEPRECATION"):
gbp.log.warn("Old style config section [%s] found "
"please rename to [%s]" % (oldcmd, cmd))
def _warn_old_gbp_conf(self, gbp_conf):
if (not os.getenv("GBP_DISABLE_GBP_CONF_DEPRECTATION") and
if (not os.getenv("GBP_DISABLE_GBP_CONF_DEPRECATION") and
not self._warned_old_gbp_conf):
gbp.log.warn("Deprecated configuration file found at %s, "
"check gbp.conf(5) for alternatives" % gbp_conf)
......
......@@ -67,12 +67,12 @@ class TestConfigParser(unittest.TestCase, GbpLogTester):
With disabled deprecations we shouldn't see a log line
"""
for prefix in ['', 'git-']:
os.environ['GBP_DISABLE_SECTION_DEPRECTATION'] = 'true'
os.environ['GBP_DISABLE_SECTION_DEPRECATION'] = 'true'
parser = GbpOptionParser('%scmd2' % prefix)
self.assertEqual(parser.config['single_git_override_option1'], 'single_git_override_value1')
for line in range(0, 2):
self._check_log_empty()
os.environ.pop('GBP_DISABLE_SECTION_DEPRECTATION')
os.environ.pop('GBP_DISABLE_SECTION_DEPRECATION')
def test_new_overrides_git(self):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment