From patchwork Tue Nov 22 09:53:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ga=C3=ABl_PORTAY?= X-Patchwork-Id: 697913 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tNd3l5k9Cz9t0w for ; Wed, 23 Nov 2016 07:53:38 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B6AC12A27A; Tue, 22 Nov 2016 20:53:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id umkV2x0tN51Q; Tue, 22 Nov 2016 20:53:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id EF69C22F42; Tue, 22 Nov 2016 20:53:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id EB4941BFD54 for ; Tue, 22 Nov 2016 20:53:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E967286A4D for ; Tue, 22 Nov 2016 20:53:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A2TUQDEtE9Ln for ; Tue, 22 Nov 2016 20:53:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by whitealder.osuosl.org (Postfix) with ESMTPS id CB3E686A52 for ; Tue, 22 Nov 2016 20:53:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 1BF4C9C1D21 for ; Tue, 22 Nov 2016 15:53:29 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Ftbg4FHa2xsh; Tue, 22 Nov 2016 15:53:28 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 974D19C2594; Tue, 22 Nov 2016 15:53:28 -0500 (EST) X-Virus-Scanned: amavisd-new at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tqb4nVeGFR00; Tue, 22 Nov 2016 15:53:28 -0500 (EST) Received: from gportay.mtl.sfl (unknown [192.168.48.58]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 746119C1D21; Tue, 22 Nov 2016 15:53:28 -0500 (EST) From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= To: buildroot@buildroot.org Date: Tue, 22 Nov 2016 15:53:33 -0500 Message-Id: <20161122205333.9735-1-gael.portay@savoirfairelinux.com> X-Mailer: git-send-email 2.10.2 MIME-Version: 1.0 Cc: =?utf-8?q?Ga=C3=ABl=20PORTAY?= Subject: [Buildroot] [PATCH] Makefile: fix ignored trace at target-finalize X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Make may throw an error (but ignored) trace when cleaning up the rootfs. The target-finalize rule intends to remove the folder `$(TARGET_DIR)/usr/share' but this directory may still contain items (such as the `udhcpc' helper script) and causes the rmdir to fail. The stderr output is redirected to /dev/null but it returns and error which is escaped by the leading `-'; but make reports an ignored-error. See the log below: $ make (...) rm -rf (...)/target/usr/share/gtk-doc rmdir (...)/target/usr/share rmdir: failed to remove '(...)/target/usr/share': Directory not empty make[1]: [Makefile:650: target-finalize] Error 1 (ignored) find /(...)/target -type f \( -perm /111 -o -name '*.so*' \) -not \( -name 'libpthread*.so*' -o -name 'ld-*.so*' -o -name '*.ko' \) -print0 | xargs -0 (...)/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-strip --remove-section=.comment --remove-section=.note 2>/dev/null || true This patch apply the same rule at the instruction immediately after: * redirecting stderr to /dev/null (already done) and * executing true if the `rmdir' instruction fails. Signed-off-by: Gaƫl PORTAY Reviewed-by: "Yann E. MORIN" --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 37e4bd4..7f162e2 100644 --- a/Makefile +++ b/Makefile @@ -656,7 +656,7 @@ endif rm -rf $(TARGET_DIR)/usr/info $(TARGET_DIR)/usr/share/info rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc rm -rf $(TARGET_DIR)/usr/share/gtk-doc - -rmdir $(TARGET_DIR)/usr/share 2>/dev/null + rmdir $(TARGET_DIR)/usr/share 2>/dev/null || true $(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true # See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads