[23556] in Source-Commits
/svn/athena r23197 - in trunk/debathena/debathena/config-package-dev: . debian
daemon@ATHENA.MIT.EDU (andersk@MIT.EDU)
Sat Oct 4 00:29:45 2008
Date: Sat, 4 Oct 2008 00:29:17 -0400 (EDT)
From: andersk@MIT.EDU
Message-Id: <200810040429.AAA29858@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: andersk
Date: 2008-10-04 00:29:16 -0400 (Sat, 04 Oct 2008)
New Revision: 23197
Modified:
trunk/debathena/debathena/config-package-dev/check-files.mk
trunk/debathena/debathena/config-package-dev/debconf-divert.mk
trunk/debathena/debathena/config-package-dev/debian/changelog
trunk/debathena/debathena/config-package-dev/divert.mk
trunk/debathena/debathena/config-package-dev/transform-files.mk
Log:
In config-package-dev:
[ Tim Abbott ]
[ Anders Kaseorg ]
* Use set -e in multi-statement Makefile commands.
Modified: trunk/debathena/debathena/config-package-dev/check-files.mk
===================================================================
--- trunk/debathena/debathena/config-package-dev/check-files.mk 2008-10-04 04:10:53 UTC (rev 23196)
+++ trunk/debathena/debathena/config-package-dev/check-files.mk 2008-10-04 04:29:16 UTC (rev 23197)
@@ -66,6 +66,7 @@
[ -n $(package) ]
mkdir -p $(@D)
cp "$(truename)" $@
+ set -e; \
md5=$$(dpkg-query --showformat='$${Conffiles}\n' --show $(package) | \
sed -n 's,^ $(name) \([0-9a-f]*\)$$,\1 $@, p'); \
if [ -n "$$md5" ]; then \
Modified: trunk/debathena/debathena/config-package-dev/debconf-divert.mk
===================================================================
--- trunk/debathena/debathena/config-package-dev/debconf-divert.mk 2008-10-04 04:10:53 UTC (rev 23196)
+++ trunk/debathena/debathena/config-package-dev/debconf-divert.mk 2008-10-04 04:29:16 UTC (rev 23197)
@@ -28,7 +28,8 @@
$(if $(wildcard debian/$(package).debconf-hack),$(package)))
$(patsubst %,debian-debconf-hack/%,$(DEB_DEBCONF_HACK_PACKAGES)) :: debian-debconf-hack/%:
- ( \
+ set -e; \
+ { \
cat $(DEB_DEBCONF_HACK_SCRIPT); \
echo 'if [ ! -f /var/cache/$(cdbs_curpkg).debconf-save ]; then'; \
echo ' debconf_get $(shell cut -d' ' -f2 debian/$(cdbs_curpkg).debconf-hack) >/var/cache/$(cdbs_curpkg).debconf-save'; \
@@ -36,21 +37,23 @@
sed 's/$$/ true/' debian/$(cdbs_curpkg).debconf-hack; \
echo 'EOF'; \
echo 'fi'; \
- ) >> $(CURDIR)/debian/$(cdbs_curpkg).preinst.debhelper
- ( \
+ } >> $(CURDIR)/debian/$(cdbs_curpkg).preinst.debhelper
+ set -e; \
+ { \
cat $(DEB_DEBCONF_HACK_SCRIPT); \
echo 'if [ -f /var/cache/$(cdbs_curpkg).debconf-save ]; then'; \
echo ' debconf_set </var/cache/$(cdbs_curpkg).debconf-save'; \
echo ' rm -f /var/cache/$(cdbs_curpkg).debconf-save'; \
echo 'fi'; \
- ) >> $(CURDIR)/debian/$(cdbs_curpkg).postinst.debhelper
- ( \
+ } >> $(CURDIR)/debian/$(cdbs_curpkg).postinst.debhelper
+ set -e; \
+ { \
cat $(DEB_DEBCONF_HACK_SCRIPT); \
echo 'if [ -f /var/cache/$(cdbs_curpkg).debconf-save ]; then'; \
echo ' debconf_set </var/cache/$(cdbs_curpkg).debconf-save'; \
echo ' rm -f /var/cache/$(cdbs_curpkg).debconf-save'; \
echo 'fi'; \
- ) >> $(CURDIR)/debian/$(cdbs_curpkg).postrm.debhelper
+ } >> $(CURDIR)/debian/$(cdbs_curpkg).postrm.debhelper
$(patsubst %,binary-fixup/%,$(DEB_DEBCONF_HACK_PACKAGES)) :: binary-fixup/%: debian-debconf-hack/%
Modified: trunk/debathena/debathena/config-package-dev/debian/changelog
===================================================================
--- trunk/debathena/debathena/config-package-dev/debian/changelog 2008-10-04 04:10:53 UTC (rev 23196)
+++ trunk/debathena/debathena/config-package-dev/debian/changelog 2008-10-04 04:29:16 UTC (rev 23197)
@@ -1,10 +1,14 @@
config-package-dev (4.9) unstable; urgency=low
+ [ Tim Abbott ]
* Fix destdir handling for multiple binary packages in
DEB_TRANSFORM_FILES.
- -- Tim Abbott <tabbott@mit.edu> Fri, 3 Oct 2008 23:43:49 -0400
+ [ Anders Kaseorg ]
+ * Use set -e in multi-statement Makefile commands.
+ -- Anders Kaseorg <andersk@mit.edu> Sat, 04 Oct 2008 00:28:23 -0400
+
config-package-dev (4.8) unstable; urgency=low
* Add additional documentation to the makefile fragments
Modified: trunk/debathena/debathena/config-package-dev/divert.mk
===================================================================
--- trunk/debathena/debathena/config-package-dev/divert.mk 2008-10-04 04:10:53 UTC (rev 23196)
+++ trunk/debathena/debathena/config-package-dev/divert.mk 2008-10-04 04:29:16 UTC (rev 23197)
@@ -64,7 +64,8 @@
# Writing shell scripts in makefiles sucks. Remember to $$ shell
# variables and include \ at the end of each line.
# Add code to postinst to add/remove diversions as appropriate
- ( \
+ set -e; \
+ { \
sed 's/#PACKAGE#/$(cdbs_curpkg)/g; s/#DEB_DIVERT_EXTENSION#/$(DEB_DIVERT_EXTENSION)/g' $(DEB_DIVERT_SCRIPT); \
$(if $(divert_files_all), \
echo 'if [ "$$1" = "configure" ]; then'; \
@@ -89,9 +90,10 @@
echo " divert_remove $(file) /usr/share/$(cdbs_curpkg)/`$(DEB_DIVERT_ENCODER) $(file)`";) \
echo 'fi'; \
) \
- ) >> $(CURDIR)/debian/$(cdbs_curpkg).postinst.debhelper
+ } >> $(CURDIR)/debian/$(cdbs_curpkg).postinst.debhelper
# Add code to prerm script to undo diversions when package is removed.
- ( \
+ set -e; \
+ { \
sed 's/#PACKAGE#/$(cdbs_curpkg)/g; s/#DEB_DIVERT_EXTENSION#/$(DEB_DIVERT_EXTENSION)/g' $(DEB_DIVERT_SCRIPT); \
$(if $(divert_files_thispkg), \
echo 'if [ "$$1" = "remove" ]; then'; \
@@ -101,21 +103,22 @@
echo " undivert_unremove $(file) $(cdbs_curpkg)";) \
echo 'fi'; \
) \
- ) >> $(CURDIR)/debian/$(cdbs_curpkg).prerm.debhelper
+ } >> $(CURDIR)/debian/$(cdbs_curpkg).prerm.debhelper
# Add an encoding of the names of the diverted files to the Provides:
# and Conflicts: lists. This prevents two packages diverting the same
# file from being installed simultaneously (it cannot work, and this
# produces a much less ugly error). Requires in debian/control:
# Provides: $(diverted-files)
# Conflicts: $(diverted-files)
- ( \
+ set -e; \
+ { \
echo -n "diverted-files="; \
$(foreach file,$(divert_files_thispkg),\
echo -n "diverts-"; \
${DEB_DIVERT_ENCODER} "$(call divert_files_replace_name,$(file))"; \
echo -n ", ";) \
- echo \
- ) >> $(CURDIR)/debian/$(cdbs_curpkg).substvars
+ echo; \
+ } >> $(CURDIR)/debian/$(cdbs_curpkg).substvars
$(patsubst %,binary-post-install/%,$(DEB_DIVERT_PACKAGES)) :: binary-post-install/%: debian-divert/%
Modified: trunk/debathena/debathena/config-package-dev/transform-files.mk
===================================================================
--- trunk/debathena/debathena/config-package-dev/transform-files.mk 2008-10-04 04:10:53 UTC (rev 23196)
+++ trunk/debathena/debathena/config-package-dev/transform-files.mk 2008-10-04 04:29:16 UTC (rev 23197)
@@ -41,6 +41,7 @@
debian/transform_$(notdir $(call undebian_transform_files,$@))) < $< > $@
$(patsubst %,binary-install/%,$(DEB_ALL_PACKAGES)) :: binary-install/%:
+ set -e; \
$(foreach file,$(DEB_TRANSFORM_FILES_$(cdbs_curpkg)), \
install -d debian/$(cdbs_curpkg)/$(dir $(file)); \
cp -a $(call debian_transform_files,$(file)) \