[debrepatch] 02/02: Workaround dpkg #865430

Ximin Luo infinity0 at debian.org
Wed Jun 21 12:20:53 UTC 2017


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

infinity0 pushed a commit to branch master
in repository debrepatch.

commit 92e2364776833b949160dbc99ff56ae5898bd31f
Author: Ximin Luo <infinity0 at debian.org>
Date:   Wed Jun 21 14:20:30 2017 +0200

    Workaround dpkg #865430
---
 debpatch | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debpatch b/debpatch
index eb522f2..a70ed24 100755
--- a/debpatch
+++ b/debpatch
@@ -45,6 +45,11 @@ CHBLOCK_DUMMY_PACKAGE = "debpatch PLACEHOLDER"
 TRY_ENCODINGS = ["utf-8", "latin-1"]
 DISTRIBUTION_DEFAULT = "experimental"
 
+def workaround_dpkg_865430(dscfile, origdir, stdout):
+    f = subprocess.check_output(["dcmd", "--tar", "echo", dscfile])
+    if not os.path.exists(os.path.join(origdir.encode("utf-8"), os.path.basename(f))):
+        C(["dcmd", "--tar", "cp", dscfile, origdir], stdout=stdout)
+
 def is_dch(path):
     return (basename(path) == 'changelog'
         and basename(dirname(path)) == 'debian'
@@ -254,6 +259,7 @@ def main(args):
             builddir = os.path.join(extractdir, parts[0]) # dpkg-source doesn't like existing dirs
             C(["dpkg-source", "-x", "--skip-patches", dscfile, builddir], stdout=stdout)
             origdir = os.getcwd()
+            workaround_dpkg_865430(dscfile, origdir, stdout)
             os.chdir(builddir)
             did_patch = debpatch(patch, patch_name, args)
             if dry_run or not did_patch:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debrepatch.git



More information about the Reproducible-commits mailing list