Bug#781131: [debhelper-devel] Bug#781131: dh_compress: please improve "--exclude" (-X) option

2015-10-14 Thread Maximiliano Curia

¡Hola Dmitry y Niels!

El 2015-03-25 a las 17:11 +1100, Dmitry Smirnov escribió:

On Wed, 25 Mar 2015 07:03:37 Niels Thykier wrote:

A new argument is a much safer choice from my PoV.


True but since old "--exclude" argument is somewhat broken, perhaps it could 
be fixed with next compatibility level bump? Just a thought...


I'm not really sure whether to retitle this bug or to submit a new one, but 
the issue is about the same, it would be nice to have some improvements in

debhelper's exclude option.

The current implementation ends up using the values in a find -regex after 
escaping some shell chars. Making it unnecessarily hard to exclude a file in a 
multiarch path (for example, excluding plugins in dh_makeshlibs).


Just to make the behaviour more bizarre, if the item contains a space then the 
list of chars that are escaped are much shorter, thus it's possible but quite 
awful to use exclude values such as:

-X' ?usr/lib/[^/]*/?plugins/'

(Which is close to what I ended up using, because of the lintian's 
pkg-has-shlibs-control-file-but-no-actual-shared-libs check that now produces 
an error on signon-kwallet-extension if not.)


Happy hacking,
--
"The best way to predict the future is to invent it."
-- Alan Kay
Saludos /\/\ /\ >< `/


signature.asc
Description: Digital signature


Bug#781131: [debhelper-devel] Bug#781131: dh_compress: please improve --exclude (-X) option

2015-03-25 Thread Niels Thykier
Control: tags -1 -patch

On 2015-03-25 00:12, Dmitry Smirnov wrote:
 Package: debhelper
 Version: 9.20150101
 Severity: minor
 Tags: patch
 
 I'm working on package where I install *.cfg files as examples.
 Because those files are used as configuration templates I do not want to 
 compress them so I added the following to debian/rules:
 
 override_dh_compress:
 dh_compress --exclude=.cfg
 
 Unfortunately this also prevents compression of *.cfg.5 man pages and cause 
 lintian error manpage-not-compressed.
 
 [...]
 
 but that's ugly for more than one file. IMHO the problem is that \Q...\E 
 constraints (see dh_compress line 137) do not allow me to use regex in the 
 exclude pattern.
 Another problem is that excluded substring is not anchored so unexpected 
 matches occur if exclude string is present anywhere in the file name.
 
 IMHO the minimum workaround would be to anchor exclusion pattern to the end 
 of 
 the file name as follows:
 
 [...]

Hi,

Unfortunately, the proposed change (anchoring the exclusion pattern)
could break any number of packages, where the maintainer only used a
substring as parameter for --exclude.  Also, --exclude is used in a
number of different tools that would need a similar change (with the
same possible breakage).

 More robust and flexible solution would be to add new --rexclude option to 
 allow regex exclusion patterns.
 
 [...]

A new argument is a much safer choice from my PoV.

~Niels


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#781131: [debhelper-devel] Bug#781131: dh_compress: please improve --exclude (-X) option

2015-03-25 Thread Dmitry Smirnov
On Wed, 25 Mar 2015 07:03:37 Niels Thykier wrote:
 A new argument is a much safer choice from my PoV.

True but since old --exclude argument is somewhat broken, perhaps it could 
be fixed with next compatibility level bump? Just a thought...

-- 
Regards,
 Dmitry Smirnov.

---

Continuous effort - not strength or intelligence - is the key to unlocking
our potential.
-- Winston Churchill


signature.asc
Description: This is a digitally signed message part.