Fix USE flag parsing for Bug #115294
authorfuzzyray <fuzzyray@gentoo.org>
Tue, 13 Dec 2005 23:03:38 +0000 (23:03 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Tue, 13 Dec 2005 23:03:38 +0000 (23:03 -0000)
svn path=/; revision=267

trunk/src/equery/equery

index 0945cf81e993991f90250d77ea5be6cd4fedf380..3a7099d54766e91ef2c3fd10c020e70f1830d1b9 100755 (executable)
@@ -467,7 +467,7 @@ class CmdDisplayUSEs(Command):
                        for line in fd.readlines():
                                if line[0] == "#":
                                        continue
-                               fields = line.split(" - ")
+                               fields = line.split(" - ", 1)
                                if len(fields) == 2:
                                        usedesc[fields[0].strip()] = fields[1].strip()
                except IOError:
@@ -479,7 +479,7 @@ class CmdDisplayUSEs(Command):
                        for line in fd.readlines():
                                if line[0] == "#":
                                        continue
-                               fields = line.split(" - ")
+                               fields = line.split(" - ", 1)
                                if len(fields) == 2:
                                        catpkguse = re.search("(.*):(.*)", fields[0])
                                        if catpkguse:
@@ -488,7 +488,7 @@ class CmdDisplayUSEs(Command):
                                                else:
                                                        uselocaldesc[catpkguse.group(1).strip()][catpkguse.group(2).strip()] = fields[1].strip()
                except IOError:
-                               print_warn(5, "Could not load USE flag descriptions from " + path(gentoolkit.settings["PORTDIR"] + "/profiles/use.desc"))
+                               print_warn(5, "Could not load USE flag descriptions from " + path(gentoolkit.settings["PORTDIR"] + "/profiles/use.local.desc"))
 
                if not Config["piping"] and Config["verbosityLevel"] >= 3: 
                        print_info(3, "[ Colour Code : " + pp.useflagon("set") + " " + pp.useflagoff("unset") + " ]")