[arch-commits] Commit in kdelibs/repos (3 files)

Pierre Schmitz pierre at archlinux.org
Tue Aug 18 11:08:16 UTC 2009


    Date: Tuesday, August 18, 2009 @ 07:08:16
  Author: pierre
Revision: 50007

Merged revisions 50005 via svnmerge from 
svn+ssh://svn.archlinux.org/srv/svn-packages/kdelibs/trunk

........
  r50005 | pierre | 2009-08-18 13:06:15 +0200 (Di, 18 Aug 2009) | 1 line
  
  fix bug
........

Added:
  kdelibs/repos/extra-x86_64/1012564.patch
    (from rev 50005, kdelibs/trunk/1012564.patch)
Modified:
  kdelibs/repos/extra-x86_64/	(properties)
  kdelibs/repos/extra-x86_64/PKGBUILD

---------------+
 1012564.patch |   69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 PKGBUILD      |   14 ++++++++---
 2 files changed, 80 insertions(+), 3 deletions(-)


Property changes on: kdelibs/repos/extra-x86_64
___________________________________________________________________
Modified: svnmerge-integrated
   - /kdelibs/trunk:1-49155
   + /kdelibs/trunk:1-50006

Copied: kdelibs/repos/extra-x86_64/1012564.patch (from rev 50005, kdelibs/trunk/1012564.patch)
===================================================================
--- extra-x86_64/1012564.patch	                        (rev 0)
+++ extra-x86_64/1012564.patch	2009-08-18 11:08:16 UTC (rev 50007)
@@ -0,0 +1,69 @@
+Index: kio/kio/kfileitem.cpp
+===================================================================
+--- kio/kio/kfileitem.cpp	(Revision 1012563)
++++ kio/kio/kfileitem.cpp	(Revision 1012564)
+@@ -532,6 +532,9 @@
+ {
+     d->m_strName = name;
+     d->m_strText = KIO::decodeFileName( d->m_strName );
++    if (d->m_entry.contains(KIO::UDSEntry::UDS_NAME))
++        d->m_entry.insert(KIO::UDSEntry::UDS_NAME, d->m_strName); // #195385
++
+ }
+ 
+ QString KFileItem::linkDest() const
+Index: kio/tests/kfileitemtest.cpp
+===================================================================
+--- kio/tests/kfileitemtest.cpp	(Revision 1012563)
++++ kio/tests/kfileitemtest.cpp	(Revision 1012564)
+@@ -241,6 +241,21 @@
+     QVERIFY(fileItem.cmp(fileItem2));
+ }
+ 
++void KFileItemTest::testRename()
++{
++    KIO::UDSEntry entry;
++    const QString origName = QString::fromLatin1("foo");
++    entry.insert(KIO::UDSEntry::UDS_NAME, origName);
++    entry.insert(KIO::UDSEntry::UDS_FILE_TYPE, S_IFDIR);
++    KFileItem fileItem(entry, KUrl("/dir/foo"));
++    QCOMPARE(fileItem.name(), origName);
++    QCOMPARE(fileItem.text(), origName);
++    const QString newName = QString::fromLatin1("FiNeX_rocks");
++    fileItem.setName(newName);
++    QCOMPARE(fileItem.name(), newName);
++    QCOMPARE(fileItem.text(), newName);
++    QCOMPARE(fileItem.entry().stringValue(KIO::UDSEntry::UDS_NAME), newName); // #195385
++}
+ 
+ void KFileItemTest::testDecodeFileName_data()
+ {
+Index: kio/tests/kdirmodeltest.cpp
+===================================================================
+--- kio/tests/kdirmodeltest.cpp	(Revision 1012563)
++++ kio/tests/kdirmodeltest.cpp	(Revision 1012564)
+@@ -418,6 +418,12 @@
+     // check renaming happened
+     QCOMPARE( m_dirModel->itemForIndex( m_secondFileIndex ).url().url(), newUrl.url() );
+ 
++    // check that KDirLister::cachedItemForUrl won't give a bad name if copying that item (#195385)
++    KFileItem cachedItem = KDirLister::cachedItemForUrl(newUrl);
++    Q_ASSERT(!cachedItem.isNull());
++    QCOMPARE(cachedItem.name(), QString("toplevelfile_2_renamed"));
++    QCOMPARE(cachedItem.entry().stringValue(KIO::UDSEntry::UDS_NAME), QString("toplevelfile_2_renamed"));
++
+     // Put things back to normal
+     job = KIO::rename(newUrl, url, KIO::HideProgressInfo);
+     ok = job->exec();
+Index: kio/tests/kfileitemtest.h
+===================================================================
+--- kio/tests/kfileitemtest.h	(Revision 1012563)
++++ kio/tests/kfileitemtest.h	(Revision 1012564)
+@@ -35,6 +35,7 @@
+     void testHiddenFile();
+     void testMimeTypeOnDemand();
+     void testCmp();
++    void testRename();
+ 
+     void testDecodeFileName_data();
+     void testDecodeFileName();

Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2009-08-18 11:07:06 UTC (rev 50006)
+++ extra-x86_64/PKGBUILD	2009-08-18 11:08:16 UTC (rev 50007)
@@ -3,7 +3,7 @@
 
 pkgname=kdelibs
 pkgver=4.3.0
-pkgrel=2
+pkgrel=3
 pkgdesc="KDE Core Libraries"
 arch=('i686' 'x86_64')
 url='http://www.kde.org'
@@ -15,11 +15,13 @@
 replaces=('arts')
 install='kdelibs.install'
 source=(http://download.kde.org/stable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2
-        'kde-applications-menu.patch' 'archlinux-menu.patch' 'abs-syntax-highlight.patch')
+        'kde-applications-menu.patch' 'archlinux-menu.patch' 'abs-syntax-highlight.patch'
+        '1012564.patch')
 md5sums=('ea54f71bcbb0cf96bb6d94c019de8bb5'
          '280f34ee159845f8902c31bd499254fc'
          '0f214b222bfb0327e7a2b6fb13756895'
-         '18ea42696a7f41332a092d6ead7efc6a')
+         '18ea42696a7f41332a092d6ead7efc6a'
+         'e32dc06505d924d400550d7fbf30c4ce')
 
 build() {
 	cd $srcdir/${pkgname}-${pkgver}
@@ -30,6 +32,12 @@
 	patch -p1 -i $srcdir/archlinux-menu.patch
 	# add syntax highlightning for PKGBUILD and .install files
 	patch -p1 -i $srcdir/abs-syntax-highlight.patch
+
+	# prevent possible data loss
+	# see http://bugs.kde.org/show_bug.cgi?id=195385
+	# will be included in 4.3.1
+	patch -p0 -i $srcdir/1012564.patch || return 1
+
 	cd ..
 	mkdir build
 	cd build




More information about the arch-commits mailing list