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

Re: Enabling uscan to simply remove files from upstream source



Le Tue, Aug 21, 2012 at 12:21:21PM +0200, Andreas Tille a écrit :
> 
>  1. The new field Files-Excluded in debian/copyright contains a space
>     separated list of globs (as used by find and for specifying file
>     lists in machine readable debian/control files). The deletion
>     process will loop over every expression
> 
>       rm -rf ${MAIN_SOURCE_DIR}/<expression>
 
>  3. If the tarball did not contained any of the globs in
>     debian/copyright::Files-Excluded it should be left untouched
>     (except if the repackaging is needed because of compression method
>     anyway if the user forces --repack).
 
> Regarding the implementation there was some uncertainity about the
> actual Perl module to use.  In the attached example script I decided to
> stick to Dpkg::Control and left the code for Parse::DebControl as a
> comment which could pretty easily could replace the other parser.  The
> code works for me however, there might be some remaining empty
> directories which I'm tempted to delete these as well via an "educated"
> 
>    find tmp -type d -empty -delete

Hi Andreas,

I would suggest to stick to the format of the Files field, and to abort with
error when files are not found, so that the Files-Excluded list stays accurate.

As suggested in 20120818224444.GT5914@jones.dk">http://lists.debian.org/20120818224444.GT5914@jones.dk,
something similar to the following two commands would do be compatible with the
syntax of the Files field (although I am still unsure if a prefix to
<expression> needs to be added or not).

    find ${MAIN_SOURCE_DIR}/* -path <expression> -delete

    find ${MAIN_SOURCE_DIR}/* type f -name <expression> -delete

The key limitation of the solution you propose, apart from the complexity of
introducing a new syntax, is that it can not recognise expressions such as
*/Makefile.in, as in the example of the Files field.

Have a nice day,

-- 
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan


Reply to: