https://bugs.kde.org/show_bug.cgi?id=380442

--- Comment #6 from Paul Konecny <p...@konecny.at> ---
Hi Matthieu, 

could you guide me through the patch process? I'm not a programmer and tried to
edit the Arch PKGBUILD but it seems I'm doing something wrong. 

1. Wget the Diff to D17163.diff
2. Copied D17163.diff to all src directories
2. Edited PKGBUILD with 

prepare() {
  cd $pkgname-$pkgver
        patch -Np1 -i "${srcdir}/D17163.diff"
  mkdir -p build
}

as instructed here 
https://wiki.archlinux.org/index.php/Patching_packages

4. Run makepkg
5. This is the output I get from the patching process. 


patching file autotests/albummodeltest.cpp
Hunk #1 succeeded at 360 (offset 144 lines).
Hunk #2 succeeded at 387 (offset 144 lines).
Hunk #3 succeeded at 461 (offset 144 lines).
patching file autotests/allalbumsmodeltest.cpp
Hunk #1 succeeded at 377 (offset 174 lines).
Hunk #2 FAILED at 262.
1 out of 2 hunks FAILED -- saving rejects to file
autotests/allalbumsmodeltest.cpp.rej
patching file autotests/allartistsmodeltest.cpp
Hunk #1 succeeded at 303 (offset 144 lines).
patching file autotests/alltracksmodeltest.cpp
Hunk #1 succeeded at 351 (offset 144 lines).
Hunk #2 succeeded at 414 (offset 144 lines).
Hunk #3 succeeded at 522 (offset 186 lines).
Hunk #4 succeeded at 618 (offset 186 lines).
patching file autotests/alltracksproxymodeltest.cpp
Hunk #1 succeeded at 361 (offset 144 lines).
Hunk #2 succeeded at 427 (offset 144 lines).
Hunk #3 succeeded at 540 (offset 189 lines).
Hunk #4 succeeded at 641 (offset 189 lines).
patching file autotests/databaseinterfacetest.cpp
Hunk #1 succeeded at 253 (offset 136 lines).
Hunk #2 FAILED at 207.
Hunk #3 FAILED at 303.
Hunk #4 FAILED at 398.
Hunk #5 FAILED at 493.
Hunk #6 FAILED at 540.
Hunk #7 succeeded at 352 (offset -257 lines).
Hunk #8 succeeded at 528 with fuzz 2 (offset -130 lines).
Hunk #9 succeeded at 550 with fuzz 2 (offset -129 lines).
Hunk #10 FAILED at 730.
Hunk #11 FAILED at 808.
Hunk #12 succeeded at 627 (offset -257 lines).
Hunk #13 FAILED at 934.
Hunk #14 FAILED at 955.
Hunk #15 succeeded at 833 (offset -257 lines).
Hunk #16 succeeded at 930 (offset -257 lines).
Hunk #17 succeeded at 1293 (offset -257 lines).
Hunk #18 succeeded at 1723 (offset -257 lines).
Hunk #19 succeeded at 2304 (offset -257 lines).
Hunk #20 succeeded at 2371 (offset -257 lines).
Hunk #21 succeeded at 2449 (offset -257 lines).
Hunk #22 succeeded at 2564 (offset -257 lines).
Hunk #23 succeeded at 2644 (offset -257 lines).
Hunk #24 succeeded at 2777 (offset -257 lines).
Hunk #25 succeeded at 2857 (offset -257 lines).
Hunk #26 succeeded at 2998 (offset -257 lines).
Hunk #27 succeeded at 3035 (offset -257 lines).
Hunk #28 succeeded at 3127 (offset -257 lines).
Hunk #29 succeeded at 3208 (offset -257 lines).
Hunk #30 succeeded at 3292 (offset -257 lines).
Hunk #31 succeeded at 3533 (offset -257 lines).
Hunk #32 succeeded at 3649 (offset -257 lines).
Hunk #33 succeeded at 3752 (offset -257 lines).
Hunk #34 FAILED at 4051.
Hunk #35 succeeded at 3869 (offset -257 lines).
Hunk #36 succeeded at 3900 (offset -257 lines).
Hunk #37 FAILED at 4196.
Hunk #38 FAILED at 4216.
Hunk #39 succeeded at 4014 (offset -257 lines).
Hunk #40 succeeded at 4112 (offset -257 lines).
Hunk #41 succeeded at 4218 (offset -257 lines).
Hunk #42 succeeded at 4298 (offset -257 lines).
Hunk #43 FAILED at 4713.
Hunk #44 FAILED at 4856.
14 out of 44 hunks FAILED -- saving rejects to file
autotests/databaseinterfacetest.cpp.rej
can't find file to patch at input line 714
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/autotests/databasetestdata.h b/autotests/databasetestdata.h
|--- a/autotests/databasetestdata.h
|+++ b/autotests/databasetestdata.h
--------------------------
File to patch: ^C


