Date: Monday, August 8, 2016 @ 12:04:23 Author: bisson Revision: 186004
fix FS#50311 Added: picard/trunk/mutagen-1.34.patch Modified: picard/trunk/PKGBUILD --------------------+ PKGBUILD | 13 +++++++++-- mutagen-1.34.patch | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 3 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-08-08 12:01:31 UTC (rev 186003) +++ PKGBUILD 2016-08-08 12:04:23 UTC (rev 186004) @@ -5,7 +5,7 @@ pkgname=picard pkgver=1.3.2 -pkgrel=4 +pkgrel=5 pkgdesc='Official MusicBrainz tagger' url='http://picard.musicbrainz.org/' license=('GPL') @@ -14,9 +14,16 @@ optdepends=('chromaprint: fingerprinting' 'python2-discid: cd lookup') makedepends=('python2-discid') -source=("http://ftp.musicbrainz.org/pub/musicbrainz/${pkgname}/${pkgname}-${pkgver}.tar.gz") -sha1sums=('084fdb184cb1d970dce953dd6c684932d464bf54') +source=("http://ftp.musicbrainz.org/pub/musicbrainz/${pkgname}/${pkgname}-${pkgver}.tar.gz" + 'mutagen-1.34.patch') +sha1sums=('084fdb184cb1d970dce953dd6c684932d464bf54' + 'a58b5843141aeff64c2f4b688645394321ee49b7') +prepare() { + cd "${srcdir}/picard-release-${pkgver}" + patch -p1 -i ../mutagen-1.34.patch +} + build() { cd "${srcdir}/picard-release-${pkgver}" python2 setup.py config Added: mutagen-1.34.patch =================================================================== --- mutagen-1.34.patch (rev 0) +++ mutagen-1.34.patch 2016-08-08 12:04:23 UTC (rev 186004) @@ -0,0 +1,56 @@ +diff -ur old/picard/formats/id3.py new/picard/formats/id3.py +--- old/picard/formats/id3.py 2015-01-06 23:01:43.000000000 +0100 ++++ new/picard/formats/id3.py 2016-08-08 12:09:32.613315575 +0200 +@@ -35,23 +35,23 @@ + # Ugly, but... I need to save the text in ISO-8859-1 even if it contains + # unsupported characters and this better than encoding, decoding and + # again encoding. +-def patched_EncodedTextSpec_write(self, frame, value): ++def patched_EncodedTextSpec_write(self, config, frame, value): + try: + enc, term = self._encodings[frame.encoding] + except AttributeError: + enc, term = self.encodings[frame.encoding] + return value.encode(enc, 'ignore') + term + +-id3.EncodedTextSpec.write = patched_EncodedTextSpec_write ++id3._specs.EncodedTextSpec.write = patched_EncodedTextSpec_write + + + # One more "monkey patch". The ID3 spec says that multiple text + # values should be _separated_ by the string terminator, which + # means that e.g. 'a\x00' are two values, 'a' and ''. +-def patched_MultiSpec_write(self, frame, value): +- data = self._write_orig(frame, value) ++def patched_MultiSpec_write(self, config, frame, value): ++ data = self._write_orig(config, frame, value) + spec = self.specs[-1] +- if isinstance(spec, id3.EncodedTextSpec): ++ if isinstance(spec, id3._specs.EncodedTextSpec): + try: + term = spec._encodings[frame.encoding][1] + except AttributeError: +@@ -61,8 +61,8 @@ + return data + + +-id3.MultiSpec._write_orig = id3.MultiSpec.write +-id3.MultiSpec.write = patched_MultiSpec_write ++id3._specs.MultiSpec._write_orig = id3._specs.MultiSpec.write ++id3._specs.MultiSpec.write = patched_MultiSpec_write + + + id3.TCMP = compatid3.TCMP +diff -ur old/picard/formats/mutagenext/compatid3.py new/picard/formats/mutagenext/compatid3.py +--- old/picard/formats/mutagenext/compatid3.py 2016-08-08 09:57:59.177734598 +0200 ++++ new/picard/formats/mutagenext/compatid3.py 2016-08-08 12:09:32.613315575 +0200 +@@ -23,7 +23,8 @@ + import mutagen + from mutagen._util import insert_bytes + from mutagen.id3 import ID3, Frames, Frames_2_2, TextFrame, TORY, \ +- TYER, TIME, APIC, IPLS, TDAT, BitPaddedInt, MakeID3v1 ++ TYER, TIME, APIC, IPLS, TDAT, MakeID3v1 ++from mutagen.id3._util import BitPaddedInt + + + class TCMP(TextFrame):