public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Rex Dieter <rdieter@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/amarok] epel10.2: - amarok-2.2.2
Date: Mon, 06 Jul 2026 18:31:02 GMT	[thread overview]
Message-ID: <178336266272.1.8485369698186383098.rpms-amarok-7bb5f6007986@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/amarok
Branch : epel10.2
Commit : 7bb5f60079860d73f387b2212b0997defe28ff41
Author : Rex Dieter <rdieter@fedoraproject.org>
Date   : 2010-01-08T18:20:33+00:00
Stats  : +206/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/amarok/c/7bb5f60079860d73f387b2212b0997defe28ff41?branch=epel10.2

Log:
- amarok-2.2.2

---
diff --git a/amarok-2.2.2-kde#220532.patch b/amarok-2.2.2-kde#220532.patch
new file mode 100644
index 0000000..31ccb53
--- /dev/null
+++ b/amarok-2.2.2-kde#220532.patch
@@ -0,0 +1,202 @@
+Jeff Mitchell <mitchell@kde.org>
+Fixes a crash that can occur during scanning. This patch should be applied to 2.2.2 vanilla. 
+
+
+diff --git a/src/collection/sqlcollection/ScanResultProcessor.cpp b/src/collection/sqlcollection/ScanResultProcessor.cpp
+index b680623..a8806b3 100644
+--- a/src/collection/sqlcollection/ScanResultProcessor.cpp
++++ b/src/collection/sqlcollection/ScanResultProcessor.cpp
+@@ -43,18 +43,33 @@ ScanResultProcessor::~ScanResultProcessor()
+ {
+     //everything has a URL, so enough to just delete from here
+     foreach( QStringList *list, m_urlsHashByUid )
+-        delete list;
++    {
++        if( list )
++            delete list;
++    }
+     foreach( QLinkedList<QStringList*> *list, m_albumsHashByName )
+     {
+-        foreach( QStringList *slist, *list )
+-            delete slist;
+-        delete list;
++        if( list )
++        {
++            foreach( QStringList *slist, *list )
++            {
++                if( slist )
++                   delete slist;
++            }
++            delete list;
++        }
+     }
+     foreach( QLinkedList<QStringList*> *list, m_tracksHashByAlbum )
+     {
+-        foreach( QStringList *slist, *list )
+-            delete slist;
+-        delete list;
++        if( list )
++        {
++            foreach( QStringList *slist, *list )
++            {
++                if( slist )
++                    delete slist;
++            }
++            delete list;
++        }
+     }
+ }
+ 
+@@ -68,10 +83,10 @@ void
+ ScanResultProcessor::addDirectory( const QString &dir, uint mtime )
+ {
+     DEBUG_BLOCK
+-    debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime;
++    //debug() << "SRP::addDirectory on " << dir << " with mtime " << mtime;
+     if( dir.isEmpty() )
+     {
+-        debug() << "got directory with no path from the scanner, not adding";
++        //debug() << "got directory with no path from the scanner, not adding";
+         return;
+     }
+     setupDatabase();
+@@ -419,7 +434,15 @@ ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId )
+ 
+     //urlId will take care of the urls table part of AFT
+     int url = urlId( path, uid );
+-
++/*
++    foreach( QString key, m_urlsHashByUid.keys() )
++    debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key];
++    foreach( int key, m_urlsHashById.keys() )
++    debug() << "Key: " << key << ", list: " << *m_urlsHashById[key];
++    typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs
++    foreach( blahType key, m_urlsHashByLocation.keys() )
++    debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key];
++*/
+     QStringList *trackList = new QStringList();
+     int id = m_nextTrackNum;
+     //debug() << "Appending new track number with tracknum: " << id;
+@@ -470,7 +493,7 @@ ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId )
+     //insert into hashes
+     if( m_tracksHashByUrl.contains( url ) && m_tracksHashByUrl[url] != 0 )
+     {
+-        //debug() << "m_tracksHashByUrl contains the url!";
++        //debug() << "m_tracksHashByUrl already contains url " << url;
+         //need to replace, not overwrite/add a new one
+         QStringList *oldValues = m_tracksHashByUrl[url];
+         QString oldId = oldValues->at( 0 );
+@@ -491,7 +514,12 @@ ScanResultProcessor::addTrack( const QVariantMap &trackData, int albumArtistId )
+     }
+ 
+     if( m_tracksHashByAlbum.contains( album ) && m_tracksHashByAlbum[album] != 0 )
+-        m_tracksHashByAlbum[album]->append( trackList );
++    {
++        //contains isn't the fastest on linked lists, but in reality this is on the order of maybe
++        //ten quick pointer comparisons per track on average...probably lower
++        if( !m_tracksHashByAlbum[album]->contains( trackList ) )
++            m_tracksHashByAlbum[album]->append( trackList );
++    }
+     else
+     {
+         QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>();
+@@ -631,7 +659,10 @@ ScanResultProcessor::albumInsert( const QString &album, int albumArtistId )
+     albumList->append( QString() );
+     m_albumsHashById[returnedNum] = albumList;
+     if( m_albumsHashByName.contains( album ) && m_albumsHashByName[album] != 0 )
+-        m_albumsHashByName[album]->append( albumList );
++    {
++        if( !m_albumsHashByName[album]->contains( albumList ) )
++            m_albumsHashByName[album]->append( albumList );
++    }
+     else
+     {
+         QLinkedList<QStringList*> *list = new QLinkedList<QStringList*>();
+@@ -645,8 +676,8 @@ ScanResultProcessor::albumInsert( const QString &album, int albumArtistId )
+ int
+ ScanResultProcessor::urlId( const QString &url, const QString &uid )
+ {
+-    /*
+     DEBUG_BLOCK
++/*
+     foreach( QString key, m_urlsHashByUid.keys() )
+     debug() << "Key: " << key << ", list: " << *m_urlsHashByUid[key];
+     foreach( int key, m_urlsHashById.keys() )
+@@ -654,8 +685,8 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid )
+     typedef QPair<int, QString> blahType; //QFOREACH is stupid when it comes to QPairs
+     foreach( blahType key, m_urlsHashByLocation.keys() )
+     debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key];
+-    */
+- 
++*/
++
+     QFileInfo fileInfo( url );
+     const QString dir = fileInfo.absoluteDir().absolutePath();
+     int dirId = directoryId( dir );
+@@ -665,6 +696,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid )
+     QPair<int, QString> locationPair( deviceId, rpath );
+     //debug() << "in urlId with url = " << url << " and uid = " << uid;
+     //debug() << "checking locationPair " << locationPair;
++/*
+     if( m_urlsHashByLocation.contains( locationPair ) )
+     {
+         QStringList values;
+@@ -674,6 +706,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid )
+             values << "zero";
+         //debug() << "m_urlsHashByLocation contains it! It is " << values;
+     }
++*/
+     QStringList currUrlIdValues;
+     if( m_urlsHashByUid.contains( uid ) && m_urlsHashByUid[uid] != 0 )
+         currUrlIdValues = *m_urlsHashByUid[uid];
+@@ -717,6 +750,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid )
+             //debug() << "m_urlsHashByUid contains this UID, updating deviceId and path";
+             QStringList *list = m_urlsHashByUid[uid];
+             //debug() << "list from UID hash is " << list << " with values " << *list;
++            QPair<int, QString> oldLocationPair( list->at( 1 ).toInt(), list->at( 2 ) );
+             list->replace( 1, QString::number( deviceId ) );
+             list->replace( 2, rpath );
+             list->replace( 3, QString::number( dirId ) );
+@@ -737,6 +771,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid )
+                 delete oldList;
+             }
+             m_urlsHashByLocation[locationPair] = list;
++            m_urlsHashByLocation.remove( oldLocationPair );
+         }
+         m_permanentTablesUrlUpdates.insert( uid, url );
+         m_changedUrls.insert( uid, QPair<QString, QString>( MountPointManager::instance()->getAbsolutePath( currUrlIdValues[1].toInt(), currUrlIdValues[2] ), url ) );
+@@ -751,6 +786,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid )
+         {
+             QStringList *list = m_urlsHashByLocation[locationPair];
+             //debug() << "Replacing hash " << list->at( 4 ) << " with " << uid;
++            QString oldId = list->at( 4 );
+             list->replace( 4, uid );
+             if( m_urlsHashByUid.contains( uid )
+                 && m_urlsHashByUid[uid] != 0 
+@@ -762,6 +798,7 @@ ScanResultProcessor::urlId( const QString &url, const QString &uid )
+                 delete oldList;
+             }
+             m_urlsHashByUid[uid] = list;
++            m_urlsHashByUid.remove( oldId );
+         }
+         m_permanentTablesUidUpdates.insert( url, uid );
+         m_changedUids.insert( currUrlIdValues[4], uid );
+@@ -1167,6 +1204,18 @@ ScanResultProcessor::copyHashesToTempTables()
+     foreach( blahType key, m_urlsHashByLocation.keys() )
+         debug() << "Key: " << key << ", list: " << *m_urlsHashByLocation[key];
+     debug() << "Next album num: " << m_nextAlbumNum;
++
++    foreach( int key, m_tracksHashById.keys() )
++        debug() << "Key: " << key << ", list: " << *m_tracksHashById[key];
++    foreach( int key, m_tracksHashByUrl.keys() )
++        debug() << "Key: " << key << ", list: " << *m_tracksHashByUrl[key];
++    typedef QLinkedList<QStringList*> blahType; //QFOREACH is stupid when it comes to QPairs
++    foreach( int key, m_tracksHashByAlbum.keys() )
++    {
++        debug() << "Key: " << key;
++        foreach( QStringList* item, *m_tracksHashByAlbum[key] )
++            debug() << "list: " << *item;
++    }
+     */
+  
+     DEBUG_BLOCK

