|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #16017 continues cleanly even on failure
Submitted: 2002-03-12 07:51 UTC Modified: 2002-06-12 01:00 UTC
From: adconrad at 0c3 dot net Assigned:
Status: No Feedback Package: PEAR related
PHP Version: 4.1.2 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
28 - 13 = ?
Subscribe to this entry?

 [2002-03-12 07:51 UTC] adconrad at 0c3 dot net
build/ 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:

---       Tue Mar 13 10:54:38 2001
+++   Tue Mar 12 05:45:22 2002
@@ -62,11 +62,12 @@
        @rm -f $(SUBDIRS) 2>/dev/null || true
-       @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)


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jan 18 14:01:23 2020 UTC