[SCM] Debian packaging of libaudio-mpd-perl branch, master, updated. debian/1.112670-1-9-g48931aa

Florian Schlichting fschlich at zedat.fu-berlin.de
Wed Feb 29 22:48:49 UTC 2012


The following commit has been merged in the master branch:
commit 943dba1d547f2eb97687c45e24e3eac2a0b6ee5c
Author: Florian Schlichting <fschlich at zedat.fu-berlin.de>
Date:   Wed Feb 29 23:26:56 2012 +0100

    Added bug655669-mpd-dynamic.patch and bug655670-mpd-rate.patch

diff --git a/debian/changelog b/debian/changelog
index b2fa963..92f0f5e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,9 @@ libaudio-mpd-perl (1.113280-1) UNRELEASED; urgency=low
 
   [ Florian Schlichting ]
   * Bumped Standards-Version to 3.9.3 (use copyright-format 1.0).
+  * Added bug655669-mpd-dynamic.patch and bug655670-mpd-rate.patch, fixing
+    Perl errors and warnings when no song is playing (Closes: #655669,
+    #655670).
 
  -- gregor herrmann <gregoa at debian.org>  Fri, 25 Nov 2011 15:21:37 +0100
 
diff --git a/debian/patches/bug655669-mpd-dynamic.patch b/debian/patches/bug655669-mpd-dynamic.patch
new file mode 100644
index 0000000..1ed3822
--- /dev/null
+++ b/debian/patches/bug655669-mpd-dynamic.patch
@@ -0,0 +1,27 @@
+Description: silence Perl warnings with inactive mpd
+ It does the right thing, but it looks somewhat ugly when mpd doesn't
+ have an audio collection or there's no song currently running.
+Author: Florian Schlichting <fschlich at zedat.fu-berlin.de>
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655669
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=75436
+
+--- a/bin/mpd-dynamic
++++ b/bin/mpd-dynamic
+@@ -34,6 +34,8 @@
+ 
+ # fetch list of songs known by mpd.
+ my @files = $mpd->collection->all_pathes;
++die "Please set up mpd's audio collection before running mpd-dynamic"
++    unless @files;
+ 
+ 
+ while (1) { # endless loop
+@@ -48,7 +50,7 @@
+ 
+     # yup - update playlist & song.
+     $playlist = $status->playlist;
+-    $song     = $status->song;
++    $song     = $status->song // 0;
+ 
+     # keep at most $ARGV{old} songs.
+     if ( $song > $ARGV{old} ) {
diff --git a/debian/patches/bug655670-mpd-rate.patch b/debian/patches/bug655670-mpd-rate.patch
new file mode 100644
index 0000000..f4888e6
--- /dev/null
+++ b/debian/patches/bug655670-mpd-rate.patch
@@ -0,0 +1,24 @@
+Description: properly handle Perl error
+ "Can't call method "file" on an undefined value" isn't nearly as
+ helpful as "Cannot rate current song, as no song currently is 
+ playing!"
+Author: Florian Schlichting <fschlich at zedat.fu-berlin.de>
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=655670
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=75436
+
+--- a/bin/mpd-rate
++++ b/bin/mpd-rate
+@@ -24,7 +24,12 @@
+ use Getopt::Euclid qw{ :minimal_keys };
+ 
+ # fetch current song
+-my $song = encode( 'utf-8', Audio::MPD->new->current->file );
++my $playing = Audio::MPD->new->current;
++unless (defined $playing)
++{
++    die "Cannot rate current song, as no song currently is playing!";
++}
++my $song = encode( 'utf-8', $playing->file );
+ 
+ # open ratings file
+ my %ratings;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a941b9c
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+bug655670-mpd-rate.patch
+bug655669-mpd-dynamic.patch

-- 
Debian packaging of libaudio-mpd-perl



More information about the Pkg-perl-cvs-commits mailing list