The following commit has been merged in the master branch:
commit e763a075eb28dbd901a2b39262ab86695bdc4d03
Author: Niels Thykier <[email protected]>
Date:   Tue Apr 30 19:00:03 2013 +0200

    r/harness: Check calls to {unlink,rename,symlink}
    
    Signed-off-by: Niels Thykier <[email protected]>

diff --git a/reporting/harness b/reporting/harness
index 5f7c89c..a41721c 100755
--- a/reporting/harness
+++ b/reporting/harness
@@ -141,15 +141,21 @@ unless ($opt{'dry-run'}) {
     if ($LINTIAN_GPG_CHECK) {
         foreach my $g (qw(gpg gpgv)) {
             if (-l "$LINTIAN_BIN_DIR/$g") {
-                unlink "$LINTIAN_BIN_DIR/$g";
+                unlink("$LINTIAN_BIN_DIR/$g")
+                    or Die("unlink $LINTIAN_BIN_DIR/$g: $!");
             } else {
-                rename "$LINTIAN_BIN_DIR/$g", "$LINTIAN_BIN_DIR/${g}.bkp";
+                rename("$LINTIAN_BIN_DIR/$g", "$LINTIAN_BIN_DIR/${g}.bkp")
+                    or Die("rename $LINTIAN_BIN_DIR/$g"
+                           . " $LINTIAN_BIN_DIR/${g}.bkp: $!");
             }
         }
     } else {
         foreach my $g (qw(gpg gpgv)) {
-            symlink '/bin/true', "$LINTIAN_BIN_DIR/$g"
-                unless -f "$LINTIAN_BIN_DIR/$g";
+            if (! -f "$LINTIAN_BIN_DIR/$g") {
+                symlink('/bin/true', "$LINTIAN_BIN_DIR/$g")
+                    or Die("symlink /bin/true $LINTIAN_BIN_DIR/$g: $!");
+            }
+
         }
         # Passed to coll/unpacked
         $ENV{'LINTIAN_COLL_UNPACKED_SKIP_SIG'} = 1;

-- 
Debian package checker


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to