This is the content of allalbumsmodeltest.cpp.rej

--- autotests/allalbumsmodeltest.cpp
+++ autotests/allalbumsmodeltest.cpp
@@ -262,7 +262,7 @@
                 QTime::fromMSecsSinceStartOfDay(23),
{QUrl::fromLocalFile(QStringLiteral("/$23"))},
                 QDateTime::fromMSecsSinceEpoch(23),
         {QUrl::fromLocalFile(QStringLiteral("file://image$23"))}, 5, true,
-        {}, QStringLiteral("composer1"), QStringLiteral("lyricist1")};
+        {}, QStringLiteral("composer1"), QStringLiteral("lyricist1"), false};
         auto newTracks = QList<MusicAudioTrack>();
         newTracks.push_back(newTrack);


This is the content of databaseinterfacetest.cpp.rej
--- autotests/databaseinterfacetest.cpp
+++ autotests/databaseinterfacetest.cpp
@@ -207,7 +207,7 @@
         auto newTrack = MusicAudioTrack {true, QStringLiteral("$24"),
QStringLiteral("0"), QStringLiteral("track10"),
                 QStringLiteral("artist8"), {}, QStringLiteral("artist8"),
                 9, 1, QTime::fromMSecsSinceStartOfDay(24),
{QUrl::fromLocalFile(QStringLiteral("/$24"))},
QDateTime::fromMSecsSinceEpoch(24),
-                {}, 9, true, QStringLiteral("genre1"),
QStringLiteral("composer1"), QStringLiteral("lyricist1")};
+                {}, 9, true, QStringLiteral("genre1"),
QStringLiteral("composer1"), QStringLiteral("lyricist1"), false};

         auto newTracks = QList<MusicAudioTrack>();
         newTracks.push_back(newTrack);
@@ -303,7 +303,7 @@
                 QStringLiteral("artist8"), QStringLiteral("album4"),
QStringLiteral("artist8"),
                 -1, 1, QTime::fromMSecsSinceStartOfDay(26),
{QUrl::fromLocalFile(QStringLiteral("/$26"))},
QDateTime::fromMSecsSinceEpoch(26),
                 QUrl::fromLocalFile(QStringLiteral("file://image$26")), 9,
true,
-                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1")};
+                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1"), false};
         auto newTracks = QList<MusicAudioTrack>();
         newTracks.push_back(newTrack);

@@ -398,7 +398,7 @@
                 {}, QStringLiteral("album4"), {},
                 9, 1, QTime::fromMSecsSinceStartOfDay(26),
{QUrl::fromLocalFile(QStringLiteral("/$26"))},
QDateTime::fromMSecsSinceEpoch(26),
                 QUrl::fromLocalFile(QStringLiteral("file://image$26")), 9,
true,
-                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1")};
+                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1"), false};
         auto newTracks = QList<MusicAudioTrack>();
         newTracks.push_back(newTrack);

