[ -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 \
$(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'; \
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/%
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
# 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'; \
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'; \
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/%
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)) \