[pkg-php-pear] Bug#780930: Please, actualy indent bullet (Was: Bug#780930: Please, drop excessive spaces from substvar)

David Prévot taffit at debian.org
Mon Mar 23 17:11:50 UTC 2015


Hi Mathieu,

On Sat, Mar 21, 2015 at 08:50:59PM -0400, David Prévot wrote:
> Package: pkg-php-tools
> Version: 1.28

I used the /m switch so the beginning of a line could be detected in a
multiline context, but the (existing) replacement for bullets deserves
one too. Feel free to merge the attached patch with the previous one.

> +        $tmp = preg_replace('/^ /m', '', $tmp);

The package.xml file from php-net-ldap2 contains:

 <description>Net_LDAP2 is the successor of Net_LDAP which is a clone of Perls Net::LDAP
                object interface to directory servers. It does contain most of Net::LDAPs
                features but has some own too.
                 With Net_LDAP2 you have:
                 * A simple object-oriented interface to connections, searches entries and filters.
                 * Support for TLS and LDAP v3.
[…]

pkg-php-tools currently translates

Description: ${phppear:summary}
 ${phppear:description}

as:

Description: Object oriented interface for searching and manipulating LDAP-entries
 Net_LDAP2 is the successor of Net_LDAP which is a clone of Perls Net::LDAP
                 object interface to directory servers. It does contain most of
 Net::LDAPs
                 features but has some own too.
                  With Net_LDAP2 you have:
                  * A simple object-oriented interface to connections, searches
 entries and filters.
                  * Support for TLS and LDAP v3.
[…]

After applying the proposed patch, the long description looks more
conventional:

Description: Object oriented interface for searching and manipulating LDAP-entries
 Net_LDAP2 is the successor of Net_LDAP which is a clone of Perls Net::LDAP
 object interface to directory servers. It does contain most of Net::LDAPs
 features but has some own too.
 With Net_LDAP2 you have:
  * A simple object-oriented interface to connections, searches entries and
 filters.
  * Support for TLS and LDAP v3.
[…]


Yet, the long line from the first bullet is wrapped, but the indentation
is not respected, so there is still room for improvement (of the
headache kind…). We may change the bullet handling by:
- split the input by lines
- handle the bullets (indent, and linewrap at 72 characters)
- merge back the input
Yet, that won’t handle correctly an original input like

* A very long line
  that continues
  on more than a line

Maybe there is already a Dpkg Perl library to handle such description
properly, if not, I may propose a patch to implement the above proposed
behaviour if you think it would still be an improvement.

Regards

David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Actually-indent-bullets.patch
Type: text/x-diff
Size: 860 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-pear/attachments/20150323/0deb910c/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-pear/attachments/20150323/0deb910c/attachment.sig>


More information about the pkg-php-pear mailing list