[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#628084: cdebconf: tasksel debconf does not start in d-i



On Mon, 2011-05-30 at 22:44 +0100, Regis Boudin wrote:
> > > You're also right about the loop, and I'll submit a patch as well as
> > > soon as I get access to something more practical than my phone for that.
> > 
> > What is the status of this, as well as the missing space in "Flags:\n"
> > output?
> 
> I have a patch, though I'll probably be doing more checks to make sure
> everything is as robust as it should. This bit of code was copied from
> parse_owners() just above, so would like to make sure that one is not
> affected, too.
> 
> > I would prefer not to release cdebconf 0.156 until it is known to not
> > break tasksel.

Made further tests, and Samuel was correct, parse_flags() had problems
with trailing spaces. Turns out parse_owners() also had issues with
trailing comma. The attached patch fixes both.

>From 96c96ad4570170d293d812f910a94546a6d4e7e9 Mon Sep 17 00:00:00 2001
From: Regis Boudin <regis@boudin.name>
Date: Sat, 28 May 2011 13:30:07 +0100
Subject: [PATCH] fix parse_flags() and parse_owners() based on the feedback
 by Samuel Thibault

---
 debian/changelog                   |    3 ++-
 src/modules/db/rfc822db/rfc822db.c |    8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2b89ed6..00474c1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,7 +5,8 @@ cdebconf (0.156) UNRELEASED; urgency=low
     debconf-set-selections, and debconf-show. (Initial debconf-escape code by
     Colin Watson.)
   * Fix FTBFS with the future GCC 4.6.1 (Closes: #625317).
-  * Implement handling of multiple flags in the rfc822db backend.
+  * Implement handling of multiple flags in the rfc822db backend. Fix some
+    issue in it, thanks to Samuel Thibault (Closes: #628084).
 
  -- Joey Hess <joeyh@debian.org>  Thu, 05 May 2011 19:22:07 +0100
 
diff --git a/src/modules/db/rfc822db/rfc822db.c b/src/modules/db/rfc822db/rfc822db.c
index 4454dc7..fd7063b 100644
--- a/src/modules/db/rfc822db/rfc822db.c
+++ b/src/modules/db/rfc822db/rfc822db.c
@@ -113,8 +113,8 @@ static void parse_owners(struct question *q, char *string)
         question_owner_add(q,wc);
         if (finished != 0)
             break;
-        wc = delim;
-        while (*wc == ' ' || *wc == '\t' || *wc == '\0')
+        wc = delim + 1;
+        while (*wc == ' ' || *wc == '\t')
         {
             wc++;
         }
@@ -152,8 +152,8 @@ static unsigned int parse_flags(char *string)
         }
         if (finished != 0)
             break;
-        wc = delim;
-        while (*wc == ' ' || *wc == '\t' || *wc == '\0')
+        wc = delim + 1;
+        while (*wc == ' ' || *wc == '\t')
         {
             wc++;
         }        
-- 
1.7.5.3


Reply to: