From 719b8da24634c0748a98af4a57184de4d75b8455 Mon Sep 17 00:00:00 2001 From: solar Date: Thu, 19 Oct 2006 00:27:52 +0000 Subject: [PATCH] - be sure to strip newlines and join whitespace. Brian Harring from Bug 151657 svn path=/; revision=323 --- trunk/src/genpkgindex/genpkgindex | 10 +++++----- 1 file 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))) -- 2.26.2