Split PORTDIR_OVERLAY with shlex.
authorZac Medico <zmedico@gentoo.org>
Mon, 22 Jul 2013 17:40:48 +0000 (10:40 -0700)
committerZac Medico <zmedico@gentoo.org>
Mon, 22 Jul 2013 17:40:48 +0000 (10:40 -0700)
pym/portage/package/ebuild/getmaskingreason.py
pym/repoman/utilities.py

index 20b76c44ad8173ce2889e536cfef8d44574d43d7..1c167140ed7b9822a1ac0c95ac63c15677bcbf2d 100644 (file)
@@ -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)
index f62e42830baf57f7da23c851ea02d4005fb33dc8..3ec3a4a960808ee1c1726e011961738c6f72b0e6 100644 (file)
@@ -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)