From eb4bff6276f7511d21ac6bb04d4d56a39b844593 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 20 May 2013 08:30:13 -0700 Subject: [PATCH] *_DEFAULT_OPTS: shlex for embedded quotes --- bin/ebuild | 3 ++- bin/egencache | 3 ++- bin/quickpkg | 3 ++- bin/repoman | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/ebuild b/bin/ebuild index 55386005f..4fdc76241 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -89,7 +89,8 @@ if len(pargs) < 2: parser.error("missing required args") if not opts.ignore_default_opts: - default_opts = portage.settings.get("EBUILD_DEFAULT_OPTS", "").split() + default_opts = portage.util.shlex_split( + portage.settings.get("EBUILD_DEFAULT_OPTS", "")) opts, pargs = parser.parse_args(default_opts + sys.argv[1:]) debug = opts.debug diff --git a/bin/egencache b/bin/egencache index 133903d8e..71f012a7a 100755 --- a/bin/egencache +++ b/bin/egencache @@ -873,7 +873,8 @@ def egencache_main(args): default_opts = None if not options.ignore_default_opts: - default_opts = settings.get('EGENCACHE_DEFAULT_OPTS', '').split() + default_opts = portage.util.shlex_split( + settings.get('EGENCACHE_DEFAULT_OPTS', '')) if default_opts: parser, options, args = parse_args(default_opts + args) diff --git a/bin/quickpkg b/bin/quickpkg index 19d90b0d3..16118ab25 100755 --- a/bin/quickpkg +++ b/bin/quickpkg @@ -310,7 +310,8 @@ if __name__ == "__main__": help="include files protected by CONFIG_PROTECT that have not been modified since installation (as a security precaution, default is 'n')") options, args = parser.parse_args(sys.argv[1:]) if not options.ignore_default_opts: - default_opts = portage.settings.get("QUICKPKG_DEFAULT_OPTS","").split() + default_opts = shlex_split( + portage.settings.get("QUICKPKG_DEFAULT_OPTS", "")) options, args = parser.parse_args(default_opts + sys.argv[1:]) if not args: parser.error("no packages atoms given") diff --git a/bin/repoman b/bin/repoman index 5243e61ec..20832ec8c 100755 --- a/bin/repoman +++ b/bin/repoman @@ -265,7 +265,8 @@ def ParseArgs(argv, qahelp): opts, args = parser.parse_args(argv[1:]) if not opts.ignore_default_opts: - default_opts = repoman_settings.get("REPOMAN_DEFAULT_OPTS", "").split() + default_opts = portage.util.shlex_split( + repoman_settings.get("REPOMAN_DEFAULT_OPTS", "")) if default_opts: opts, args = parser.parse_args(default_opts + sys.argv[1:]) -- 2.26.2