From c782a29c452eb68bd49951fc8180c907793ae53f Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 12 Jan 2018 23:33:04 +0100 Subject: Fix typo in env var names Thanks: Nish Aravamudan for pointing this out --- debian/gbp.completion | 8 ++++---- docs/manpages/gbp.conf.xml | 4 ++-- gbp/config.py | 4 ++-- tests/18_test_Config.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/debian/gbp.completion b/debian/gbp.completion index 7366fc22..fbbbf78b 100644 --- a/debian/gbp.completion +++ b/debian/gbp.completion @@ -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' } diff --git a/docs/manpages/gbp.conf.xml b/docs/manpages/gbp.conf.xml index 925955be..0ff314d4 100644 --- a/docs/manpages/gbp.conf.xml +++ b/docs/manpages/gbp.conf.xml @@ -271,7 +271,7 @@ - GBP_DISABLE_SECTION_DEPRECTATION + GBP_DISABLE_SECTION_DEPRECATION When set to a non-empty value don't print a deprecation @@ -281,7 +281,7 @@ - GBP_DISABLE_GBP_CONF_DEPRECTATION + GBP_DISABLE_GBP_CONF_DEPRECATION When set to a non-empty value don't print a deprecation diff --git a/gbp/config.py b/gbp/config.py index 8acf15da..afd11408 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -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) diff --git a/tests/18_test_Config.py b/tests/18_test_Config.py index 51bc9927..60cd9cff 100644 --- a/tests/18_test_Config.py +++ b/tests/18_test_Config.py @@ -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): """ -- cgit v1.2.3