On Thu, Sep 10, 2015 at 05:10:40PM -0600, Linn Crosetto wrote:
> override_dh_clean does not remove all necessary files to rebuild from source
> using gbp.

I can't guarantee that gbp in general will work since grub2 uses git-dpm
for patch management, but I guess this part of it ought to.

> diff --git a/debian/rules b/debian/rules
> index cc192ce..bf1e003 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -495,6 +495,15 @@ override_dh_auto_clean:
>       -rm -rf debian/grub-extras-enabled debian/stamps obj
>       -rm -f contrib grub-core/contrib
>  
> +MPI_CLEAN_FILES = $(patsubst %,grub-core/lib/libgcrypt-grub/mpi/%, \
> +                     mpi-asm-defs.h mpih-add1.c mpih-sub1.c mpih-mul1.c \
> +                     mpih-mul2.c mpih-mul3.c mpih-lshift.c mpih-rshift.c)
> +DOCS_CLEAN_FILES = $(patsubst %,docs/%, \
> +                     stamp-vti version.texi stamp-1 version-dev.texi) \
> +                $(shell ls docs/*.info)
> +CLEAN_FILES = $(MPI_CLEAN_FILES) $(DOCS_CLEAN_FILES) \
> +           include/grub/gcrypt/g10lib.h po/grub.pot
> +
>  override_dh_clean:
>       dh_autoreconf_clean
>       dh_clean
> @@ -506,6 +515,13 @@ override_dh_clean:
>       done
>       rm -f debian/grub-common.maintscript
>       rm -rf debian/tmp-*/
> +
> +     for i in $(CLEAN_FILES) ; do \
> +             if [ -e "$$i" ] || [ -h "$$i" ]; then \
> +                     rm "$$i"; \
> +             fi ; \
> +     done
> +
>  ifneq (,$(SB_PACKAGE))
>       rm -rf debian/grub2-images
>  endif

This is unnecessarily much code, I think.  Could you please send a patch
that just adds these file names to debian/clean instead?  You can use
wildcards.  Directories can't be there, but anything that can be removed
using "rm -f" can be.

Thanks,

-- 
Colin Watson                                       [[email protected]]

Reply via email to