X Strike Force XOrg SVN commit: r16 - xorg/trunk/debian
Author: fabbione
Date: 2004-10-02 00:26:10 -0500 (Sat, 02 Oct 2004)
New Revision: 16
Modified:
xorg/trunk/debian/CHANGESETS
xorg/trunk/debian/rules
Log:
Document debian/rules target sanity-checks.
Always run all the checks to catch all the problems in one run.
Modified: xorg/trunk/debian/CHANGESETS
===================================================================
--- xorg/trunk/debian/CHANGESETS 2004-10-02 05:10:35 UTC (rev 15)
+++ xorg/trunk/debian/CHANGESETS 2004-10-02 05:26:10 UTC (rev 16)
@@ -20,4 +20,8 @@
tars actually created from the source and viceversa.
15
+* Document debian/rules target sanity-checks and always run all the checks
+ instead of failing at the first error to catch all the problems in one run.
+ 16
+
vim:set ai et sts=4 sw=4 tw=80:
Modified: xorg/trunk/debian/rules
===================================================================
--- xorg/trunk/debian/rules 2004-10-02 05:10:35 UTC (rev 15)
+++ xorg/trunk/debian/rules 2004-10-02 05:26:10 UTC (rev 16)
@@ -37,24 +37,50 @@
$(STAMP_DIR)/sanity-checks: build
dh_testdir
mkdir -p debian/checks
+
+ # Create list of packages declared in debian/control.
+
cat debian/control | grep ^Package | awk '{print $$NF}' > debian/checks/controllist
+
+ # Create list of packages that have been built from the source.
+
cd $(SOURCE_DIR)/tarballs && \
ls *.tar.gz | sed -e 's/.tar.gz//g' | tr '[A-Z]' '[a-z]' > ../../debian/checks/tarlist && \
cd - > /dev/null
+
+ # Double check the lists against each others. These tests will catch:
+ #
+ # - a package that has been declared in debian/control but has not been built
+ # due to the following possible reasons:
+ # + package has been banned (see debian/scripts/indipendent-sources)
+ # + package has been removed from the upstream tree
+ # + package has been renamed within the upstream tree
+ # + package changed location within the upstream tree
+ #
+ # - a package that has been built but not declared in debian/control
+ # due to the following possible reasons:
+ # + package has been added in the upstream tree
+ # + package has been renamed within the upstream tree
+ # + package changed location within the upstream tree
+
+ error=0 && \
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; \
+ error=1; \
fi; \
- done
+ 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; \
+ error=1; \
fi; \
- done
+ done && \
+ if [ "$$error" = "1" ]; then \
+ exit 1; \
+ fi
touch $@
Reply to: