From 7d6a06597afcab1aa81c39a574a948f135ac5a50 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 22 Jul 2013 10:40:48 -0700 Subject: [PATCH] Split PORTDIR_OVERLAY with shlex. --- pym/portage/package/ebuild/getmaskingreason.py | 4 ++-- pym/repoman/utilities.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pym/portage/package/ebuild/getmaskingreason.py b/pym/portage/package/ebuild/getmaskingreason.py index 20b76c44a..1c167140e 100644 --- a/pym/portage/package/ebuild/getmaskingreason.py +++ b/pym/portage/package/ebuild/getmaskingreason.py @@ -1,4 +1,4 @@ -# Copyright 2010-2012 Gentoo Foundation +# Copyright 2010-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 __all__ = ['getmaskingreason'] @@ -71,7 +71,7 @@ def getmaskingreason(mycpv, metadata=None, settings=None, # XXX- This is a temporary duplicate of code from the config constructor. locations = [os.path.join(settings["PORTDIR"], "profiles")] locations.extend(settings.profiles) - for ov in settings["PORTDIR_OVERLAY"].split(): + for ov in portage.util.shlex_split(settings["PORTDIR_OVERLAY"]): profdir = os.path.join(normalize_path(ov), "profiles") if os.path.isdir(profdir): locations.append(profdir) diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index f62e42830..3ec3a4a96 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -40,6 +40,7 @@ import textwrap import difflib from tempfile import mkstemp +import portage from portage import os from portage import shutil from portage import _encodings @@ -461,7 +462,7 @@ def FindPortdir(settings): if location[-1] != "/": location += "/" - for overlay in settings["PORTDIR_OVERLAY"].split(): + for overlay in portage.util.shlex_split(settings["PORTDIR_OVERLAY"]): overlay = os.path.realpath(overlay) try: s = os.stat(overlay) -- 2.26.2