* 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 <tipec...@gmail.com> +# +# 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 <http://www.gnu.org/licenses/>. + +# 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