Bug #16017: rule_pear.mk continues cleanly even on failure
| From: | adconrad at 0c3 dot net | Date: | Tue, 12 Mar 2002 12:51:01 +0000 |
| Subject: | Bug #16017: rule_pear.mk continues cleanly even on failure | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-4964@lists.php.net to get a copy of this message | ||
From: adconrad@0c3.net
Operating system: Linux
PHP version: 4.1.2
PHP Bug Type: PEAR related
Bug description: rule_pear.mk continues cleanly even on failure
build/rules_pear.mk contains a contruct in the install-modules target
whereby no matter what happens, the rule will always succeed. From an
autobuilding and packaging perspective (as in the case of Debian, for
instance), this is horribly broken, as it could lead to empty packages,
with no one the wiser.
The reason for the "|| true" was so that the rule wouldn't bomb out if
there were no modules to install, however it causes the exact opposite
problem instead (if there is are supposed to be modules, but they don't
get built correctly, we continue on anyway).
What follows is a patch to change the behaviour so that we still carry on
gracefully if there's no "modules" directory, but if there is one, we will
die horribly if installing from it fails:
--------
--- rules_pear.mk Tue Mar 13 10:54:38 2001
+++ rules_pear.mk.new Tue Mar 12 05:45:22 2002
@@ -62,11 +62,12 @@
@rm -f $(SUBDIRS) 2>/dev/null || true
install-modules:
- @test -d modules && \
+ if [ -d modules ]; then \
$(mkinstalldirs) $(moduledir) && \
echo "installing shared modules into $(moduledir)" && \
rm -f modules/*.la && \
- cp modules/* $(moduledir) || true
+ cp modules/* $(moduledir); \
+ fi
include $(builddir)/.deps
-----------
... Adam Conrad
(the new Debian php4 maintainer)
--
Edit bug report at http://bugs.php.net/?id=16017&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16017&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16017&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16017&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16017&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16017&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16017&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16017&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16017&r=submittedtwice