[kernel] r7060 - dists/trunk/linux-2.6/debian/lib/python/debian_linux

Bastian Blank waldi at costa.debian.org
Thu Jul 20 00:47:46 UTC 2006


Author: waldi
Date: Thu Jul 20 00:47:41 2006
New Revision: 7060

Modified:
   dists/trunk/linux-2.6/debian/lib/python/debian_linux/debian.py
   dists/trunk/linux-2.6/debian/lib/python/debian_linux/gencontrol.py

Log:
debian/lib/python/debian_linux/debian.py,
debian/lib/python/debian_linux/gencontrol.py:
Make it possible to add more than one paragraph as substitution.


Modified: dists/trunk/linux-2.6/debian/lib/python/debian_linux/debian.py
==============================================================================
--- dists/trunk/linux-2.6/debian/lib/python/debian_linux/debian.py	(original)
+++ dists/trunk/linux-2.6/debian/lib/python/debian_linux/debian.py	Thu Jul 20 00:47:41 2006
@@ -85,12 +85,12 @@
     __slots__ = "short", "long"
 
     def __init__(self, value = None):
+        self.long = []
         if value is not None:
-            self.short, long = value.split ("\n", 1)
-            self.long = long.split ("\n.\n")
+            self.short, long = value.split("\n", 1)
+            self.append(long)
         else:
             self.short = None
-            self.long = []
 
     def __str__(self):
         ret = self.short + '\n'
@@ -100,6 +100,11 @@
             pars.append('\n '.join(w.wrap(i)))
         return self.short + '\n ' + '\n .\n '.join(pars)
 
+    def append(self, str):
+        str = str.strip()
+        if str:
+            self.long.extend(str.split("\n.\n"))
+
 class package_relation(object):
     __slots__ = "name", "version", "arches"
 

Modified: dists/trunk/linux-2.6/debian/lib/python/debian_linux/gencontrol.py
==============================================================================
--- dists/trunk/linux-2.6/debian/lib/python/debian_linux/gencontrol.py	(original)
+++ dists/trunk/linux-2.6/debian/lib/python/debian_linux/gencontrol.py	Thu Jul 20 00:47:41 2006
@@ -213,7 +213,7 @@
         desc = in_desc.__class__()
         desc.short = self.substitute(in_desc.short, vars)
         for i in in_desc.long:
-            desc.long.append(self.substitute(i, vars))
+            desc.append(self.substitute(i, vars))
         e['Description'] = desc
 
     def process_package(self, in_entry, vars):



More information about the Kernel-svn-changes mailing list