[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force XOrg SVN commit: r15 - xorg/trunk/debian



Author: fabbione
Date: 2004-10-02 00:10:35 -0500 (Sat, 02 Oct 2004)
New Revision: 15

Modified:
   xorg/trunk/debian/CHANGESETS
   xorg/trunk/debian/rules
Log:
Add sanity checks to verify consistency between debian/control and the list of
tars actually created from the source and viceversa.



Modified: xorg/trunk/debian/CHANGESETS
===================================================================
--- xorg/trunk/debian/CHANGESETS	2004-10-01 12:06:17 UTC (rev 14)
+++ xorg/trunk/debian/CHANGESETS	2004-10-02 05:10:35 UTC (rev 15)
@@ -16,4 +16,8 @@
   not want to ship.
     14
 
+* Add sanity checks to verify consistency between debian/control and the list of
+  tars actually created from the source and viceversa.
+    15
+
 vim:set ai et sts=4 sw=4 tw=80:

Modified: xorg/trunk/debian/rules
===================================================================
--- xorg/trunk/debian/rules	2004-10-01 12:06:17 UTC (rev 14)
+++ xorg/trunk/debian/rules	2004-10-02 05:10:35 UTC (rev 15)
@@ -33,11 +33,36 @@
 
 	touch $@
 
-binary-arch: build
+sanity-checks: $(STAMP_DIR)/sanity-checks
+$(STAMP_DIR)/sanity-checks: build
 	dh_testdir
+	mkdir -p debian/checks
+	cat debian/control | grep ^Package | awk '{print $$NF}' > debian/checks/controllist
+	cd $(SOURCE_DIR)/tarballs && \
+	ls *.tar.gz | sed -e 's/.tar.gz//g' | tr '[A-Z]' '[a-z]' > ../../debian/checks/tarlist && \
+	cd - > /dev/null
+	for i in `cat debian/checks/controllist`; do \
+	  if ! grep -q ^$$i$$ debian/checks/tarlist; then \
+	    echo "ERROR: $$i" && \
+	    echo "is defined in debian/control but has not been built!" && \
+	    exit 1; \
+	  fi; \
+	done
+	for i in `cat debian/checks/tarlist`; do \
+	  if ! grep -q ^$$i$$ debian/checks/controllist; then \
+	    echo "ERROR: $$i" && \
+	    echo "has been built but is not defined in debian/control!" && \
+	    exit 1; \
+	  fi; \
+	done
 
-binary-indep: build
+	touch $@
+
+binary-arch: sanity-checks
 	dh_testdir
+
+binary-indep: sanity-checks
+	dh_testdir
 	dh_installdirs
 	dh_installchangelogs
 	dh_installdocs
@@ -64,7 +89,7 @@
 clean:
 	dh_testdir
 	dh_clean
-	rm -rf $(STAMP_DIR) $(SOURCE_DIR)
+	rm -rf $(STAMP_DIR) $(SOURCE_DIR) debian/checks
 	perl $(SCRIPT_DIR)/dbs_split clean
 
 # vim:set noet ai sts=8 sw=8 tw=0:



Reply to: