[libfile-mimeinfo-perl] 01/01: fix for always reporting text/plain when reading from stdin (--stdin option), Closes #784545
Simon Kainz
skainz at moszumanska.debian.org
Thu Jan 19 12:51:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
skainz pushed a commit to branch master
in repository libfile-mimeinfo-perl.
commit 5df2d0a525757237b9154d52234b816fc7b5bf4e
Author: Simon Kainz <Simon Kainz skainz at debian.org>
Date: Thu Jan 19 13:46:21 2017 +0100
fix for always reporting text/plain when reading from stdin (--stdin option), Closes #784545
---
debian/changelog | 8 ++++++--
debian/patches/fix_read_from_stdin.patch | 16 ++++++++++++++++
debian/patches/series | 1 +
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index cdc2516..029c77b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-libfile-mimeinfo-perl (0.28-1) UNRELEASED; urgency=medium
+libfile-mimeinfo-perl (0.28-1) unstable; urgency=medium
PROBLEM:
test fail if the optional build dependency libpath-tiny-perl is installed
@@ -18,7 +18,11 @@ libfile-mimeinfo-perl (0.28-1) UNRELEASED; urgency=medium
* Bump debhelper compatibility level to 9.
* Add a patch to fix a spelling mistake in the documentation.
- -- gregor herrmann <gregoa at debian.org> Mon, 28 Nov 2016 21:48:38 +0100
+ [ Simon Kainz ]
+ * fix for always reporting text/plain when reading from stdin,
+ (Closes: #784545)
+
+ -- Simon Kainz <skainz at debian.org> Thu, 19 Jan 2017 13:12:27 +0100
libfile-mimeinfo-perl (0.27-1) unstable; urgency=medium
diff --git a/debian/patches/fix_read_from_stdin.patch b/debian/patches/fix_read_from_stdin.patch
new file mode 100644
index 0000000..0321506
--- /dev/null
+++ b/debian/patches/fix_read_from_stdin.patch
@@ -0,0 +1,16 @@
+Description: fix reading from stdin always reporting text/plain mime-type
+Origin: vendor
+Author: Simon Kainz <skainz at debian.org>
+Bug-Debian: https://bugs.debian.org/784545
+Last-Update: 2017-01-19
+
+--- libfile-mimeinfo-perl-0.28.orig/mimetype
++++ libfile-mimeinfo-perl-0.28/mimetype
+@@ -166,6 +166,7 @@ if ($args{stdin}) {
+ # --stdin
+ if ($args{stdin}) {
+ my $data;
++ &File::MimeInfo::Magic::rehash();
+ read(STDIN, $data, $File::MimeInfo::Magic::max_buffer);
+ my $scalar = new IO::Scalar \$data;
+ print $format->('STDIN', mimetype($scalar)), "\n";
diff --git a/debian/patches/series b/debian/patches/series
index 5299247..9fc9018 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
spelling.patch
+fix_read_from_stdin.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libfile-mimeinfo-perl.git
More information about the Pkg-perl-cvs-commits
mailing list