|  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: adconrad at 0c3 dot net
New email:
PHP Version: OS:


 [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-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 02:01:28 2024 UTC