egencache: Print warnings for deprecated options.
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Tue, 23 Jul 2013 22:18:13 +0000 (00:18 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Tue, 23 Jul 2013 22:18:13 +0000 (00:18 +0200)
bin/egencache

index 921c4612da47fb32e116f6eb40a01d29eff838d5..e3a3f13f39d44600c479135f6124629354896657 100755 (executable)
@@ -108,7 +108,7 @@ def parse_args(args):
                help="override the PORTAGE_GPG_KEY variable",
                dest="gpg_key")
        common.add_option("--portdir",
-               help="override the portage tree location (deprecated in favor of --repositories-configuration)",
+               help="override the PORTDIR variable (deprecated in favor of --repositories-configuration)",
                dest="portdir")
        common.add_option("--portdir-overlay",
                help="override the PORTDIR_OVERLAY variable (deprecated in favor of --repositories-configuration)",
@@ -215,6 +215,13 @@ def parse_args(args):
        if options.repo is None:
                parser.error("--repo option is required")
 
+       if options.portdir is not None:
+               writemsg_level("egencache: warning: --portdir option is deprecated in favor of --repositories-configuration option\n",
+                       level=logging.WARNING, noiselevel=-1)
+       if options.portdir_overlay is not None:
+               writemsg_level("egencache: warning: --portdir-overlay option is deprecated in favor of --repositories-configuration option\n",
+                       level=logging.WARNING, noiselevel=-1)
+
        for atom in args:
                try:
                        atom = portage.dep.Atom(atom)