diff --git a/amarok.spec b/amarok.spec
index 0a97e4b..38a466d 100644
--- a/amarok.spec
+++ b/amarok.spec
@@ -2,7 +2,7 @@
 Name:    amarok
 Summary: Media player
 Version: 2.2.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 Group: 	 Applications/Multimedia
 License: GPLv2+
@@ -15,6 +15,8 @@ Patch1: amarok-2.2.2-no_var_tracking.patch
 Patch50: amarok-2.2.1.90-qtscript_not_required.patch
 
 ## upstream patches
+# http://bugs.kde.org/220532
+Patch100: amarok-2.2.2-kde#220532.patch 
 
 BuildRequires: curl-devel
 BuildRequires: desktop-file-utils
@@ -87,6 +89,7 @@ Obsoletes: amarok-utilities < 2.0.96
 %patch1 -p1 -b .no_var_tracking
 %endif
 %patch50 -p1 -b .qtscript_not_required
+%patch100 -p1 -b .kde#220532
 
 
 %build

             reply	other threads:[~2026-07-06 18:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-06 18:31 Rex Dieter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-06 18:31 [rpms/amarok] epel10.2: - amarok-2.2.2 Rex Dieter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178336266272.1.8485369698186383098.rpms-amarok-7bb5f6007986@fedoraproject.org \
    --to=rdieter@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox