summaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
authorsolar <solar@gentoo.org>2006-10-19 00:27:52 +0000
committersolar <solar@gentoo.org>2006-10-19 00:27:52 +0000
commit719b8da24634c0748a98af4a57184de4d75b8455 (patch)
treea4a7506455242ef08d756cb8e78ffabfbf6023a8 /trunk/src
parent36b30ab7754f3172988c2ca5d0e440768b0f55c7 (diff)
downloadgentoolkit-719b8da24634c0748a98af4a57184de4d75b8455.tar.gz
- be sure to strip newlines and join whitespace. Brian Harring from Bug 151657
svn path=/; revision=323
Diffstat (limited to 'trunk/src')
-rw-r--r--trunk/src/genpkgindex/genpkgindex10
1 files changed, 5 insertions, 5 deletions
diff --git a/trunk/src/genpkgindex/genpkgindex b/trunk/src/genpkgindex/genpkgindex
index f186ea5..d984280 100644
--- a/trunk/src/genpkgindex/genpkgindex
+++ b/trunk/src/genpkgindex/genpkgindex
@@ -119,7 +119,7 @@ def serialize_depset(src, context='and'):
else:
v = serialize_depset(x, context='or')
if v.strip():
- l.append("( %s )" % v)
+ l.append("( %s )" % v.strip())
return ' '.join(l)
for cat, pkg, tbz2, stuff in packages:
@@ -132,14 +132,14 @@ for cat, pkg, tbz2, stuff in packages:
s = xpak.getitem(stuff, "DESCRIPTION")
if s is not None:
- s = s.split()
+ s = ' '.join(s.split())
if s:
- fp.write("DESC: %s\n" % ' '.join(s))
+ fp.write("DESC: %s\n" % s)
# drop '.tbz2'
fp.write("PF: %s\nCATEGORY: %s\n" % (pkg[:-5], cat.strip()))
s = xpak.getitem(stuff, "SLOT")
if s is not None:
- s = s.strip()
+ s = ' '.join(s.split())
if s and s != "0":
fp.write("SLOT: %s\n" % s)
@@ -148,7 +148,7 @@ for cat, pkg, tbz2, stuff in packages:
item = xpak.getitem(stuff, name)
if item is None:
continue
- val = portage_dep.use_reduce(portage_dep.paren_reduce(item.strip()), uselist=split_use)
+ val = portage_dep.use_reduce(portage_dep.paren_reduce(' '.join(item.split())), uselist=split_use)
if val:
fp.write("%s: %s\n" % (name, serialize_depset(val)))