... First, here is how the patch is added in the recipe. Notice macros=True {code} r.addPatch('servicedir.patch', macros=True, use=(r.macros.servicedir != '/var')) {code} Then, please take a look at the right patch, {code} --- camel/providers/local/camel-local-folder.c 2009-05-06 03:59:32.000000000 -0500 +++ camel/providers/local/camel-local-folder.c 2009-05-06 03:58:29.000000000 -0500 @@ -391,8 +391,8 @@ /* $HOME relative path + protocol string */ folder->description = g_strdup_printf(_("~%%s (%%s)"), path+strlen(tmp), ((CamelService *)folder->parent_store)->url->protocol); - else if ((tmp = "/var/spool/mail") && strncmp(tmp, path, strlen(tmp)) == 0) - /* /var/spool/mail relative path + protocol */ + else if ((tmp = "%(servicedir)s/spool/mail") && strncmp(tmp, path, strlen(tmp)) == 0) + /* %(servicedir)s/spool/mail relative path + protocol */ folder->description = g_strdup_printf(_("mailbox: %%s (%%s)"), path+strlen(tmp), ((CamelService *)folder->parent_store)->url->protocol); else if ((tmp = "/var/mail") && strncmp(tmp, path, strlen(tmp)) == 0) {code} and the wrong one. Look hard to find out the difference :-) {code} --- camel/providers/local/camel-local-folder.c 2009-05-06 03:59:32.000000000 -0500 +++ camel/providers/local/camel-local-folder.c 2009-05-06 03:58:29.000000000 -0500 @@ -391,8 +391,8 @@ /* $HOME relative path + protocol string */ folder->description = g_strdup_printf(_("~%s (%s)"), path+strlen(tmp), ((CamelService *)folder->parent_store)->url->protocol); - else if ((tmp = "/var/spool/mail") && strncmp(tmp, path, strlen(tmp)) == 0) - /* /var/spool/mail relative path + protocol */ + else if ((tmp = "%(servicedir)s/spool/mail") && strncmp(tmp, path, strlen(tmp)) == 0) + /* %(servicedir)s/spool/mail relative path + protocol */ folder->description = g_strdup_printf(_("mailbox: %s (%s)"), path+strlen(tmp), ((CamelService *)folder->parent_store)->url->protocol); else if ((tmp = "/var/mail") && strncmp(tmp, path, strlen(tmp)) == 0) {code} "%s" \!\! Conary would think this is also a macro and tries to substitute it and, of course, trigger a python exception somewhere.
So if you are using "macros" in your patch, take a moment to update the non-macros, like %s.
|