summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2018-05-05 02:50:03 +0200
committerGuillem Jover <guillem@debian.org>2018-05-05 03:30:39 +0200
commit43dc5fa95f5241ce790b727c405f96caaad12c19 (patch)
treed0637a775aa7fd22b33127d20f4078e275eb34ac /debian
parent2dc4354934aa940ea37324e0aabde4f6379536f0 (diff)
downloaddpkg-43dc5fa95f5241ce790b727c405f96caaad12c19.tar.gz
Dpkg::Changelog::Parse: Stop using tail(1) to read the end of the file
Instead of relying on the tail command, simply read the end of the file ourselves, assuming a packed set of 80 character lines, reading 4096 bytes before the end, implies around 51 lines, which is close to the 40 lines currently used. This should be both faster and should improve portability, because even if we are using the POSIX -n option, some systems do not have a POSIX compliant tail(1) on the default path, such as Solaris. Analysis-by: James Clarke <jrtc27@debian.org>
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog4
1 files changed, 4 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 8eb639c44..36b5594d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -99,6 +99,10 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
alias. Emit a specific perl warning until 1.20.x so that users can check
whether the semantic change has any impact on the code, which can then
be quiesced. Closes: #895004
+ - Dpkg::Changelog::Parse: When detecting the changelog format, read the
+ last 4KiB of the file instead of using «tail -n40», which should be
+ both faster and more portable, as the default tail(1) is not POSIX
+ compliant on all systems (c.f. Solaris).
* Documentation:
- Update gettext minimal version in README.
- Add a missing dot on the dpkg-buildflags(1) «lfs» feature paragraph.