debian/rules questions and my plans for dual-build.

Henrique de Moraes Holschuh hmh at debian.org
Sat May 6 15:09:06 UTC 2006


> diff -urN cyrus-imapd-2.2.13.orig/configure.in cyrus-imapd-2.2.13/configure.in
> --- cyrus-imapd-2.2.13.orig/configure.in	2005-10-13 21:56:14.000000000 +0200
> +++ cyrus-imapd-2.2.13/configure.in	2006-05-06 10:42:57.000000000 +0200
> @@ -747,17 +747,6 @@
>  AC_DEFINE_UNQUOTED(MASTER_PIDFILE, $MASTERPIDFILE,[Name of the pidfile for master])
>  
>  dnl
> -dnl Select a method for IMAP IDLE
> -dnl
> -AC_ARG_WITH(idle,[  --with-idle=METHOD      use METHOD for IMAP IDLE
> -                          METHOD is [poll], idled or no],
> -	WITH_IDLE="${withval}",WITH_IDLE="poll")
> -AC_SUBST(WITH_IDLE)
> -if test "$WITH_IDLE" = "idled"; then
> -  IMAP_PROGS="$IMAP_PROGS idled"
> -fi
> -
> -dnl
>  dnl see if we're compiling with NNTP support
>  dnl
>  ENABLE_NNTP=no

You don't want to do that, it makes submiting the patch upstream more
difficult.

Instead, you want to keep WITH_IDLE, and make it select the *default* idle
backend.  The manpages should be generated reflecting whatever default the
user coose using --with-idle, as well.

The default selection should be the current upstream default.

> @@ -2205,13 +2207,13 @@
>  
>      /* Start doing mailbox updates */
>      if (imapd_mailbox) index_check(imapd_mailbox, 0, 1);
> -    idle_start(imapd_mailbox);
> +    IDLE->start(imapd_mailbox);
>  
>      /* Get continuation data */
>      c = getword(imapd_in, &arg);
>  
>      /* Stop updates and do any necessary cleanup */
> -    idle_done(imapd_mailbox);
> +    IDLE->done(imapd_mailbox);

I'd rather you did it a bit differently:

make idle_enabled(), idle_start(), idle_done(), etc macros (or keep
them as functions, but hint gcc that they probably should be inlined) that
does, e.g. the IDLE->enabled() test if IDLE is non-null.  This minimizes the
changes to the rest of the code, and it is cleaner too (and faster if it is
just a macro that does ( if (config_idle != NULL) config_idle->enabled(); )
or something like that.

You wouldn't need an idle_backend "No", then.  You could just use NULL for
that.  Otherwise, make sure to bomb if config_idle gets set as NULL by a
mishap in global.c.

Why the IDLE define, btw?

> @@ -173,9 +175,8 @@
>      snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
>  	     " (%s)", krb4_version);
>  #endif
> -    if (idle_method_desc)
> -	snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
> -		 "; idle = %s", idle_method_desc);
> +    snprintf(env_buf + strlen(env_buf), MAXIDVALUELEN - strlen(env_buf),
> +             "; idle = runtime");
>  
>      prot_printf(pout, " \"environment\" \"%s\"", env_buf);

This hunk should print the current active idle backend, not just "runtime".

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list