[lkml]   [2012]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH RFC] Fix "/usr/bin/xargs: rm: Argument list too long" during make distclean
    When running "make distclean" in a cross chroot environment, the
    following messages are emitted:

    [user@host:/home/work/linux]: make distclean
    /usr/bin/xargs: rm: Argument list too long
    make: *** [clean] Error 126

    I use the following patch to get around the problem:

    diff --git a/Makefile b/Makefile
    index b771af5..e2bca8e 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -1033,7 +1033,7 @@ distclean: mrproper
    -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
    -o -name '.*.rej' \
    -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
    - -type f -print | xargs rm -f
    + -type f -print | xargs -s 122880 rm -f

    # Packaging of the kernel to various formats
    @@ -1242,7 +1242,7 @@ clean: $(clean-dirs)
    -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
    -o -name '*.symtypes' -o -name 'modules.order' \
    -o -name modules.builtin -o -name '.tmp_*.o.*' \
    - -o -name '*.gcno' \) -type f -print | xargs rm -f
    + -o -name '*.gcno' \) -type f -print | xargs -s 122880 rm -f

    # Generate tags for editors
    # ---------------------------------------------------------------------------

    Is there another way to solve this problem that does not require
    a patch to the Makefile?

     \ /
      Last update: 2012-08-13 22:22    [W:0.025 / U:6.696 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site