chiark / gitweb /
dgit: With sbuild, unapply patches in right dir
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Sep 2016 21:41:16 +0000 (22:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 11 Sep 2016 17:56:03 +0000 (18:56 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index 8a097da..9539849 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -4164,6 +4164,7 @@ sub cmd_sbuild {
            " building would result in ambiguity about the intended results"
            if @unwanted;
     }
+    my $wasdir = must_getcwd();
     changedir "..";
     if (act_local()) {
        stat_exists $dscfn or fail "$dscfn (in parent directory): $!";
@@ -4192,6 +4193,7 @@ sub cmd_sbuild {
            rename "$cf", "$cf.inmulti" or fail "$cf\{,.inmulti}: $!";
        }
     }
+    changedir $wasdir;
     maybe_unapply_patches_again();
     printdone "build successful, results in $multichanges\n" or die $!;
 }