X Strike Force X.Org X11 SVN commit: r203 - trunk/debian
Author: branden
Date: 2005-06-14 02:30:01 -0500 (Tue, 14 Jun 2005)
New Revision: 203
Modified:
trunk/debian/rules
Log:
Add phony target "unpatch" to debian/rules, depended on by the clean
target. This reverts any patches that were applied (according to
$(STAMP_DIR)/patches). This is necessary because we usr cp -l (hardlinls)
to duplicate the unpatched upstream source tree, and have to unapply the
patches to restore the unpacked source package to its original state.
As noted in the comments, this is temporary hack to tide us over while we
migrate from dbs to quilt.
Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules 2005-06-14 06:54:16 UTC (rev 202)
+++ trunk/debian/rules 2005-06-14 07:30:01 UTC (rev 203)
@@ -145,7 +145,27 @@
rm -f debian/xserver-xorg-dbg.templates
rm -f $(STAMP_DIR)/genscripts
-clean: cleanscripts
+# This is a temporary hack to tide us over until we've weaned ourselves off of
+# dbs. If this were meant to be good enough for dbs itself, it would be
+# submitted to the Debian BTS as a patch to dbs.
+unpatch:
+ @if [ -f $(patched) ]; then \
+ mkdir -p $(STAMP_DIR)/unpatches; \
+ for F in $(shell ls -1 $(STAMP_DIR)/patches | tac); do \
+ LOG=$(STAMP_DIR)/unpatches/$$F; \
+ echo -n "Unapplying patch $(PATCH_DIR)/$$F ... "; \
+ if cat $(PATCH_DIR)/$$F | (cd $(SOURCE_DIR); \
+ patch -p0 -R --no-backup-if-mismatch ) >$$LOG 2>&1; \
+ then \
+ echo "successful."; \
+ else \
+ echo "failed! (check $$LOG for reason)"; \
+ exit 1; \
+ fi; \
+ done; \
+ fi
+
+clean: unpatch cleanscripts
dh_testdir
rm -rf $(STAMP_DIR) $(SOURCE_DIR)
perl $(SCRIPT_DIR)/dbs_split clean
@@ -771,6 +791,7 @@
.PHONY: genscripts cleanscripts
.PHONY: updatepo
.PHONY: patch-audit
+.PHONY: unpatch
.PHONY: clean install
.PHONY: build build-arch-only build-all real-build
.PHONY: binary binary-arch binary-indep
Reply to: