[devscripts] 01/01: wrap-and-sort: Sanitize spaces between alternative package names.
Benjamin Drung
bdrung at moszumanska.debian.org
Mon May 12 20:06:49 UTC 2014
This is an automated email from the git hooks/post-receive script.
bdrung pushed a commit to branch master
in repository devscripts.
commit 8db40b29f68be7a11273312923e84e2841c90075
Author: Benjamin Drung <bdrung at debian.org>
Date: Mon May 12 22:06:33 2014 +0200
wrap-and-sort: Sanitize spaces between alternative package names.
Closes: #747818
---
debian/changelog | 7 +++++++
debian/copyright | 2 +-
scripts/wrap-and-sort | 6 +++++-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 5a4d02f..7a938a7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+devscripts (2.14.3) UNRELEASED; urgency=medium
+
+ * wrap-and-sort: Sanitize spaces between alternative package names.
+ (Closes: #747818)
+
+ -- Benjamin Drung <bdrung at debian.org> Mon, 12 May 2014 22:01:14 +0200
+
devscripts (2.14.2) unstable; urgency=medium
[ Jakub Wilk ]
diff --git a/debian/copyright b/debian/copyright
index 10b7406..bcadd3e 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -89,7 +89,7 @@ Files: doc/suspicious-source.1
scripts/setup.py
scripts/suspicious-source
scripts/wrap-and-sort
-Copyright: 2009-2013, Benjamin Drung <bdrung at debian.org>
+Copyright: 2009-2014, Benjamin Drung <bdrung at debian.org>
2010-2011, Stefano Rivera <stefanor at ubuntu.com>
License: ISC
Permission to use, copy, modify, and/or distribute this software for any
diff --git a/scripts/wrap-and-sort b/scripts/wrap-and-sort
index 444df74..ef04847 100755
--- a/scripts/wrap-and-sort
+++ b/scripts/wrap-and-sort
@@ -1,6 +1,6 @@
#!/usr/bin/python3
#
-# Copyright (C) 2010-2013, Benjamin Drung <bdrung at debian.org>
+# Copyright (C) 2010-2014, Benjamin Drung <bdrung at debian.org>
# 2010, Stefano Rivera <stefanor at ubuntu.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
@@ -74,6 +74,10 @@ class WrapAndSortControl(Control):
def _wrap_field(self, control, entry, wrap_always, short_indent,
trailing_comma, sort=True):
packages = [x.strip() for x in control[entry].split(",")]
+
+ # Sanitize alternative packages. E.g. "a|b |c" -> "a | b | c"
+ packages = [" | ".join([x.strip() for x in p.split("|")]) for p in packages]
+
if sort:
# Remove duplicate entries
packages = set(packages)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list