@@ -493,7 +493,7 @@
                 {}, QStringLiteral("album4"), {},
                 9, 1, QTime::fromMSecsSinceStartOfDay(26),
{QUrl::fromLocalFile(QStringLiteral("/$26"))},
QDateTime::fromMSecsSinceEpoch(26),
                 QUrl::fromLocalFile(QStringLiteral("file://image$26")), 9,
true,
-                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1")};
+                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1"), false};
         auto newTracks = QList<MusicAudioTrack>();
         newTracks.push_back(newTrack);

@@ -540,7 +540,7 @@
                 QStringLiteral("artist1"), QStringLiteral("album4"),
QStringLiteral("artist2"),
                 10, 1, QTime::fromMSecsSinceStartOfDay(27),
{QUrl::fromLocalFile(QStringLiteral("/autre/$27"))},
QDateTime::fromMSecsSinceEpoch(27),
                 QUrl::fromLocalFile(QStringLiteral("file://image$27")), 10,
true,
-                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1")};
+                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1"), false};
         newTracks = QList<MusicAudioTrack>();
         newTracks.push_back(newTrack);

@@ -730,19 +732,19 @@
                       QTime::fromMSecsSinceStartOfDay(19),
{QUrl::fromLocalFile(QStringLiteral("/$19"))},
                       QDateTime::fromMSecsSinceEpoch(19),
                       {QUrl::fromLocalFile(QStringLiteral("album3"))}, 5,
