[debrepatch] 03/03: debpatch: remove the last use of dpkg-parsechangelog
Ximin Luo
infinity0 at debian.org
Tue Apr 18 18:27: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 1ab61902878ddeacac6e0202eb42f6f02f3b9cb7
Author: Ximin Luo <infinity0 at debian.org>
Date: Tue Apr 18 20:27:31 2017 +0200
debpatch: remove the last use of dpkg-parsechangelog
---
debpatch | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/debpatch b/debpatch
index b6a5304..578392a 100755
--- a/debpatch
+++ b/debpatch
@@ -70,11 +70,10 @@ def apply_dch_patch(source_file, current, patch_name, old_version, target, dry_r
dch_env = dict(os.environ)
if not old_version or not target_version.startswith(old_version):
- logging.warn("don't know how to reapply version-change %s to %s" %
- (old_version, target_version))
- version = subprocess.check_output(["sh", "-c",
- "EDITOR=cat dch -n 2>/dev/null | dpkg-parsechangelog -l- -SVersion"
- ]).decode("utf-8").rstrip()
+ logging.warn("don't know how to rebase version-change (%s => %s) onto %s" %
+ (old_version, target_version, old_version))
+ newlog = subprocess.getoutput("EDITOR=cat dch -n 2>/dev/null").rstrip()
+ version = str(Changelog(newlog, 1)[0].version)
logging.warn("using version %s based on `dch -n`; feel free to make me smarter", version)
else:
version_suffix = target_version[len(old_version):]
--
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