[dh-r] 10/43: Only delete if the file exists

Gordon Ball chronitis-guest at moszumanska.debian.org
Thu Sep 15 13:45:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

chronitis-guest pushed a commit to branch master
in repository dh-r.

commit 7e194b53eb3133f3a032d8c2ea43ea938a0b7a4f
Author: Gordon Ball <gordon at chronitis.net>
Date:   Thu Sep 1 17:50:24 2016 +0200

    Only delete if the file exists
---
 dh/R.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dh/R.pm b/dh/R.pm
index c106b60..bffd05c 100644
--- a/dh/R.pm
+++ b/dh/R.pm
@@ -159,7 +159,9 @@ sub install {
 
     my @toremove = ("R.css", "COPYING", "COPYING.txt", "LICENSE", "LICENSE.txt");
     foreach my $rmf (@toremove) {
-        $this->doit_in_sourcedir("rm", "-vf", "$destdir/$libdir/$rpackage/$rmf");
+        if (-e "$destdir/$libdir/$rpackage/$rmf") {
+            $this->doit_in_sourcedir("rm", "-vf", "$destdir/$libdir/$rpackage/$rmf");
+        }
     }
 
     my $sourcepackage = $this->sourcepackage();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/dh-r.git



More information about the debian-science-commits mailing list