true,
-                      QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1")},
+                      QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1"), false},
                      {true, QStringLiteral("$20"), QStringLiteral("0"),
QStringLiteral("track7"),
                       QStringLiteral("artist2"), QStringLiteral("album3"), {},
7, 1,
                       QTime::fromMSecsSinceStartOfDay(20),
{QUrl::fromLocalFile(QStringLiteral("/$20"))},
                       QDateTime::fromMSecsSinceEpoch(20),
                       {QUrl::fromLocalFile(QStringLiteral("album3"))}, 4,
true,
-                      QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1")},
+                      QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1"), false},
                      {true, QStringLiteral("$21"), QStringLiteral("0"),
QStringLiteral("track8"),
                       QStringLiteral("artist2"), QStringLiteral("album3"), {},
8, 1,
                       QTime::fromMSecsSinceStartOfDay(21),
{QUrl::fromLocalFile(QStringLiteral("/$21"))},
                       QDateTime::fromMSecsSinceEpoch(21),
                       {QUrl::fromLocalFile(QStringLiteral("album3"))}, 3,
true,
-                      QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1")}};
+                      QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1"), false}};

         auto newCovers = mNewCovers;
         newCovers[QStringLiteral("file:///$19")] =
QUrl::fromLocalFile(QStringLiteral("album3"));
@@ -808,6 +810,7 @@
         QCOMPARE(secondTrack.lyricist(), QStringLiteral("lyricist1"));
         QCOMPARE(secondTrack.isSingleDiscAlbum(), true);
         QCOMPARE(secondTrack.albumId(), qulonglong(1));
+        QCOMPARE(secondTrack.hasEmbeddedCover(), false);

         auto thirdTrack =
musicDb.trackFromDatabaseId(musicDb.trackIdFromTitleAlbumTrackDiscNumber(QStringLiteral("track8"),
QStringLiteral("artist2"),
                                                                               
                    QStringLiteral("album3"), 8, 1));
@@ -934,6 +937,7 @@
         QCOMPARE(firstTrack.lyricist(), QStringLiteral("lyricist1"));
         QCOMPARE(firstTrack.isSingleDiscAlbum(), true);
         QCOMPARE(firstTrack.albumId(), qulonglong(1));
+        QCOMPARE(firstTrack.hasEmbeddedCover(), true);

         auto secondTrack =
musicDb.trackFromDatabaseId(musicDb.trackIdFromTitleAlbumTrackDiscNumber(QStringLiteral("track7"),
QStringLiteral("artist3"),
                                                                               
                     QStringLiteral("album3"), 7, 1));
@@ -955,6 +959,7 @@
         QCOMPARE(secondTrack.lyricist(), QStringLiteral("lyricist1"));
         QCOMPARE(secondTrack.isSingleDiscAlbum(), true);
         QCOMPARE(secondTrack.albumId(), qulonglong(1));
+        QCOMPARE(secondTrack.hasEmbeddedCover(), false);

         auto album = musicDb.albumFromTitleAndArtist(QStringLiteral("album3"),
QStringLiteral("artist4"));

@@ -4051,15 +4056,16 @@
         QCOMPARE(firstTrack.composer(), QStringLiteral("composer1"));
         QCOMPARE(firstTrack.lyricist(), QStringLiteral("lyricist1"));
         QCOMPARE(firstTrack.albumId(), qulonglong(1));
+        QCOMPARE(firstTrack.hasEmbeddedCover(), true);

         auto newTracks2 = QList<MusicAudioTrack>();

         newTracks2 = {{true, QStringLiteral("$23"), QStringLiteral("0"),
QStringLiteral("track6"),
                        QStringLiteral("artist2"), QStringLiteral("album3"),
QStringLiteral("artist2"),
                        6, 1, QTime::fromMSecsSinceStartOfDay(23),
{QUrl::fromLocalFile(QStringLiteral("/$23"))},
                        QDateTime::fromMSecsSinceEpoch(23),
                        {QUrl::fromLocalFile(QStringLiteral("album3"))}, 5,
true,
-                       QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1")},};
+                       QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1"), false},};

         auto newCovers2 = mNewCovers;
         newCovers2[QStringLiteral("file:///$23")] =
QUrl::fromLocalFile(QStringLiteral("album3"));
@@ -4196,6 +4202,7 @@
         QCOMPARE(firstTrack.composer(), QStringLiteral("composer1"));
         QCOMPARE(firstTrack.lyricist(), QStringLiteral("lyricist1"));
         QCOMPARE(firstTrack.albumId(), qulonglong(1));
+        QCOMPARE(firstTrack.hasEmbeddedCover(), true);

         auto secondTrack =
musicDb.trackFromDatabaseId(musicDb.trackIdFromTitleAlbumTrackDiscNumber(QStringLiteral("track7"),
QStringLiteral("artist3"),
                                                                               
                     QStringLiteral("album3"), 7, 1));
@@ -4216,6 +4223,7 @@
         QCOMPARE(secondTrack.composer(), QStringLiteral("composer1"));
         QCOMPARE(secondTrack.lyricist(), QStringLiteral("lyricist1"));
         QCOMPARE(secondTrack.albumId(), qulonglong(1));
+        QCOMPARE(secondTrack.hasEmbeddedCover(), false);

         auto album = musicDb.albumFromTitleAndArtist(QStringLiteral("album3"),
QStringLiteral("artist4"));

@@ -4713,7 +4721,7 @@

         auto newTrack = MusicAudioTrack{true, QStringLiteral("$23"),
QStringLiteral("0"), {},
         {}, {}, {}, {}, {}, {},
{QUrl::fromLocalFile(QStringLiteral("file:///$23"))},
-                QDateTime::fromMSecsSinceEpoch(23), {}, {}, {}, {}, {}, {}};
+                QDateTime::fromMSecsSinceEpoch(23), {}, {}, {}, {}, {}, {},
false};
         auto newTracks = QList<MusicAudioTrack>();
         newTracks.push_back(newTrack);
         newTracks.push_back(newTrack);
@@ -4856,7 +4864,7 @@
                 6, 1, QTime::fromMSecsSinceStartOfDay(23),
{QUrl::fromLocalFile(QStringLiteral("/test{{test}}/$23"))},
                 QDateTime::fromMSecsSinceEpoch(23),
                 QUrl::fromLocalFile(QStringLiteral("album3")), 5, true,
-                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1")};
+                QStringLiteral("genre1"), QStringLiteral("composer1"),
QStringLiteral("lyricist1"), false};
         auto newTracks = QList<MusicAudioTrack>();
         newTracks.push_back(newTrack);




Thanks in advance and merci!
Paul

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to