[SCM] Git repository for devscripts branch, master, updated. v2.11.7-71-g1fc8c08
Benjamin Drung
bdrung at debian.org
Sun Jun 17 18:40:46 UTC 2012
The following commit has been merged in the master branch:
commit 1fc8c0871462b207f68196debf83415b295ed6dc
Author: Benjamin Drung <bdrung at debian.org>
Date: Sun Jun 17 20:40:31 2012 +0200
wrap-and-sort: Fix damaging debian/install with no newline at the end of file.
LP: #1014365
diff --git a/debian/changelog b/debian/changelog
index be0ca89..48954bc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,8 @@ devscripts (2.11.9) UNRELEASED; urgency=low
* debchange: Use the Dpkg::Vendor Perl API directly to avoid the overhead
of the command line dpkg-vendor script.
* Use dpkg-buildflags for C code.
+ * wrap-and-sort: Fix damaging debian/install with no newline at the
+ end of file (LP: #1014365).
-- David Prévot <taffit at debian.org> Thu, 31 May 2012 12:12:02 -0400
diff --git a/scripts/wrap-and-sort b/scripts/wrap-and-sort
index cb7ec85..b6d5464 100755
--- a/scripts/wrap-and-sort
+++ b/scripts/wrap-and-sort
@@ -104,13 +104,13 @@ class Install(object):
def open(self, filename):
assert os.path.isfile(filename), "%s does not exist." % (filename)
self.filename = filename
- self.content = open(filename).readlines()
+ self.content = [l.strip() for l in open(filename).readlines()]
def save(self, filename=None):
if filename:
self.filename = filename
install_file = open(self.filename, "w")
- install_file.write("".join(self.content))
+ install_file.write("\n".join(self.content) + "\n")
install_file.close()
def sort(self):
--
Git repository for devscripts
More information about the devscripts-devel
mailing list