diff options
author | Martin Quinson <mquinson@debian.org> | 2005-02-24 12:46:59 +0000 |
---|---|---|
committer | Martin Quinson <mquinson@debian.org> | 2005-02-24 12:46:59 +0000 |
commit | 8cab0954bc2a05222e52f8a2baacbcdfe5ff5ad3 (patch) | |
tree | b6f3d2c97feb53dd9cd8549b9871db4c6a39ff15 /debian | |
parent | bac9ac82afd5cb82760aee83659c567970cd98a6 (diff) | |
download | quilt-8cab0954bc2a05222e52f8a2baacbcdfe5ff5ad3.tar.gz |
take care of the fools patching their config.* files. Bad idea since cdbs updates them automatically
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patchsys-quilt.mk | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/patchsys-quilt.mk b/debian/patchsys-quilt.mk index 50a1910..6d6b684 100644 --- a/debian/patchsys-quilt.mk +++ b/debian/patchsys-quilt.mk @@ -63,6 +63,23 @@ DEB_QUILT_CMD = cd $(DEB_SRCDIR) && $(if $(DEB_QUILT_PATCHDIR_LINK),QUILT_PATCHE # Declare Build-Dep of packages using this file onto quilt CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), quilt +# Build-Dep on patchutils to check for fool souls patching config.* files +# This is a Bad Thing since cdbs updates those files automatically. +# (code stolen from cdbs itself, in dpatch.mk) + +CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), patchutils + +evil_patches_that_do_nasty_things := $(shell\ +if lsdiff=which lsdiff ; then \ + $$lsdiff -H $(DEB_PATCHES) \ + | egrep "/config\.(guess|sub|rpath)$" | tr "\n" " " ; \ +fi) + +ifneq (, $(evil_patches_that_do_nasty_things)) +$(warning WARNING: The following patches are modifying auto-updated files. This can result in serious trouble: $(evil_patches_that_do_nasty_things)) +endif + + post-patches:: apply-patches clean:: reverse-patches @@ -70,6 +87,7 @@ clean:: reverse-patches # The patch subsystem apply-patches: pre-build debian/stamp-patched debian/stamp-patched: + $(MAKE) -f debian/rules reverse-config if [ -n "$(DEB_QUILT_PATCHDIR_LINK)" ] ; then \ if [ -L $(DEB_SRCDIR)/$(DEB_QUILT_PATCHDIR_LINK) ] ; then : ; else \ (cd $(DEB_SRCDIR); ln -s $(DEB_PATCHDIRS) $(DEB_QUILT_PATCHDIR_LINK)) ; \ @@ -79,8 +97,10 @@ debian/stamp-patched: # That's not an error here (but it's usefull to break loops in crude scripts) $(DEB_QUILT_CMD) push -a || test $$? = 2 touch debian/stamp-patched + $(MAKE) -f debian/rules reverse-config reverse-patches: + $(MAKE) -f debian/rules reverse-config if [ -d "$(DEB_SRCDIR)" ] ; then \ $(DEB_QUILT_CMD) pop -a -R || test $$? = 2 ; \ fi @@ -91,5 +111,6 @@ reverse-patches: fi rm -rf $(DEB_SRCDIR)/.pc rm -f debian/stamp-patch* + $(MAKE) -f debian/rules reverse-config endif |