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

Re: Indentation in package descriptions



On Thu, 29 Apr 2010, Christian PERRIER wrote:
> Description: CDB map support for Postfix
>  ${Description}
>  .
>  This provides support for CDB (constant database) maps in Postfix. If you
>  plan to use CDB maps with Postfix, you need this.
> 
> the source tree also has debian/vars.in:
> 
> Description=Postfix is Wietse Venema's mail transport agent that started life as an${Newline} alternative to the widely-used Sendmail program.
>   Postfix attempts to${Newline} be fast, easy to administer, and secure, while at the same time being${Newline} sendmail compatible enough to
> not upset existing users. Thus, the outside${Newline} has a sendmail-ish flavor, but the inside is completely different.
> 
[...]
> The problem, here, is that, apparently ${Newline} gets expanded 
> to "\n " and not "\n".

${Newline} gets expanded to "\n" but the substvar substitution is
done on the content of the field after it has been parsed and not before
which means that you don't get to see/deal with the initial space any
more.

This was probably different in older version of dpkg-dev but it has never
been codified one way or another. The current approach is cleaner as you
can put any value in the substvar and it should work. Before if you forgot
the space you would have generated something invalid...

This was changed in dpkg-dev 1.15.5. I would suggest to fix postfix
to match the new behaviour (and build-depend on dpkg-dev (>= 1.15.5)
to avoid problems with older dpkg-dev).

I just added a paragraph in deb-substvars(5) to document this behaviour.

Cheers,
-- 
Raphaël Hertzog

Like what I do? Sponsor me: http://ouaza.com/wp/2010/01/05/5-years-of-freexian/
My Debian goals: http://ouaza.com/wp/2010/01/09/debian-related-goals-for-2010/


Reply to: