The following commit has been merged in the master branch:
commit b4d4968715f3ca5498bba7b35b385a26d0c96151
Author: Guillem Jover <guil...@debian.org>
Date:   Sat Nov 7 13:23:50 2009 +0100

    dpkg: Do not bogusly ignore find exit code 1
    
    Commit 68b56dc4edaaf90f5311f07b38871ddd61b84a48 introduced the
    PROCNOERR to try to handle and be able to ignore find exit code 1,
    which supposedly happened (not any longer) when using the -follow
    option and a dangling symlink was found.
    
    But it only prevented the ohshit() inside checksubprocerr(), and the
    return value was still -1, so it was not ignoring the exit code 1,
    and still ohshit()ing in the caller.
    
    As find does currently exit with a 0 code even when finding broken
    symlinks, let's remove this piece of broken logic.

diff --git a/src/archives.c b/src/archives.c
index 75e9232..6a4b42a 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -1118,7 +1118,7 @@ void archivefiles(const char *const *argv) {
     if (ferror(pf)) ohshite(_("error reading find's pipe"));
     if (fclose(pf)) ohshite(_("error closing find's pipe"));
     r = subproc_wait_check(fc, "find", PROCNOERR);
-    if(!(r==0 || r==1))
+    if (r != 0)
       ohshit(_("find for --recursive returned unhandled error %i"),r);
 
     if (!nfiles)

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to