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

jamessan pushed a commit to branch master
in repository devscripts.

commit eff4f287d7d787cb8e5ed0665da07244a0b7b14a
Author: James McCoy <[email protected]>
Date:   Thu Apr 21 19:55:56 2016 -0400

    mk-build-deps: Check $opt_remove before removing $deb_files[$i]
    
    Upon successfully installing a .deb, the file should only be removed if
    the user requested us to do so.  Regression introduced in
    32731f6a41e69740bbbaa86f372059d44cf85605.
    
    Remove dead code (after a die statement) which was another artifact
    of the above commit.
    
    Signed-off-by: James McCoy <[email protected]>
---
 debian/changelog         | 7 +++++++
 scripts/mk-build-deps.pl | 8 +-------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f393fdf..98d6ecc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+devscripts (2.16.4) UNRELEASED; urgency=medium
+
+  * mk-build-deps:
+    + Only remove the deb after install if --remove was specified.
+
+ -- James McCoy <[email protected]>  Thu, 21 Apr 2016 19:53:58 -0400
+
 devscripts (2.16.3) unstable; urgency=medium
 
   [ James McCoy ]
diff --git a/scripts/mk-build-deps.pl b/scripts/mk-build-deps.pl
index e2c3b1e..4e31654 100755
--- a/scripts/mk-build-deps.pl
+++ b/scripts/mk-build-deps.pl
@@ -402,7 +402,7 @@ if ($opt_install) {
                warn "$progname: Unable to install $pkg";
                $err = 1;
            }
-           else {
+           elsif ($opt_remove) {
                unlink $deb_files[$i];
            }
        }
@@ -415,12 +415,6 @@ if ($opt_install) {
        # resolve a proper way to get the build-dep packages installed
        system @root, 'dpkg', '--remove', @pkg_names;
        die("$progname: Unable to install all build-dep packages\n");
-
-       if ($opt_remove) {
-           foreach my $file (@deb_files) {
-               unlink $file;
-           }
-       }
     }
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/collab-maint/devscripts.git

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to