From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 2 Dec 2013 15:17:54 +0000 (+0100) Subject: portageq: Print deprecation warnings for deprecated commands. X-Git-Tag: v2.2.8~23 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5b8962b55cfe4a529861cf5400266daa25e8f4e6;p=portage.git portageq: Print deprecation warnings for deprecated commands. --- diff --git a/bin/portageq b/bin/portageq index 3dc5c28e1..a50b8055c 100755 --- a/bin/portageq +++ b/bin/portageq @@ -677,7 +677,9 @@ def repos_config(argv): def portdir(_argv): """ Returns the PORTDIR path. + Deprecated in favor of repositories_configuration command. """ + print("WARNING: 'portageq portdir' is deprecated. Use 'portageq repositories_configuration' instead.", file=sys.stderr) print(portage.settings["PORTDIR"]) @@ -698,7 +700,9 @@ def config_protect_mask(_argv): def portdir_overlay(_argv): """ Returns the PORTDIR_OVERLAY path. + Deprecated in favor of repositories_configuration command. """ + print("WARNING: 'portageq portdir_overlay' is deprecated. Use 'portageq repositories_configuration' instead.", file=sys.stderr) print(portage.settings["PORTDIR_OVERLAY"]) @@ -737,6 +741,8 @@ def envvar(argv): return 2 for arg in argv: + if arg in ("PORTDIR", "PORTDIR_OVERLAY", "SYNC"): + print("WARNING: 'portageq envvar %s' is deprecated. Use 'portageq repositories_configuration' instead." % arg, file=sys.stderr) if verbose: print(arg + "=" + portage._shell_quote(portage.settings[arg])) else: