From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH] Makefile.am: add a target that lists patches no longer used Date: Tue, 19 May 2015 01:34:10 +0200 Message-ID: <1431992050-18271-1-git-send-email-tipecaml@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuUYD-0005YL-QU for guix-devel@gnu.org; Mon, 18 May 2015 19:34:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuUY9-0000tA-F1 for guix-devel@gnu.org; Mon, 18 May 2015 19:34:25 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:33146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuUY9-0000su-7P for guix-devel@gnu.org; Mon, 18 May 2015 19:34:21 -0400 Received: by wicmx19 with SMTP id mx19so99252690wic.0 for ; Mon, 18 May 2015 16:34:20 -0700 (PDT) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * list-useless-patches.sh: New file. * Makefile.am (check-for-useless-patches): New target. --- Makefile.am | 3 +++ list-useless-patches.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 list-useless-patches.sh diff --git a/Makefile.am b/Makefile.am index 6478aeb..293c27e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -388,6 +388,9 @@ assert-final-inputs-self-contained: $(top_builddir)/pre-inst-env "$(GUILE)" \ "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm" +check-for-useless-patches: + $(top_srcdir)/list-useless-patches.sh + .PHONY: sync-descriptions gen-ChangeLog clean-go .PHONY: assert-no-store-file-names assert-binaries-available .PHONY: assert-final-inputs-self-contained diff --git a/list-useless-patches.sh b/list-useless-patches.sh new file mode 100755 index 0000000..5aae1bb --- /dev/null +++ b/list-useless-patches.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# GNU Guix --- Functional package management for GNU +# Copyright © 2015 Cyril Roelandt +# +# This file is part of GNU Guix. +# +# GNU Guix is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# GNU Guix is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Guix. If not, see . + +# This lists patches in gnu-system.am that are not used anywhere. +for file in $(grep ".*\.patch" gnu-system.am | awk '{print $1}'); do + git grep -q $(basename $file) gnu/packages/ + if [ "$?" -ne "0" ]; then + echo "$file is no longer needed" + fi +done -- 1.8.4.rc3